Click here to Skip to main content
16,016,425 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am trying to execute my custom Http Handler for pdf request. For the same I have following configuration in my Asp.Net Application : 

<authentication mode="Windows" />
<identity impersonate="true" />

Application Pool has set as Managed Pipeline mode to Classic mode and Identity to Network Service. 

For Handler, I added Script Map in configuration file as :

<system.webServer>
  <handlers>
    <add name="PdfFileHandle" path="*.pdf" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" resourceType="File" preCondition="classicMode,runtimeVersionv4.0,bitness64" />
  </handlers>
</system.webServer>


I ran my application and i am getting this error. Please help to fix this issue. 



Error:
Quote:

Server Error in '/' Application.

Failed to Execute URL.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Failed to Execute URL.

Source Error:


An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:



[HttpException (0x80004005): Failed to Execute URL.]
System.Web.Hosting.ISAPIWorkerRequestInProcForIIS6.BeginExecuteUrl(String url, String method, String childHeaders, Boolean sendHeaders, Boolean addUserIndo, IntPtr token, String name, String authType, Byte[] entity, AsyncCallback cb, Object state) +919
System.Web.HttpResponse.BeginExecuteUrlForEntireResponse(String pathOverride, NameValueCollection requestHeaders, AsyncCallback cb, Object state) +624
System.Web.DefaultHttpHandler.BeginProcessRequest(HttpContext context, AsyncCallback callback, Object state) +240
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +923
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +137




Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1073.0


What I have tried:

I tried changing resource type to unspecified. But it did not help help.

<system.webServer>
  <handlers>
    <add name="PdfFileHandle" path="*.pdf" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv4.0,bitness64" />
  </handlers>
</system.webServer>
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900