开发者

IIS7 doesn't seem to like <soapExtensionTypes>, what's the alternative?

I'm essentially logging errors to ELMAH in the same way as this SO answer suggests but initially I got an error from IIS suggesting the setting wasn't used and then when I cleared up the error (by turning of legacy config validation) my hooks don't appear to be called.

HTTP Error 500.22 - Internal Server Error
An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.

Most likely causes:

    * This application defines configuration in the system.web/httpModules section.

I know a bunch of the settings like system.web/httpModules need to be migrated to system.webServer but I can't seem to figure out what to do about the soapExtensionTypes config setting.

<webServices>
  <soapExtensionTy开发者_StackOverflow中文版pes>
    <add type="ModuleName.SoapExceptionHandler, ModuleName" priority="1" group="0" />
  </soapExtensionTypes>
</webServices>

What do I need to do to get my SoapExtension to get loaded into the pipeline?

Alternatively am I just wrong and it should work but I've goofed it?

Update: In my httpModules section I now have,

<httpModules>
  <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />
</httpModules>


Based on what you have posted here, everything should work fine (and I've actually used a similar strategy to this in the past).

My guess is that you have other handlers registered in the system.web/httpModules section of the web.config.

It would help if you could post the rest of the web.config (minus any sensitive information such as connection strings, etc.) so that we can see anywhere else the problem may lie.

UPDATE

I think you might also have to move the Elmah Module configuration out of the httpModules section. They get migrated to the following spot:

<webServices>
    <soapExtensionTypes>
        <add type="ModuleName.SoapExceptionHandler, ModuleName" 
             priority="1"
             group="0" />
    </soapExtensionTypes>
    <modules>
        <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />
    </modules>
</webServices>
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜