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

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.

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

status code 500 internal server error in LoadRunner

I have a web application which i need to be load tested using LoadRunner. When I record the website using vugen it works good and there is no any application bug. But when I tried to replay the script, script failed after login and while navigating to next page, say, Transaction. At the end of log, I receive error:
Action.c(252): Error -26612: HTTP Status-Code=500 (Internal Server Error)
for "http://rob.com/common/transaction
Please help me to resolve this error.
LoadRunner generates HTTP request just as your browser does, this error is the same error you would get if you would go to that URL using your browser. Error code 500 is a generic server error that is returned when there is no better (more specific error to return).
Most likely the login process requires some form of authentication which is protected against a replay attack by using some form of token. It is up to you to capture this token using Correlations in LoadRunner and replay it as the server expects. The Correlation Studio in VuGen should detect and identify the token for you but since authentication methods vary it is sometimes impossible to do this automatically and you will have to create manual correlation. Please consult the product documentation for more details on how to do it. If your website is publicly available online then post its URL and I will try to record the script on my machine.
Thanks,
Boris.
Most common reasons
You are not checking each request for a valid result being returned and using a 200 HTTP status as an assumed correct step without examining the content of what is being returned. As a result when data being returned is incorrect you are not branching the code to handle the exception. Go one to two steps beyond where your business process has come off the rails with an assumptive success and you will have a 500 status message for an out of context action occurring 100% of the time.
Missed dynamic element. Record three times. Compare the code. Address the changing components.

Finding 404 errors logged in database: '../:/0'

All the errors that occur in our web application is logged to a database, and I'm finding a 404 error occurring hundreds of times in the last month. The page users are attempting to access is "https://companysite.com/applicationsite/:/0"
The application is a classic ASP site with some ASP.NET MVC 3 included through i-frames, although this error appears to be occurring on the classical ASP side judging by the URL.
I've done a search through the entire code (classic and .NET) for the string ":/0" but I'm not seeing anything. I'm at a loss at how this error is occurring. It is happening too often and for too many users to be intentional.
Would anyone happen to know why users are getting this error? Unfortunately I only have the database logs so I'm not really user how to reproduce this error, nor do I know how users are coming across it.
I would suspect that someone (outside of your site) is hitting that URL, which does not exist.
It could simply be that a spider has that URL indexed and is trying to crawl it. Or maybe that is a path to some application that has a vulnerability and someone is testing to see if you are running that application.
Try logging the IP address of where the request is coming from and also the User-Agent. If it is a web crawler, you should be able to see it in the User-Agent.
You could also block the IP address from accessing your site.

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?

Web part async postback getting Sys.WebForms.PageRequestManagerParserErrorException

Error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near '
http://servername/ScriptResource.axd?d=EltQ7pexCbRndWc7D3a....b2a49de
Line: 5
I recently converted a SmartPart + UserControl web part to a 'real' web part. The user control part remained essentially unchanged and contains an UpdatePanel. The aim is to have an interactive calendar control which updates its own data but does not cause a full page refresh. The main reason for converting to a real web part is to make use of personal storage so that users can choose a particular setting and store it.
The problem I now have is that when one of the LinkButtons in my web part are clicked I get the error listed above. I am not doing any Response.Writes and there don't seem to be any HttpHeader entries in IIS.
Can anyone help here? Thanks.
New clue
Just noticed that the postback events work when the page is checked out but not when it has been published. What is the significance of this?
Have you added the sharepoint script manager:
http://msdn.microsoft.com/en-us/library/ff650218.aspx
It sounds like a HttpModule is altering the json postback of the update panel

Resources