tags:

views:

163

answers:

1

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>
  <soapExtensionTypes>
    <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>
A: 

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>
Justin Niessner
Thanks. I'm getting the impression I've lost the plot somewhere. I just haven't figured out what I'm doing wrong. I'm starting to wonder if I screwed something up in the migration to VS2010.
Colin Newell
@Colin Newell - I've had issues with migrations to VS2010 as well. Did you change the target Framework version when you migrated, or just move the solution from 2008 to 2010?
Justin Niessner
I kept the framework version the same and moved from 2008 -> 2010
Colin Newell
@Colin Newell - Can you post what is left in your httpModules section?
Justin Niessner
@Justin Niessner - added that to the question.
Colin Newell
@Colin Newell - Updated my answer. In short...get rid of the httpModules section and migrate it per my answer.
Justin Niessner