So I am learning C# and I am trying to deploy a simple static website and I am getting the following error message:
HTTP Error 404.0 - Not Found The resource you are looking for has been removed, had its name changed, or is temporarily unavailable. Most likely causes: The directory or file specified does not exist on the Web server. The URL contains a typographical error. A custom filter or module, such as URLScan, restricts access to the file.
Does anyone know what it could potentially be?
I went back and looked at the possible causes and everything is fine, atleast I think.
This is how I added the website.
> > Detailed Error Information:
Module IIS Web Core
Handler StaticFile Error Code 0x80070002 Requested URL http://webapi.localhost.net:80/api/user
Physical Path C:\Users\User Name\source\repos\webapi\api\user
Logon Method Anonymous Logon User Anonymous
More Information: This error means that the file or directory does not exist on the server. Create the file or directory and try the request again.
Hi did you notice that Staticfilehandler is handling the request instead of extensionless handler?
So please ensure your asp.net feature has been installed correctly. Then you should see several extensionless handlers displayed in IIS handler mapping. So that extensionlessUrlhandler would process the route instead of accessing the physical path.
Besides, please ensure you have published the project correctly and IIS is using integrated mode.
Finally, remember to promise your IUSER and application pool identity have enough permission to access the root folder. I think host website in desktop is not a good idea.
User contributions licensed under CC BY-SA 3.0