Debugging IIS Express no longer works

I am using IIS Express with Visual Studio 2013 on Windows 8.1 x64 for a WebAPI 2 application (everything is en-US here). This worked pretty well about a month ago, but now I am getting errors when I try to debug the application.

If I don't run VS as admin (again, didn't need to do this before), I get:

A first chance exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.dll

Additional information: Access to the path 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\~AspAccessCheck_c00414062044.tmp' is denied.

      

After that, the second error occurs, or it will be the first error if I run VS as administrator:

A first chance exception of type 'System.Globalization.CultureNotFoundException' occurred in mscorlib.dll

Additional information: Culture is not supported.

      

If I run the same WebAPI application from WebMatrix 3, it launches without error (with or without running "as Admin").

IIS project configuration settings:

<UseIISExpress>true</UseIISExpress>
<IISExpressSSLPort>46435</IISExpressSSLPort>
<IISExpressAnonymousAuthentication>enabled</IISExpressAnonymousAuthentication>
<IISExpressWindowsAuthentication>disabled</IISExpressWindowsAuthentication>
<IISExpressUseClassicPipelineMode>false</IISExpressUseClassicPipelineMode>

      

I also have an application running at http: // localhost: 46436 .

What is also very strange to me is that the project properties show "IIS Express" and use the url http: // localhost: 46436 / , but in the project file I see:

  <ProjectExtensions>
    <VisualStudio>
      <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
        <WebProjectProperties>
          <UseIIS>True</UseIIS>
          <AutoAssignPort>True</AutoAssignPort>
          <DevelopmentServerPort>46435</DevelopmentServerPort>
          <DevelopmentServerVPath>/</DevelopmentServerVPath>
          <IISUrl>http://localhost:46436</IISUrl>

      

This might explain that my access is denied. Regardless, if I canceled, saved and re-installed to use IIS Express (keeping it for all users) the property is <UseIIS>

set to true.

EDIT: It looks like "Use IIS" is fine. As a test, I created a new WebAPI 2 project. It worked fine under IIS Express OOTB.

+3


source to share


2 answers


I also had this problem. Ended up going with the right mouse button on the corresponding folder and add access to the IIS_IUSR account.



If this does not cause critical errors, you can also turn off interrupt mode for this problem using Debug -> Options -> Debug and check Include my code only (managed only)

+1


source


I updated all packages through the NuGet Package Management console and it started working.



0


source







All Articles