This could be a very simple thing, but still I am not able to do this. And there is no similar question on SO
I just want to host my asp .net web api over the IIS. I was working with web application years back and this used to be a trivial thing to host a web application (not sure how to host web api).
Please note that when I hit F5 and directly run it from visual studio, then it is correctly getting hosted on IIS express at this address : http://localhost:40343/api/values
I have the default web api created from the asp .net 5 web api template and I have the controller class the following location:
C:\\NewLaptopWorkspace\\ExRestAPI\\src\\ExRestAPI\\Controllers
Steps I am following:
Changing the .net framework version from the Application Pool to .net 4
Now when I try to browse, I get the following error (Please check url, path etc in screen shot below):
Could someone please help out with this!
Try giving the following users access to the physical path:
By right click on the folder > security tab > edit.
You are navigating to the root. You need to put in a valid address ie localhost:8080/api/user. Or whatever controller you have setup.
please try follow these steps:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.