I just wrote a sample code for ASP.NET Web Application, using web service. The environment is Visual Studio 2015. My operation system is Windows 8.
When doing debug, the webpage would not show the app from URLs. Rather it reports an error:
"
Server Error in '/' Application.
Access is denied. Description: An error occurred while accessing the resources required to serve this request. You might not have permission to view the requested resources.
Error message 401.3: You do not have permission to view this directory or page using the credentials you supplied (access denied due to Access Control Lists). Ask the Web server's administrator to give you access to 'K:...\WebServicesDemo\WebServicesDemo\CalculatorWebService.asmx'.
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34248
"
What have I tried:
gave access to "IIS_IUser" but instead it should be "IUSR". That solved the problem. This comes from post: Hosting ASP.NET in IIS7 gives Access is denied?
I noticed there are some solutions offered, but none of them makes sense to me. Could anyone give me a step by step answer?
For example, I don't understand where to add IIS_IUSRS or IUSR. what are they any way? Second, it seems that neither IIS_IUSRS nor IUSR is recognized in my security folder (right click app folder, property-> security tab)
For more information, my Web.config looks like:
<?xml version="1.0"?>
<!-- For more information on how to configure your ASP.NET application, please visit http://go.microsoft.com/fwlink/?LinkId=169433 -->
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0"/>
<httpRuntime/>
</system.web>
</configuration>