In MVC 3 and IIS 7.5 server intermittent page response issue - asp.net-mvc

In our IIS 7.5 server(load balance server) system intermittently delays the page response of an ASP.NET MVC 3 application up to 90 seconds or so, even though same page renders in 0-1 second most of the times. This happens randomly to particular page, and for POST type requests. Not able to tack the issue through IIS or fiddler. The request is http 302 post and If I run the fiddler or in chrome the issue is not coming. I am currently using IE 8. Much appriciated for the help.

I found the issue, it is due to the double post call in Ajax.

Related

Request Length ERR_CONNECTION_RESET in MVC 4 Application on IIS 7.5

I am having an issue with my application using MVC 4 and IIS 7.5 getting a net::ERR_CONNECTION_RESET errror. The page request size is 4.9MB. All of the content loads but the request says that is has not finished yet, and none of my javascript is applied. I have other pages in the application that all load fine and the Javascript is applied with no issues. There seems to be something going on with this particular page.
Checking around I discovered I needed to set the MaxRequestLength and the MaxAllowedContentLength in the web.config. I set both to 8Mb, with MaxRequestLength being in KiloBytes and MaxAllowedContentLength being in Bytes. This still resulted in the same thing, I double checked in IIS to make sure that the MaxRequestLength and MaxAllowedContentLength were both being set correctly, which they were.
Next I adjusted my query to bring back a smaller amount of data and the page request size was well under 900KB and everything seemed to work fine. I kept modifying my query to bring back more results to see what was the max request size I could go to with the page loading fine. To my surprise once the page request length reached 918KB and greater the request would keep going for about 2 minutes before resulting in a net::ERR_CONNECTION_RESET errror. Keep in mind this error only shows in firebug as the page seems to display all data fine except none of the Javascript was applied.
I only discovered this issue when putting my application on the production server. Everything worked fine on localhost. I beleive this to be something going on with the server and IIS 7.5 as putting ELMAH in the application I was unable to capture any errors.
At this point I have run out of ideas and things to try. Any additional help would be great.
I had the same problem,
That error usually is 'cause there is a problem with the Database connection.
try this
FireWall permissions
If your string connection has Trusted Connection, and your user doesn't have password it can be a problem, you must set a password or change string connection for sa.
i really hope that it works

401 Unauthorized on ajax requests

We have recently moved our webserver to a new machine (IIS based) and in the asp.net mvc application I am working on, I have noticed that in the firebug console each request fails twice with a 401 error before finally succeeding on the 3rd try. This did not happen previously and the application seems to be running slightly slower than before, though that could just be my perception.
What might be causing this issue and what might I be able to do in order to avoid it?
I ran into a similar problem couple weeks back and the below post saved my day...
https://serverfault.com/questions/137073/401-unauthorized-on-server-2008-r2-iis-7-5
I hope this may help you...
Consider trying to check your IIS pool. Or maybe a timeout expiration?

My ASP.net MVC 4 site gets slow on first request to SQL Server Express 2012

I have an ASP.net MVC 4 site and it gets slow on the first request.
It is not high slow but pages that use to long 1000-700 ms on load, the first time it longs 8-15seg. It occurs when i wait for 10 minutes for example and come back to make a request. The web site is not on production server yet. May it be when the app pool does not receive any request it goes to sleep?.
I have configured the new AutoStart mode in framework 4:
http://weblogs.asp.net/scottgu/archive/2009/09/15/auto-start-asp-net-applications-vs-2010-and-net-4-0-series.aspx
I think it may be the first request to the SQL Server Express 2012 (in the same server).
I have set the autoclose=off in the database.
What more can i do?. How could i see what is going on the first request to avoid that slow response?.
Thanks to every one who has apported to this question.
Finally i think it has to do with the idle time configuration in the App pool.
It was set 5 min (default) and i have set it 60 min. and now it goes fine!
Thanks to this question:
First request is very slow after website sits idle with ASP.NET MVC 3 (IIS7)
You can compile the views for faster performance.
The documentation is for MVC 3, but it should still work:
Compile Views in Asp.Net MVC 3 with Visual Studio

Error 500 in a ASP.NET MVC Application running on IIS 5 + Windows Server 2003

My page has an Ajax.BeginForm helper and when I submit this form, in localhost, I have success but, when I run the same page and try to submit my page on the server (Windows Server 2003 + IIS 5.0) I have a 500 Error.
Somebody know why this happens and how can I solve this problem?
Thanks.
HTTP Status 500 means "Internal Server Error" which would happen for a huge number of reasons (any server-side error will generally give this status).
Make sure your browser isn't set to show Friendly Http Messages and set customErrors=false in your web.config (or look in the Event Viewer). You should be able to get a full exception message/stacktrace.
There are too many things that could go wrong and cause this issue depending on what your code does (do you have incorrect connection strings, paths, or other settings in your config?) for us to guess the exact cause, but if you can provide an error message and stack trace, it'll be much easier for us to help.

ASP.NET MVC Ajax helpers block other Ajax requests

I have this very strange problem.
Currently I'm using ASP.NET MVC Ajax Ajax.BeginForm helper.
After it creates successful post request to server and receives response my other components that use ajax, are not able to request anything from server (Firebug just does not display any requests, at the same in another browser window I can get response from server just fine the problem is defiantly not on server side).
But when I return nothing in response to Ajax.BeginForm helper request my other ajax components are able to make requests to server.
Is it a know issue with ASP.NET Ajax or I'm doing something wrong?
Thank You very much!
Your probably crashing the application server with that request. Check your server logs. If your debugging this kind of thing happens, your maybe not catching an exception.

Resources