Setup: Custom authentication module: 500 – Internal server error

Issue

When I test my custom authentication module with WorkflowGen I get this error:

500 Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.

Solution

Use the correct web.config settings listed below according to your configuration:

Case 1: IIS 7.0+ with application pool in Integrated pipeline mode

<configuration>
    <system.webServer>
        <modules>
            <add name="MyAuthModuleName" type=" MyAuthModuleName.MyModule, MyAuthModuleName " />
        </modules>
    </system.webServer>
</configuration>

Case 2: IIS 5.0 and 6.0, or IIS 7.0+ with the application in Classic pipeline mode)

<configuration>
    <system.web>
        <httpModules>
            <add name="MyAuthModuleName" type=" MyAuthModuleName.MyModule, MyAuthModuleName " />
        </httpModules>
    </system.web>
</configuration>