Asp.Net-MVC application dying - asp.net-mvc

I have a strange issue with an Asp.NET MVC application.
Using Asp.NET MVC 3 Preview 1 on IIS 7.5 - Integrated
After building the application everything runs fine. Then after some random amount of time (or sometimes after updating a view or js file) the application dies.
Meaning, requesting the root page, I get the 403 error and requesting any other page I get a 404 error.
After a rebuild everything works fine again for a little while until it dies again.
I am seeing this on two different development machines. Also, I have another application which is very similar (MVC 3, IIS etc) on both dev machines and this one runs without problem. I have inspected the config files in detail and cannot see anything of notable difference.
Does anyone know what could cause an application to die or where to look for further information? (I can still access elmah.axd though no information is there).

There's not much to go on here, but the 403 and 404 are clues that at least ASP.NET routing is not working; 403 is coming back because the web server thinks you want to do a directory browse, 404 because your request doesn't have a valid corresponding resource.
Since you are using the new version of MVC, I would suspect the issue may lye there. When you get the error condition, can you browse to a regular .aspx page? Does it execute server side code correctly?
You have the site hosted in IIS 7.5, not just the built in Visual Studio web server, right? Is it possible to turn on monitoring/event logging to see if IIS is taking a hit?
I apologize for not having any actual answer, sounds like you have a tough issue to debug.
Good Luck!

Related

MVC precompiled site "HTTP Error 403.14 - Forbidden" suddenly appeared after 11 months

I have a precompiled MVC site which runs successfully on multiple servers, and on multiple sites within each server.
One particular site a few days ago suddenly stopped working, returning
HTTP Error 403.14 - Forbidden
I couldn't find anything that would cause it, and rebuilt the site using the same source code as other sites on the same server, in a different folder, and the site ran fine for about 24 hours before once again suddenly experiencing the same error.
There is nothing in the Windows logs (Win 2K12 Server) or in the IIS (6.2) logs (other than confirming the 403). This particular site is running on a Virtual Server in Azure, but plenty of other sites are too, including on the same virtual server using the same source code and settings (other than domain name bindings).
I've currently moved the binding to a different process which is working fine, but I really need to get to the bottom of this in case it suddenly happens again.
I've googled this for days without success. Turning on directory browsing works, but of course not something I can or want to permanently do with MVC. Both home and MVC route requests return the same result, but calls for specific files (eg, a text file in a sub-folder) are successful. That certainly suggests a MVC-specific issue. But I can't work out how to specifically isolate the issue.
Obviously I've reset the application pool, the site itself, and indeed set up a new site using the same application pool (which is working currently, but I'm worried it too will suddenly break at the worst time).
Does anyone have any pointers for working out the main cause, please?

ASP.NET 4.5.1 MVC 5 application not loading in browser. Failed to open http://

Problem
I am using windows authentication with MVC5 ASP.NET application. When I went to the url of the application on my intranet, I typed in (just for example), http://derp.herp.edu. As expected, it
asked me for my login credentials on the domain. I entered these.
I then get a completely blank page. No error message. Just a white screen. I then fired up the debugger in my browser and it simply states:
Failed to open http://derp.herp.edu
Details
I don't even know where to find an error for this? I have no clue to what is causing this. I've been trying to look for logs, but since I am new to IIS7.5 I am not sure I am looking at the right ones.
I just deployed the MVC5 on an IIS7.5 Windows 2008 R2 server. It is my belief that the IIS I am trying to deploy this on is on a secured VLAN.
Attempts
Launched locally on my machine IIS7.5. It works. What the heck?
Moved to wwwroot of the inetpub file to make sure file permissions are okay on server.
Associated the default web site on IIS7.5 to the domain name. I can see it on my local machine and the server in the browser.
Thus, we know the domain name works. We know that authentication is trying to work. But something is going wrong when it tries to display the MVC 5 .NET application.
I figured out the error. It was a completely silent error as the browser was just sitting there not doing anything. I started checking IIS and noticed that .NET compilation had some problems. I found the fix at ASPNET4BreakingChangesAndStuffToBeAwareOf.

ASP.NET4.0 MVC4 IIS7.5 Error 403.14 I'm Literally Pulling Out My Hair

I want to get away from developing in PHP but doing that is proving to be a massive headache.
I am trying to set up a website with MVC 4, ASP.NET 4.0, on Win7 Professional (64-bit). The website is just the basic site that is set up with Visual Web Developer 2010 Express selecting New Project > C# > Website > ASP.NET MVC 4 Application.
After setting up the application in IIS7.5 I am getting an HTTP Error 403.14 - Forbidden. I've done a ton of research and tried multiple different suggestions on how to solve the problem but NOTHING is working. Here are some things I tried:
Install/Register v4 of ASP.NET. This has been the most annoying
thing because everyone else's issue is fixed when they do this but
mine is not.
Changing the application pool settings:
Set to classic/integrated mode
Change the user/permissions used by the application pool
Made sure 32-bit applications were enabled
Added security permissions to folders related to the website (on multiple accounts)
I can get a regular html document to show up if I add it to the websites root directory. It seems that the MVC stack is not being called at all. The server wants to display the directory, which I can enable/disable, but the website is not being displayed.
Please can I have more potential fixes before I resort to my last desperate act? A baseball bat.
p.s. I'm more than willing to do a skype conversation or a share screen kind of thing if someone wants to dig in deep. I am beyond frustrated with this.
So it seems, in my indefinite well of stupidity, I was pointing the webserver to the incorrect folder. I needed to point the webserver to the folder with actual files of the application rather than the folder containing the .SLN file. Sorry to waste your time!
try running the aspnet_regiis
http://msdn.microsoft.com/en-us/library/k6h9cz8h.aspx
open the command line in %windir%\Microsoft.NET\Framework64\v4.0.30319 and run
aspnet_regiis -ir
other possible solutions:
quit skype, or any other similar applications

Application pool reset breaks ASP site

I am seeing a weird behavior on IIS7 on Windows 2008. I have an ASP MVC application installed and fully functioning. Every time i reset its application pool, the website stops working and displays a 404 error.
The only workaround I found for this is:
1. Rename default.aspx, global.aspx, and web.config to something else
2. Create a simple index.htm file and place it in the root
3. Browse to the site (which correctly displays index.htm)
4. Rename the three files back
At that point the site will load properly and work as expected. Anyone has any idea why that would happen?
Thanks!
Check out the Windows Event Viewer, under Application. The website might be throwing an exception each time it attempts to restart.

View not found exception when runnig an ASP.NET MVC site from a network share

I'm getting a View not found exception when my ASP.NET MVC site is configured with is home directory pointing to a network share in IIS.
The weird thing is that this error appears intermittently, sometimes the view loads fine and others the same view fails.
I've tested this in IIS 6 and 7, both have the same problem.
I also have other ASP.NET WebForms sites on the same web server configured in the same fashion (files from a network share) and they have no problems, which makes me I think this is a bug in the MVC framework, specifically in the view look up process.
Have anyone else experienced something similar and/or know a solution?
Thanks,
Rafael.
The connection to shared drives is not persistent, meaning that the connections are "refreshed" in a sense when accessed. Since web forms compiles the entire site at run time the pages are accessed once during the compilation process (in a pre-compiled app you down even actually need the aspx pages).
However in MVC only the code in the controllers is compiled, leaving the views to be accessed by request at run time. If the view is not immediately available the MVC engine will throw an exception.
So if you hit MVC app the first time it will throw an error saying it can't find the view, but on subsequent requests immediately after it should find the view without issue. Until the connection state to the shared folder is closed, when you will get the error again.

Resources