HTTP Error 500.22 - Internal Server Error - MVC 5 Application From IIS - asp.net-mvc

I am really stuck with an issue in my MVC 5 application from IIS 7.5 sever. Application works fine in my local developing environment but it failed in server. I am sure that the issue is related to URL routing. I can sea my application home page but if i take some link(Link to any application route(Page)), then IIS is showing 500.22 issues.
I tried many solution to fix this issue.
1- Changed mode from Integrated to Classic
2- Added some patches mentioned in https://support.microsoft.com/en-us/kb/980368
3- validateIntegratedModeConfiguration="false"
Finally i installed MVC in my server machine also. Still no hope. Keep getting 500.22 error in case of route. I added some log writing functionality but i coudn't find any log related to that. In case of routing something else happen from IIS.
I am really stuck with issue. If anyone know any info related to this. then please help me.
Thanks in Advance.

Related

ASP .NET MVC 500 Internal Server Error - on Get and Post - same application / different servers

I'm trying to help our System Admins here, so please don't beat me up for my lack of knowledge. We can run the application locally and we can build and deploy to our Test Server and the application reports work as expected. But when we deploy to our Production Server, many of the Get and Post Ajax calls are getting 500 errors. Essentially, all reports run everywhere EXCEPT on the Production Server.
This is an ASP .NET MVC application with the views being Razor HTML and JavaScript. The model, controllers, and services are all in C#. IIS 8.5 web server and SQL Server for the database.
I've Googled and tried everything I could find. More detailed errors show us the service call that fails along with the parameters and all looks good. Again the application reports run fine in all environments other than the Production Server. Does anyone have any idea why this is happening and what we should be looking at to resolve the issue?
Thank you in advance.
Just turn off custom errors in the web.config file
<system.web>
<customErrors mode="Off">
</system.web>
and then open up the development tools in a browser during one of the GET requests and replay the GET yourself. Should get the exact error message back.
It took us all day to figure out that one of the parameter tables did not have the appropriate permissions. Which would explain why some reports ran while others consistently returned a 500 error.

Web Config Issue with IIS 7.5 MVC 5 App

So I have an MVC 5 application which has been running fine and is published to two individual servers, with the same configuration, however one gives http status 500, the other works perfectly. Both servers are exactly the same windows release, and patched up to asp.net 4.5.1.
Browsing the site locally gives the source of the problem as the web.config file, with the relevant config source lines being -1: and 0: Both showing blank lines.
I've no idea what's going on with this one. I have copied the app in its entirety back from the working instance to the none working instance no avail.
I'm a bit stumped.
To note, i've also removed IIS and reinstalled as i thought that could be the cause of the issue.
So after much headscratching it turns out that some clown removed URL Rewrite module from this box. After reinstalling using the web platform installer all is well. I hope somebody finds this useful in future.
Nicolas Carlo, your response pushed me down an alternate route of diagnosing the problem and was helpful in this instance, thank you.

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.

Deploying ASP MVC 5 App with IIS 7.5

I try to deploy ASP MVC 5 app in virtual directory (without creating new iis application)
I use IIS 7.5
I already put
<modules runAllManagedModulesForAllRequests="true"/>
<directoryBrowse enabled="true" />
in web.config file.
But when i go to app url with IE browser it shows me just directory listing like in screenshot below
Is there a way to deploy MVC 5 in virtual directory and make it work like usual MVC application?
You need to convert the virtual directory to application. Right click on it in the IIS management console and choose Convert To Application.... Also make sure that the associated application is configured to use Integrated Pipeline Mode.
I solved this problem earlier in my production environment by checking the directory pointer in IIS. Apparently when I unzipped the deployed site from one server to the next, the zip utility made an extra level, so IIS was pointing to /MyProject when the files were in /MyProject/MyProject. I had a little better clue though, you have Document Browsing enabled based on that screen shot, make sure not to do that in production. I set the site to log custom errors and got a 403.14 response, from there found a blog on my mistake. You need to setup the environment to find the specific module that's failing, I think something to do with trace routes, idk. I'm a software developer that always gets forced into doing devOps; was googling my own problem and thought I'd throw you a line. Without a specific error message, all I can tell you is IIS is not connecting to .NET; something is not configured correctly. Turn off directory browsing, google how to get good error logs back, and let us know the status code so we can help you: 403.14, 401, 500, 404? Also give us the module that's failing. If it's the last one on the handler list, guess what, IIS isn't connecting to the app, which I suspect is your case.

eh.js and eh.css in IIS log

I just deployed a new MVC 4 web application and have been keeping an eye on the IIS logs to make sure everything is running smoothly. I noticed that some user's browser's request two files that do not exist in my project and I have no idea what they are: eh.js & eh.css. These two files are not part of my project and I don't know why they are being requested from the server, IIS returns 404. Has anyone else ran into this? Can anyone tell me what eh.js & eh.css are?
Well I feel sheepish, eh.js and eh.css are resources on my organization's error page.

Resources