Windows Azure MVC 2 in Dev blank - asp.net-mvc

I been trying to create a new MVC 2 application under Azure, but when testing it in the Dev Fabric I get nothing but a blank page. What am I doing wrong?

Sometimes this is an IIS configuration issue... I'd look for "static content" and "HTTP redirection" being enabled in IIS. See http://msdn.microsoft.com/en-us/library/dd573369.aspx for a longer list of IIS features to make sure are enabled.

I got bitten by this too. There's a more discriptive thread on the msdn forums about this:
http://social.msdn.microsoft.com/Forums/en/windowsazuredevelopment/thread/0dbecc0b-d5a9-4bf7-a528-23ab793cf3ef

Related

Server 2012 IIS 8 MVC app shows default IIS home page or 403 / 404 errors

Running Microsoft Server 2012 RC using Oracle's free VirtualBox Application. Used a Bridged Network adapter type in the VirtualBox settings. Installed AD and DNS, IIS. Under the IIS options, Management Tools, clicked the box for Management Services. This allowed me to use the "Web Deploy" feature in Visual Studio 2012 RC. On the guest OS, I run Windows 7 Ultimate.
I was able to successfully deploy the MVC 4 Application to IIS Default Web Site, but it wasn't displaying. Instead, the default IIS home page was. I disabled the default home page and refreshing the page displayed a 403 page. I tried typing in one of the Views and a 404 page displayed.
I spent 2 days trying to find a solution to this, and finally did. Wanted to share with the community in case it helps anyone else.
All the articles and forum messages I ran across on the Internet started to mirror each other in one form or another.
One solution talked about making sure you have the right Application Pool configuration, using 4.0 framework and integrated. [x] Confirmed already set correctly.
Another solution extended direction to use "aspnet_regiis -i" or "aspnet_regiis -ir" which doesn't work on Microsoft Server 2012.
Another solution talked about adding the following to the web.config:
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
</system.webServer>
However, IIS 8 serves up a response to this saying something to the effect those settings are locked from a higher configuration level and can't be used at the Application level. Meh, ok.
I ultimately tracked down an article that lead me to the following page:
http://learn.iis.net/page.aspx/1097/iis-80-using-aspnet-35-and-aspnet-45
The solution was to go back to the Microsoft Server 2012 Dashboard and select the "Add Roles" feature. Scroll down to the root "Web Server (IIS)", expand "Web Server", expand "Application Development" and select "ASP.NET 3.5" and "ASP.NET 4.5" and "Install".
What confused me originally was I hadn't expanded "Application Development", but selected IIS and continued. On the next step, "Features", ".NET Framework 4.5 Features" was selected by default so I selected ".NET Framework 3.5 Features" and thought all would be fine.
After installing the selections under "Application Development", the MVC 4.5 Applications work just the way they were designed. I hope this helps anyone who may have become stuck, like I was.
I selected ".NET Framework 3.5 Features" and thought all would be fine !!!
No other actions have not helped. When this problem appeared "suddenly". For a while everything worked. But after the next publishing the app worked for a few minutes, then went into error 403.14
All you need is just to change compilation debug mode to true in web config and keep other property same.
Open your Publish Folder and open Web Config file.
<configuration>
<compilation debug="true">
</compilation>
</configuration>

IIS saying "Under Construction" for MVC site

I have created the route as described in http://www.asp.net/mvc/tutorials/older-versions/deployment/using-asp-net-mvc-with-different-versions-of-iis-vb; however, my site still doesn't show up. Instead, it displays, "Under construction The site you are trying to view does not currently have a default page. It may be in the process of being upgraded and configured. Please try this site again later. If you still experience the problem, try contacting the Web site administrator."
How can I fix this so that my MVC site shows up?
There's alot of things that could be wrong when trying to run MVC on IIS 6, but Phil Haack has 2 great blog posts about this, a general version and one if you're running .NET 4.0
There are a couple thing I'd start with though, did you uncheck the box like the image below? Like he mentions in his blog, it's easy to miss and will prevent the system from working.

How to integrate YAF in N2-based ASP.NET MVC site?

I'm building an N2-based ASP.NET MVC site, which is part of a larger Windows Azure solution. The problem I am stuck with is integrating in my project N2's own forum add-on, which is basically YAF (Yet Another Forum).
I've been wrestling with the forum for the last couple of days and after re-compiling the add-on to remove the dependency on N2.Templates.dll and following all of the steps in the Installation.txt file (part of the documentation of the add-on) I'm stuck with the forum not showing up. When I navigate to the forum I get a "403.14 - Forbidden" error.
From what I could find out it seems the problem is in the fact that the forum is based on WebForms and the containing application is MVC-based. The site is part of a Windows Azure solution and some of the things I read suggest the local IIS may not be correctly configured. However, right-clicking on the Forum.aspx page and selecting "View in browser" shows the page just fine, including navigating to subsequent pages from the YAF installation wizard. Running pure WebForms apps on the local IIS also goes without problems, so I think IIS is not the cause for YAF not showing up.
Please, if someone has any idea for solving this problem, or has done similar integration of YAF in an MVC site, let me know.
Thanks!

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.

Deploy asp.net mvc beta to iis 6 causing 404's

I'm struggling to get around the 404 errors from asp.net mvc beta when deploying on IIS 6. I had this working in one of the previews by mapping .mvc in IIS but this no longer works. I've read Omar's post and several others on the web and tried their solutions but no luck so far.
The home page opens without a problem on IIS 6 but others 404 and the site runs well on IIS 7.
Has anybody deployed asp.net mvc beta to IIS 6 with success? If so, what adjustments did you need to make to the code and/or IIS settings to get it to work?
I found a solution to my problem from Steve Sanderson's blog (Thanks Steve):
Use a wildcard mapping for aspnet_isapi.dll. This tells IIS 6 to process all requests using ASP.NET, so routing is always invoked, and there’s no problem. It’s dead easy to set up:
open IIS manager (run -> inetmgr -> OK)
right-click your app, go to Properties
then Home Directory tab, then click Configuration.
Under Wildcard application maps, click Insert (not Add, which is
confusingly just above)
then enter
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll for
“Executable”, and uncheck Verify that file exists.
I can't seem to write comments yet. So I'll write a new answer.
There are a few similar questions going around on stackoverflow.
I'm using MVC 3. I know the question was MVC 2 related. But since this is the first stackoverflow post I bumped in to, I think it's worth mentioning that:
when you use MVC 3, you need to add a new extension mapping with the executable of the .NET 4 framework (C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll)
<edit>I just found out that I even don't need to set up the extension mapping. </edit>
It still didn't work for me then :) I still had to 'Allow' ASP.NET v4.0.30319 in the Web Service Extensions section in IIS:
open IIS
click on the server node
open the Web Service Extensions section
select the ASP.NET v4.0....
right click --> Allow
Good to go!
Url rewriting can help you to solve the problem. I've implemented solution allowing to deploy MVC application at any IIS version even when virtual hosting is used.
http://www.codeproject.com/KB/aspnet/iis-aspnet-url-rewriting.aspx

Resources