I want to run my application from IIS on my local machine. I created the virtual directory and added the application to it.When I run application from IIS it work properly but when I am trying to run through VS 2015 it throws error.
Asked
Active
Viewed 9,790 times
2 Answers
3
Please run your app using "start without debugging" to get much more information in your side.
I met this kind of error message before which was related to the visit/write access.

Jack Zhai
- 6,230
- 1
- 12
- 20
-
Yes i have tried that but getting error site cant be reached. – Mitali Patil May 04 '18 at 05:47
-
@Mitali Patil, Do you use the Chrome browser in your side? Maybe you could use different browser like IE or Edge, view the result. Based on the error messages, you would think about the DNS or the browser settings in your side. – Jack Zhai May 04 '18 at 09:04
-
I have tried to run on all browser it gives same error! – Mitali Patil May 04 '18 at 11:07
-
Faced the same issue with VS 2017 and found out that the user I had configured in the local IIS didn't have access to the Temporary ASP.NET folder in C:\Windows\Microsoft.NET\Framework64\v4.0.30319. Thanks! – MuKa Nov 01 '18 at 12:21
1
I know this is an old post, however, I have had the same problem within vs2019 after switching to IIS debugging. In my case, I was confident that IIS was set up correctly, as another application was attaching fine.
Eventially after reviewing the documentation, I discovered that your web.config may need altering to include the following attribute:
<configuration>
<system.web>
<compilation defaultLanguage="VB"
debug="true"
After setting debug="true" as stated, the debugger attached fine. Just make sure you're running VS as Admin!
Other things to consider, that I have found along the way:
- Make sure you are running VS as Admin
- Ensure your IIS App pool user is correctly set up (correct read/write permissions). Apparently for .Net 4, this also includes read/write to:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files
- A good old
iisreset
may also help (start > 'cmd' (as admin) > type:iisreset
) - Some people have found that setting
Load User Profile
tofalse
also helps. You can find this in IIS Manager > AppPools > [Your app pool] > Advanced Settings > (category) Process Model. The default will be true - The MS document also prompts to check your connection (request) limit (also within Advanced Settings > (category) Recycling
References
- Microsoft's guide to enabling debugging (where I ultimately found my solution)
- Microsoft's troubleshooting guide
A few other things to try
- IIS error, Unable to start debugging on the webserver
- Unable to start debugging on the web server. The remote server returned an error: (404) Not Found. Error when starting debug in Visual Studio (includes a screengrab of the required Windows Features - still applicable for 2021)

Mike C
- 11
- 4