asp.net core3.0 problem using the asynchronous method 404

Background of the project:

My project is developed in .net core 2.1, based on the recently upgraded to 3.0

There has been a baffling problem, because there is a cross-domain upload files 404. I have always considered to be cross-domain problem. Therefore, a cross-domain method again take new 2.1 N times operation. Toss two days finally 404

In fact, because I stumbled upon a method ajax request to upload files path name issue

First of all:

My background method defines one such method the async Task public <IActionResult> UploadAsync. I know that the development of this method is asynchronous

The front end of the request path

'http://localhost:8068/NfCommon/NfAttachment/UploadAsync?folderIndex=' + ctype;

When I was in the .net core 2.1 cases no problems. But always tell 404 3.0

Coincidentally chance, I toss in the process accidentally deleted Async. Eventually became 'HTTP: // localhost: 8068 / NfCommon / NfAttachment / the Upload folderIndex =?' + Ctype;

Coincidentally, it can be a normal visit.

The final summary. If after .net core 3.0 is an asynchronous request method. It does not require the suffix Async

 

 

 

 

 

Guess you like

Origin www.cnblogs.com/daiyekun-blog/p/11909899.html