Customize Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorized as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customized advertisements based on the pages you visited previously and to analyze the effectiveness of the ad campaigns.

No cookies to display.

Pages Menu
TwitterRssFacebook

Posted by on Oct 3, 2011 in Development

WebDev.Webserver – Unable to start debugging on the web server. The web server could not find the requested resource.

WebDev.Webserver – Unable to start debugging on the web server. The web server could not find the requested resource.

You may be unlucky enough to come across this error. If you do, I’ve not found any websites which explain the issue I’ve just spent the best part of a week sorting out. I still don’t know why , but I do know how to fix.

I was using a static port setup to make it easier to develop collaboratively, use bookmarks, not get confused etc. We did this by firstly adding an entry to Tools > External tools:

The program is: C:\Program Files (x86)\Common Files\microsoft shared\DevServer\10.0\WebDev.WebServer40.EXE and this is the self-service, stand-alone Cassini server (.net4 edition) – the very same which Visual Studio launches when you hit F5 on a project.

We’ve set it up with the arguments: WebDev.WebServer /port:7070 /path:$(ProjectDir) /vpath:”/”

Then, in the Project Pages Window of the web project, we set the start page to http://localhost:7070 and the server to a custom server with a base URL of http://localhost:7070.

That way, you start the server via Tools > webserver then hit F5 which will build the site, attach to the Cassini instance on 7070 and debug.

 

That always used to work.

 

However, on a new virtual machine, for some reason, I kept getting this strange error when I tried to attach. Even if I ran the site without debugging, something wasn’t right. Very basic websites would be OK, but anything a little complicated, anything using the .NET stack, started giving really strange errors.

 

Nearly a week later, I’ve found a workaround. Basically, the way we’ve always been doing it could be a little better, because Visual Studio will let you define a static port number for the instances of Cassini which it spawns. So, go back to the project Property Pages and set everything back to how it was. Once you’ve done that (and you won’t see this bit until you do), click the project title in the Solution Explorer and press F4 for the Properties. Set Use dynamic ports to false, and set the Port number value to whatever you want.

For some reason, this works perfectly. I don’t know why. Normally I’d blame security or authentication, but I thought I’d ruled all of that out over the last couple of days.

Madness. Well, at least it works now.

 

Written by Tom Morgan

Tom is a Microsoft Teams Platform developer and Microsoft MVP who has been blogging for over a decade. Find out more.
Buy the book: Building and Developing Apps & Bots for Microsoft Teams. Now available to purchase online with free updates.

Post a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Share to Microsoft Teams