开发者

How to get SPWebApplication for current request in HttpModule?

开发者 https://www.devze.com 2023-02-20 06:14 出处:网络
How can I get the SPWebApplication for the current request from a H开发者_开发百科ttpModule?try constructing the SPSite yourself

How can I get the SPWebApplication for the current request from a H开发者_开发百科ttpModule?


try constructing the SPSite yourself

using(SPSite site = new SPSite(app.Context.Request.Url.ToString())) { //might need to trim the url
    site.WebApplication
}


Tried SPContext.Current.Site.WebApplication ?

0

精彩评论

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