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

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.

Related

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

Routing problem with particular controller name using ASP.NET MVC 1 in IIS 7

I have joined a team developing an ASP.NET MVC version 1 application. I run this app on my local machine using IIS version 7.5. My operating system is Windows Server 2008 R2 Enterprise Edition. I use Visual Studio 2008 SP1 for development.
One of the controllers in this app is called ReportsController. The route table entries for this controller use 'Reports' as the controller name part. The problem I have is that, using IIS 7.5 on my local machine, I simply cannot access any of the Reports action methods. If I try to access, say, '/Reports/Index' from Chrome or Firefox, I get a 401 Unauthorized response (as seen using Fiddler) and the browser displays its username/password entry dialog.
Please note the following:
All other non-Report pages in the application work correctly.
If I add a breakpoint to Application_BeginRequest, it is not hit when requesting a Reports page.
If I change the Reports routing entries in the route table registration code so that I have to access paths like '/Reportss/Index' (note the extra 's') then these Reports pages work correctly.
I have tried deleting then recreating my Web application in IIS.
The Reports pages work fine if I run the application using the Visual Studio 2008 development server (Cassini).
There is no directory called Reports in the application directory.
The Reports pages work correctly on our UAT environment, also under IIS 7.5.
I have reviewed my IIS setting several times, including comparing them with those on UAT, and I can't see a problem.
While I can use Cassini to access the Reports pages, I would really like to understand what is causing this issue.
If you have Reporting Services installed on your machine. try to create a new web site and use it. If you have SSRS installed on your machine it uses /reports for hosting reports.
I have had problems using the directory name 'Reports' at the root of a .net 2.0 website on IIS 7.5. It generates a 503 Error, indicating that there is an error at the system level before IIS tries to serve the page. I am not sure if reporting services is installed on my server. I just changed the directory name, all links and everything worked.
I have the exact same issue in my MVC Application with reporting services installed on the same server where code was deployed. I have changed the Reporting Manager URL in "SQL Server Reporting Services Configuration" which was hostName/Reports and assigned a new name i.e. SSRSReports so the virtual directory is now hostName/SSRSReports.
Now my application as well as SSRS Reports are working as expected.

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

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.

404 error when running MVC app on IIS 7 classic pipeline

I have a MVC application that works on cassini, works on IIS 6, but I have issues with in IIS 7. I think my issue has to do with how IIS 7 handles threading in a integrated app pool. So to test my theory I'm trying to get my MVC app running in classic mode on IIS 7. I set my app pool to classic and I add a wildcard script for aspnet_isapi.dll. According to all the documentation I've found this is all I should need to do to get MVC running in IIS 7 classic. However when I try and access the web site I get a 404 error. What am I missing?
You need to turn on wildcard script mapping for MVC to work in Classic mode, I think. If not it expects an .aspx file (or similar) to exist for it to handle the execution pipeline over to .NET from IIS.
Find the "Handler mappings" icon on you rsite, and the "Add wildcard Script Map" on the right hand side.
Map it to c:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll or whatever version of the framework you are using.
A few things that come to mind right away:
Your web server may not have the ASP.MVC Framework installed, and your web app deployment doesn't include the MVC dll.
The app pool behind your web site isn't running in ASP.NET mode.
Your web bits aren't where you think they are (simple file location misunderstanding)

Can MVC run on 3.5 IIS6? NON SP1

I was lead to believe that MVC apps were BIN-deployable, so could be deployed to any ASP.net 3.5 compatible server. I'm trying to deploy to a Windows Server 2003 x64 with 3.5 (no SP1) and am having trouble getting it working.
I get the following when hitting the homepage, which redirects to the /Account/LogOn view due to our app config.
The page cannot be found
I've got the three (plus Extensions, I can't remember why) MVC dll's set to Copy Local, so they end up in the bin-folder. I'm publishing and then copying over the app to the server:
System.Web.Abstractions.dll
System.Web.Mvc.dll
System.Web.Routing.dll
System.Web.Extensions.dll
Does anyone know what I'm doing wrong? The app works on another machine we have with 3.5 SP1, and on development machines, also SP1 and with MVC installed.
I've gone over everything I can think of, ensured the permissions are correct, etc.
IIS 6 does not handle .mvc extensions correctly. Among other things you have to map .mvc to the ASP.NET handler. Here is a walkthrough for you: http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx
Have you set up wildcard mapping on the server that does not work? See "Deploying ASP.NET MVC to IIS 6" for an example. You basically need to map all requests to the ASP.NET ISAPI DLL and tell IIS not to try to verify that the file exists. Don't know if that's your issue, but it has bitten me a few times in deployments.
With IIS6, you can't do extensionless URLs like /Account/LogOn. You have to do something like /Account.aspx/LogOn The ".aspx" can really be almost any arbitrary extension, but you need that extension. Your routes need to take the extension into account as well.
Check to make sure the app pool your site is running under is configured to run ASP .Net 2.0, sometimes it defaults to 1.1 which causes issues similar to yours.

Resources