ASP.NET 4.0 Web Application Throws "Invalid Function. (Exception from HRESULT: 0x80070001)"

The application is written in ASP.NET 4.0, hosted in IIS 7.5, on a machine running Windows Server 2008 R2. The application pool uses the built-in managed pipeline mode.

The exception below is thrown on several different pages that have nothing in common. I cannot reproduce the exception myself, but it happened 10 times last week in a production environment.

From the stack trace, I see that the exception was thrown using the HttpRequest.GetEntireRawContent method, so I was wondering if there was something wrong with the request, for example, it is too long or contains an invalid character.

Just to be clear, this exception is not thrown from the code I wrote from within the System.Web namespace. Therefore, I cannot add an attempt ... to catch him.

I would be ready for any ideas due to an exception or troubleshooting steps to find out more information.

Exception: System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.Web.HttpException (0x80004005): An error occurred while communicating with the remote host. The error code is 0x80070001. ---> System.Runtime.InteropServices.COMException (0x80070001): Incorrect function. (Exception from HRESULT: 0x80070001) at System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32 result, Boolean throwOnDisconnect) at System.Web.Hosting.IIS7WorkerRequest.ReadEntityCoreSync(Byte[] buffer, Int32 offset, Int32 size) at System.Web.HttpRequest.GetEntireRawContent() at System.Web.HttpRequest.FillInFormCollection() at System.Web.HttpRequest.get_Form() at System.Web.HttpRequest.get_HasForm() at System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) at System.Web.UI.Page.DeterminePostBackMode() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.report_openinghours_aspx.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) 

EDIT:

As lukiffer pointed out, there is a similar question here: https://stackoverflow.com/a/166758/ The proposed solution is to disable TCP offloading, as I understand that TCP offloading protects the web server from the great complexity of TCP. Therefore, disabling this mode would require a large number of processor cycles to slow down the operation of web servers, which is clearly undesirable.

I also don't understand why TCP offloading can cause IIS to throw an exception.

+8
exception comexception
source share
1 answer

You may not have this problem yet, but if others are facing this problem, there is a link here that might help.

TechNet Forum

The NIC driver TCP driver offload settings must be set to physicla nIC level (the hostname that the external virtual network uses). Make sure that you do not turn off the chimney and thinking that you will turn off “Task Completion”. In the settings, the driver - these are options with "unloading" in the name - these are options for disabling.

  • Disable power management on the phsycial NIC (some drivers include this).

  • Try the physical Intel NIC (the least problematic of all with Hyper-V)

  • Verify that the ICs in the VM are equal to the host.

  • Check for other problems with the virtual machine, such as a resource, a diving CPU or an IO drive, or something else that could cause a freeze.

0
source share

All Articles