I'm trying to implement a custom SessionIDManager very similar this example.
I'm putting this in the web.config similar to how they showed in the example:
<system.web>
<httpModules>
<add name="SessionID"
type="ProjectName.WebUI.Models.CustomSessionIDManager" />
</httpModules>
// --snip--
</system.web>
However when attempting to load the website I am getting the configuration error:
ProjectName.WebUI.Models.CustomSessionIDManager does not implement IHttpModule.
If I remove that part of the web.config, the website loads, but the overridden part of the custom SessionIDManager does not get run.
How do I properly tell the web.config to use my custom SessionIDManager?
In fact I think there's a bug in the documentation. You don't need to add it to the <httpModules>
section but to the <sessionState>
section as illustrated here:
<sessionState
Mode="InProc"
stateConnectionString="tcp=127.0.0.1:42424"
stateNetworkTimeout="10"
sqlConnectionString="data source=127.0.0.1;Integrated Security=SSPI"
sqlCommandTimeout="30"
customProvider=""
cookieless="false"
regenerateExpiredSessionId="false"
timeout="20"
sessionIDManagerType="Your.ID.Manager.Type, CustomAssemblyNameInBinFolder"
/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With