I am trying to debug a web application through IIS that has a virtual directory other than localhost. It compiles fine but gets the above message anytime that I try to start debugging. I have compilation debug="true".
views:
295answers:
3Right click your 'web' project and select 'property pages'. Then change 'Start Options' to 'Don't open a page. Wait for a request from an external application.' and for server, select 'Use custom server' with Base URL: 'http://localhost/your_virtual_dir/'
Then with a web browser opened pointing to the IIS location (and virtual dir) you setup, the two should work in tandem with each other.
Hope that helped.
There could be many reason why you get that error. Microsoft has an article with things to try to solve the problem.
http://msdn.microsoft.com/en-us/library/dwesw3ee(VS.71).aspx
Error: Unable to Start Debugging on the Web Server
Check the points in the MSDN article above. IME, its normally one of these things:
Has the application directory been created as an application in IIS? On the Directory tab, under Application Settings, next to the application name you will see the create button. Click this!
On the ASP.NET tab in IIS, has the correct version of the framework been selected?
Re-register ASP.NET: From a command prompt window, run the following command: systemroot\Microsoft.NET\Framework\ versionNumber \aspnet_regiis -i