[英]Get ServerContext from web application on IIS
I have an asp.net web application that runs on IIS. 我有一个在IIS上运行的asp.net Web应用程序。 Can i get the server context directly or i need to open a sharepoint web and get it's context?
我可以直接获取服务器上下文,还是需要打开一个共享站点并获取它的上下文?
Is the ServerContext null? ServerContext是否为空?
If i can get it, how? 如果我能得到,怎么办?
Thanks alot. 非常感谢。
It appears that we can do it and the ServerContext is not null. 看来我们可以做到,并且ServerContext不为null。 We can use this:
我们可以这样使用:
Microsoft.Office.Server.ServerContext context = Microsoft.Office.Server.ServerContext.Current;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.