Unable to start debugging on the web server. The web server could not find the requested resource - asp.net-mvc

I'm having this error trying to debug my ASP.NET MVC app. I've set the app to "Use Local IIS Web server", and selected ASP.NET as the debugger. Running the site without debugging works just fine, but when I try to debug, I got this error:
Unable to start debugging on the web server. The web server could not find the requested source.
I'm using Visual Web Developer 2008 Express Edition.
Does anyone know how to fix this error? Thank you.

For those encountering this with Visual-Studio 2012 and/or Windows 8 do the following.
You have to add .Net 3.5 (or 4.5) to your Turn Windows Features on or off window. You get to it via :
Control Panel -> Programs -> Turn Windows Features on or off
Click the Asp.Net 3.5 and the Asp.Net 4.5 check box in the IIS > WWW Service > Application Development Features folder.

Go to your web project's properties, then the "web" tab, then make sure that you're using the Visual Studio Development Server and not Local IIS or the custom webserver. I'm on VS2010 with Win7 and another developer was developing using a custom webserver URL and not the VS Dev Server

Sounds like you are trying to develop on IIS and not iis express or development server. If you are using asp.net mvc 4, make sure that the Application Pool is framework 4. If not just make sure that your app pool it matches your asp.net mvc version.

I had the same problem, and i fixed this way:
Go to IIS Manager -> Go to the site -> Error Pages -> Actions: edit feature settings.. -> Make sure you checked "detailed errors for local requests and custom error pages for remote requests".

IF you are using IIS6 and did the add mapping for .* in IIS trick to get MVC working, when you added the .* handler to iisapi.dll you forgot to uncheck the "check the file exists" check box.

Also, be sure that the URL you're configuring in Visual Studio matches your Host Headers (Edit Bindings) in IIS. This tripped me up for about an hour this morning before I realized my very stupid error.

Having maxRequestLength or maxAllowedContentLength set to a ridiculously large or small value will also trigger this error.

What i did, was just type the IP address in the web tab instead of "localhost"

This happened to me today. Turned out to be that the default website was stopped in iis. I had been working on a second website that didn't use it for a long time. Simple fix but took me a while to see it!

The root cause for this error can often be that the Windows Service W3SVC is not started. Check that this service in Windows Services console (services.msc) is started. In IIS you will now see the the Start icon is greyed out. This means that the W3SVC service is running.

Related

Setting up Visual Studio to use local IIS on Windows 11 giving error that site is not found

I'm attempting to set up IIS on my Windows 11 computer for testing with my web applications. I can browse to the local sites without issue:
http://localhost/
http://localhost/MobileServiceForms/
I setup my project to point to this site:
This is my local IIS server:
The application folder exists. I did click the Create Virtual Directory in the project and that didn't help.
When I attempt to debug, I'm getting this message:
I checked the permissions and added the Users and myself with full control over the site and MobileServiceForms folder:
I've tried disabling the firewall completely without any luck.
This is an Asp MVC application.
Anyone have any suggestions?
Found my answer in another post, hope it helps someone else:
https://stackoverflow.com/a/56344197/302613
In order to make sure this mapping appears you need to go to control
panel -> turn windows features on or off -> .NET Framework 4.7
Advanced Services (or equiv .net ver) -> WCF Services -> HTTP
Activation

ASP.NET 5 MVC – How do I change the starting URL for an Intranet-hosted application

I require my Intranet-based project to start up in the following place with the URL: http://localhost:8082/CMWebApp
However when I run it in debug mode in Visual Studio 2015 via IIS Express or from within IIS itself it appears as:
http://localhost:8082/
I then have to type the CMWebApp bit myself onto the end of the URL in the Browser. Not a complicated thing to do I wouldn’t have thought but I have not been able to configure the Project to do this. Can anyone advise how to do so please?
Many thanks
For asp.net-5 web project here it is:
Right click on the Project -> Properties -> Debug then set the "Launch URL"
On the server environment it is not a ASP.NET 5 issue, but more of a hosting environment change. In IIS, you need to define the folder you are hosting your app as a Virtual Application under the root site and deploy to it using the deployment tool of your choice, MSDeploy I presume.

Unable to run Silverlight application from Visual Studio 2010

I'm in the process of setting up a new machine as a development environment and I'm having issues getting an existing code base that hosts a Silverlight application to work. The code runs fine on all other machines that my team uses.
Here is the error:
Error: Unhandled Error in Silverlight Application
Code: 2104
Category: InitializeError
Message: Could not download the Silverlight application. Check web server settings
I have had a Google around for some answers on this and I realize there is a duplicate question on StackOverflow already, but it does not provide enough information and the answers have not worked for me.
I am attempting to run the solution through Visual Studio 2010 Ultimate, using IIS Express 7.5 integration (as opposed to the Cassini web server). This approach works perfectly fine on all other machines, except for this one.
I have found that if I specify to use full IIS integration (instead of Express) and select the SilverlightTestPage.aspx as the start up page, then the application runs (although not perfectly). Also, if I publish the application and host it on IIS, it again works fine. However, when running through Cassini or IIS Express 7.5 integration, or when trying to get it to run through the Default.aspx or correct start up page it does not work.
Does anyone have any ideas what this might be? I've already checked that the MIME type in IIS is correct (not sure if I can do this in IIS Express as well?) and that the XAP files are building into the correct directory.
Check MIME types in IIS Express configuration file %userprofile%\documents\iisexpress\config\applicationhost.config and make sure that you have MIME types set correctly and restart IIS Express.
Please check the aspx file whether it has the "minRuntimeVersion" correctly for the Silverlight plug in.
<param name="minRuntimeVersion" value="4.0.50826.0"/>
also check the following link for hosting the Silverlight application .
Configuring IIS for silverlight

ASP.NET MVC project won't start under IIS 5.1 on Windows XP SP3

I've a ASP.NET MVC 2 project that runs fine under Windows 7 and will start on Windows XP if I use the Visual Studio Development Server, however, starting under IIS generates an error:
Unable to start debugging on the web server
With the message
The specified procedure could not be found
No errors in the system event viewer.
If I start without debugging I get an "HTTP 500 Internal Server Error"
The reason I run it under IIS is the project also includes some WCF wsHttp web services that use certificates, so the VS Development Server is not adequate for hosting those.
I have already seen the links on SO that talk about adding the wildcard mapping. I've already done that, just as I've done on Windows Server 2003 where I successfully host ASP.NET MVC RC2 for quite a while.
See if this helps - its possible but not ideal:
http://blogs.microsoft.co.il/blogs/dorony/archive/2007/12/15/using-asp-net-mvc-on-iis-5.aspx
Check out this blog it might help. IIS 6 and under does not easily support MVC Routing.
http://weblogs.asp.net/scottgu/archive/2007/12/03/asp-net-mvc-framework-part-2-url-routing.aspx
The error said "procedure could not be found" so I double checked the ISAPI dll.
Turns out when I added the wildcard mapping to ISAPI, I picked aspnet_filter.dll instead of aspnet_isapi.dll. Once I switched it, the app starts up fine and serves pages fine.

Unable to get a fresh ASP.NET MVC project running with Visual Studio 2008

This is a very basic question. I feel kind of silly asking about it but I'm kind of stuck and hopefully some here can save me some time. So I open VS2008 go to file new ASP.NET MVC Web Application and click ok. I choose to create the test project. I hit F5 to debug my new MVC project. Then I choose to modify the Web.Config file to enable debugging. It goes to http://localhost:57323/ where I get a page load error.
Firefox can't establish a connection to the server at localhost:57323.
Is there something special I need to do for vista? Or is there something I need to do with IIS.
Thanks for helping a noob.
6/30/2009 Update
Ok, I think I might have to re-install VS2008. The ASP.NET Development Server does open up with the port. I think I've tried everything that has been suggested. I've marked Default.aspx as the start page. I've tried to open it in FireFox/ie 8/ and chrome. I tried uninstalling/reinstalling asp.net MVC that didn't work. I tried telneting in with putty to localhost and port 55992 as telnet doesn't appear to be part of Vista. Just trying to create a web project doesn't appear to work. So I really think it might be visual studio. Oh well, it's just a little frustrating but sometimes it's part of the deal.
Its not IIS, VS2008 uses an integrated web hosting container. When your site loads you should see it in your taskbar, it looks like a web page with a gear on it. When you hover over it it should say, "ASP.NET Development Server - Port X". First thing you can do is make sure that loads up, and if it does we can go from there.
Hit F5, wait for the error in firefox. The go to a command window and "TELNET localhost 57323". Your screen will go black, then type "GET /", hit enter (you won't see any keystrokes). This simulates the connection firefox should be doing. You should see the HTML output of your app - if not, then something is wrong with firefox (maybe configured to use a proxy?), try it in IE. If it doesn't work - as people have already said: there's a problem with ASP.NET Development Server.
When you run an ASP.NET site from within visual studio 2008, it should start up a small, integrated ASP.NET web server for you. Its called the ASP.NET Development Server, and you should get an icon in your system tray when you debug. Your site isn't actually hosted in IIS unless you configure the project to do so, and deploy the site there yourself. If you do not see this integrated web server start up, then it is possible that your VS2008 install did not complete successfully, or that you have your project configured to host in IIS.
Like these guys said a web server starts up when you start debugging through Visual Studio. In your case I think you should right-click on the file named Default.aspx and select Set as Startup Page, and then start debugging.
Sayed Ibrahim Hashimi

Resources