开发者

System.Web.HttpException: Failed to Execute URL when running web service, MVC3

I have converted ASP.NET application to run ASP.NET and MVC 3 together. And there is some web service (/WS/Inventory.asmx/getInventory) that shows the following exception now:

    System.Web.HttpException: Failed to Execute URL.
[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) +2428801
       System.Web.HttpResponse.BeginExecuteUrlForEntireResponse(String pathOverride, NameValueCollection requestHeaders, AsyncCallback cb, Object state) +417
       System.Web.DefaultHttpHandler.BeginProcessRequest(HttpContext context, AsyncCallback callback, Object state) +192
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8862676
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184

I running it on Windows 7 with IIS 7 though there is the same exception on Windows 2003.

Here is web config section:

<system.webServer>
    <defaultDocument>
      <files>
        <add value="index.aspx" />
      </files>
    </defaultDocument>
    <httpErrors errorMode="Detailed" />
    <modules runAllManagedModulesForAllRequests="true">
      <add name="OverloadProtection" type="Winncom.Classes.HttpModules.OverloadProtection,Winncom" preCondition="managedHandler" />
      <add name="Rewrite" type="Winncom.Classes.HttpModules.Rewrite,Winncom" preCondition="managedHandler" />
      <add name="HttpCompression" type="Winncom.Classes.HttpModules.HttpCompression,Winncom" preCondition="managedHandler" />
    </modules>
    <handlers>
      <remove name="UrlRoutingHandler" />
      <add name="PageHandlerFactory-ISAPI-2.0-html" path="*.html" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" preCondition="classicMode,runtimeVersionv4.0,bitness32" />
      <add name="*.aspx_*" path="*.aspx" verb="*" type="Winncom.Classes.Service.HandlerDispatcher" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode,runtimeVersionv4.0" />
      <add name="*/cjpegimage.aspx_*" path="*/cjpegimage.aspx" verb="*" type="System.Web.UI.PageHandlerFactory" preCondition="integratedMode,runtimeVersionv2.0" />
      <add name="*/webpages/*.html_*" path="*/webpages/*.html" verb="*" type="System.Web.UI.PageHandlerFactory" preCondition="integratedMode,runtimeVersionv2.0" />
    </handlers>
    <validation validateIntegratedModeConfiguration="false" />
  </system.webServer>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Mvc" publicKeyToken=开发者_JAVA技巧"31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="3.0.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>

Any ideas would be nice. Thanks!


Try adding this to your handlers section in the web.config

<add verb="*" path="*.asmx" type="System.Web.Services.Protocols.WebServiceHandlerFactory, System.Web.Services, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false"/>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜