在提供商托管应用程序中公开Web服务 [英] Exposing a webservice in Provider Hosted App

查看:76
本文介绍了在提供商托管应用程序中公开Web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我在内部环境中,我希望从提供商托管的应用程序中公开Web服务。


当我想访问上下文时,通常就是它在MVC应用程序中的工作方式


  var spContext = SharePointContextProvider.Current.GetSharePointContext(HttpContext);


但在我的情况下,控制器中定义的  HttpContext不存在。


所以我的问题是我们使用的代码在wcf webService中获取spContext的值?



非常感谢你的帮助:)


解决方案

请查看以下文章了解更多详情:


http://cameron-verhelst.be/blog/2014/10/19/hosting-a-wcf-service-in-sharepoint-with-a-spcontext/


http ://sharepoint.stackexchange.com/questions/83407/sharepoint-2013-using-spsite-in-custom-wcf-content-enrichment-webservice



Hi,

I m in on premise enviroment, and i want to expose a webservice from a provider hosted App.

When i want to access to the context usually that 's the way it works in MVC application

 var spContext = SharePointContextProvider.Current.GetSharePointContext(HttpContext);

But in my case the HttpContext wich is defined in the controller does not exists.

So my question is wich code we use to get the value of the spContext inside the wcf webService ?

Many thanks for your help :)

解决方案

Please check below articles for more details:

http://cameron-verhelst.be/blog/2014/10/19/hosting-a-wcf-service-in-sharepoint-with-a-spcontext/

http://sharepoint.stackexchange.com/questions/83407/sharepoint-2013-using-spsite-in-custom-wcf-content-enrichment-webservice


这篇关于在提供商托管应用程序中公开Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆