How can I get the SPWebApplication for the current request from Init method in a HttpModule?
Tell me more
×
SharePoint Stack Exchange is a question and answer site for
SharePoint enthusiasts. It's 100% free, no registration required.
|
Is SPContext.Current not yet available at this time? You should be able to get it from this. (SPContext.Current.Site.WebApplication from the top of my head) Be careful though as this will call into the SharePoint object model for each incoming request, which will most likely hit the database as well. This may wreak havoc on performance and scalability. |
|||
|
|
What about
I didn't have a reason to use this, so I don't know if it works, it's just an ideea. Try it, hope it helps |
|||
|
Then in the application_PreRequestHandlerExceute you can access SPContext.Current. |
|||
|
|