Debugging Error 101 (net::ERR_CONNECTION_RESET) on asp.net site - c#

I am developing a new site in asp.net (c#) and sometimes I get an Error 101 (net::ERR_CONNECTION_RESET) in Chrome. If I then open "Tools" in Chrome and clear the browsing data and reload the page, everything seems to work again. I experience this error from time to time but have not been able to identify why I am getting the error nor a pattern.
I have tried setting customErrors=off but the errorpage is never shown.
Any help on how to debug the error is much appreciated!
thanks
Thomas

It turned out to be my antivirus-programme

This solution working fine in my code..
Add below code in web.config file.
<system.web>
<httpRuntime executionTimeout="999" maxRequestLength="2097151"/>
</system.web>
Refer from : ERR_CONNECTION_RESET: The connection was reset when uploading a large file

Related

Is there a way in Visual Studio to configure the default start page for web deployment starting from Empty ASP.NET Web App?

Entry level web developer here, thank you in advance.
A very basic single page website starting from Empty ASP.NET Web Application adding each and folder file from scratch. Everything works fine locally bare bones. I'm trying to configure the start page in the subfolder "html" to the file index.html. I get the default "This website has been successfully created" after publishing. Azure web service is working fine because I can go to site.azurewebsites.net/html/index.html to see my page after it's published.
Right clicking the project and going to properties to set as start page, or going to Properties>Specific Page doesn't work as suggested here for deployment but works fine locally. Altering the web.config file as suggested here gives me an internal server error that is fixed once I remove the code
<system.webServer>
<defaultDocument enabled="true">
<files>
<clear />
<add value="html/index.html"/>
</files>
</defaultDocument>
</system.webServer>
I tried different variations of this all with the same internal server error. Is my syntax correct?
I then created a global.asax file and changed the Application_Start line as suggested here:
protected void Application_Start(object sender, EventArgs e)
{
Response.Redirect("/HTML/index.html");
}
Same result.
Lastly, I created an App_Code folder with a RedirectHandler.cs file as suggested by Rion Williams's last suggestion (first link) along with his code and sure enough I get the same result.
"This web app has been successfully created" after publish but I see my desired start page after adding /html/index.html to the end of the url.
Understanding how basic this problem is I took extra care to exhaust as many google searches as I could find relating to the topic before asking this question. My first question on StackO so my reputation is too low to link each page I found. My next attempt is to just start a brand new MVC project and painstakingly rearrange every single file that way. I'm confident that will work but I didn't want to leave this simpler method without learning from what I did wrong especially when I know the answer is going to derp-slap me in the face.
Have you tried to configure the default document under the configuration tab for your website in Azure portal?
With a lot of changing file locations around, clearing cache, and rebooting to avoid server and runtime errors, #hernandgr had the simple option I hadn't known about (shame on me) and funny enough couldn't successfully google about.
It turns out that I didn't need to do any of the steps I had tried to configure the start page beyond just changing it in the configuration tab in the Azure Management Portal. I deleted the global.asax file and the App_Code folder completely, didn't need to touch the web.config in any way and didn't need to implement MVC.
One thing to be noted was that making index.html my start page through Azure seemed to push it up a directory so my CSS, JS, LESS, fonts, and images folders had to be moved up as well to display the page properly.

IIS7.5 throwing 404.17 error asp.net 4.0 webapplication

I just deployed simple webapplication inside iis7.5 in win 7. No fancy stuff and simple web.config file. it throwing 404.17 error.
If I place index.html file. it works fine.. looks like asp.net and aspx page not working here.
Any suggestion will help me.
Edit: As makemoney2010 said,
I did revert to parent, but still not working. see below image which is handler mappings, anything missing here?
it is simple.it has not permission to execute script or those are not handled in iss configuration.You need to solve it.Click on you site select Mapping hanbdler and then from right pain revert to parent....even check permission on your folder. that's all and it should solve your issue
UPDATE:
This is tipical configuration of my webserver.
If you need assistance to setup your webserver i can help you contact me on skype with id turri.giorgio and i can help you via video conference or team viewer.
![enter image description here][1]

The page was not displayed because the request entity is too large on IIS

I'm getting the following error while redirecting one page to another web page:
"the page was not displayed because the request entity is too large.".
The page from which I'm redirecting to another page contains a huge amount of data, so basically I know the cause of the issue.
However, I'm looking out for a working solution for this. Secondly, when I researched this issue I found such kind of problem generates when any large file gets uploaded.
But I'm not uploading any large file, its just the page itself contains large data. Prompt solution will be appreciated.
I think this will fix the issue if you have SSL enabled:
Setting uploadReadAheadSize in applicationHost.config file on IIS7.5 would resolve your issue in both cases. You can modify this value directly in applicationhost.config.
Select the site under Default Web Site
Select Configuration Editor
Within Section Dropdown, select "system.webServer/serverRuntime"
Enter a higher value for "uploadReadAheadSize" such as 1048576 bytes. Default is 49152 bytes.
During client renegotiation process, the request entity body must be preloaded using SSL preload. SSL preload will use the value of the UploadReadAheadSize metabase property, which is used for ISAPI extensions
Reference.
I got it working by doing the following
Go to IIS.
Click on the server name
In the features (icons), chose the configuration editor.
Click on the dropdowns on the top with Settings
Traverse the path system.webServer -> security -> requestFiltering -> maxAllowedContentLength and set it to 334217728. (Then hit enter and then apply on the top right).
You can also restart the webserver for good measure.
After that I could upload my 150k database to phpymyadmin.
I also set post_max size to 8000 in php.ini in programs/PHP/phpversion/php.ini
It may be overkill for the sizes but it gets the job done when you've got big files.
For me, uploadReadAheadSize did not fix my issue.
I changed both of these settings in my asp.net web.config and finally the file uploaded for me:
<system.web>
<system.webServer
<httpRuntime executionTimeout="999999" maxRequestLength="20000" requestValidationMode="2.0" /> <!-- 20 MB -->
</system.web>
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="20500000" /> <!-- 20.5 MB - making it match maxRequestLength to fix issue with uploading 20mb file -->
</requestFiltering>
</security>
</system.webServer>
Another possible cause is an Authentication setting. Within IIS7,
Select the site under Default Web Site
Select Authentication
Select Windows Authentication and enable. Disable all others.
While Windows Authentication is still selected, click on Advanced Settings in the Actions pane.
Make sure Extended Protection is on Accept and check the Enable Kernel-mode authentication
I had the same error and the above fix did not work. I was only on HTTP (localhost)
However this fixed the 413 error
Set-WebConfigurationProperty -filter /system.webserver/security/requestfiltering/requestLimits -name maxAllowedContentLength -value 134217728
I did the above but still had no joy.
What fixed the problem for me was also upping the request limits:
- Select site in IIS manager
- Click "Edit feature settings" from right hand menu
- Insert 200000000 for "Maximum allowed content length"
In my case, the error occurred when downloading a file.
The reason was, that I had a code that explicitely sends an HTTP 413 to the client in an (erroneous) case.
(See here for details).
So be aware of the fact that setting an HTTP response code 413 in your code (or in a library that you are using) also can generate the OP's error message.

Write and display error message for live website?

I am developing a website, At the moment when i run it off my local host every thing works fine.
I have uploaded this website to fireFTP and can now access my website online.
The website does not preform the same as when hosted on local host and i cant find the errors as my website does not break.
I would like to do some testing and am wanting to know how to display an error message??
I would like to display the error message like this:
But with a custom message like, "code stepped into method writeToSpreadSheet".
This way i could find where my code gets to and pin point whats going wrong.
You need to enable show detailed error messages in IIS settings, see the link below for a short tutorial about how to do it.
IIS7 : HOW TO enable the detailed error messages for the website while browsed from for the client browsers?
Add this lines in web.config inside so you dont have
to touch the IIS configuration:
<customErrors mode="On">
<error redirect="error404.html" statusCode="404" />
</customErrors>
Change the error404.html for your desired html page.
When some page is not found user will be redirected there

Error 101 (net::ERR_CONNECTION_RESET): The connection was reset

I have develop a small asp.net MVC3 application in that i have upload a video files into Application server path.When i upload 2MB video file it is uploded .But when itry to upload 50mb file it is showing error like .
This webpage is not available
The webpage at http://localhost:1318/Campaign/Advertises might be temporarily down or it
may have moved permanently to a new web address.
Here are some suggestions:
Reload this web page later.
Error 101 (net::ERR_CONNECTION_RESET): The connection was reset.
I have set the execution time and maxrequested length in web.config file.
<httpRuntime maxRequestLength="20480" executionTimeout="12000"/>
How can i solve this please help me..
<httpRuntime maxRequestLength="51200" executionTimeout="0"/>
Here
executionTimeout="0" takes unlimited time
maxRequestLength="51200" for 1mb=1024 so for 50mb=51200
Just to make the answer more complete for the next guy:
httpRuntime goes in <system.web>
executionTimeout value of 0 only works for some versions of IIS

Categories