在不创建WSP的情况下在SharePoint2013中部署自定义WCF Web服务 [英] Deploying a custom WCF web service in SharePoint2013 without creating WSP

查看:65
本文介绍了在不创建WSP的情况下在SharePoint2013中部署自定义WCF Web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个WCF服务,它是独立应用程序,不是在SharePoint解决方案下创建的.我希望在SharePoint vti_bin文件夹下手动部署此服务.为此,我执行了以下操作:

1.在< C:\ Program Files \ Common Files \ Microsoft Shared \ Web服务器扩展\ 15 \ isapi>

 并添加了我的网络服务发布的代码,而没有web.config文件.

2.在GAC中注册服务dll

3.在SharePoint应用程序Web.config文件的服务模型下添加了WCF服务的应用程序设置键和终结点.

4.在Sharepoint-80下的IIS中的_vti_bin下创建了用于服务的虚拟目录.

5.浏览服务时,

类型'MyCustomService.Service',作为ServiceHost指令中的Service属性值提供,或在配置元素system.serviceModel/serviceHostingEnvironment/serviceActivations中提供. System.InvalidOperationException: 找不到类型'MyCustomService.Service',该类型作为ServiceHost指令中的Service属性值提供,或在配置元素system.serviceModel/serviceHostingEnvironment/serviceActivations中提供.

我们希望自定义服务部署在SharePoint下,以便在具有Windows身份验证的SharePoint环境中使用JavaScript访问该服务.

请帮助我们解决以上错误.

预先感谢

解决方案

请检查web.config文件中的端点地址和基址.

https://www.codeproject.com/Questions/611706/system-serviceModel-serviceHos

并查看有关在WCF BasicHttpBinding上启用Windows身份验证的文章.

https://nishantrana.me/2014/09/05/configure-a-wcf-service-for-windows-authentication/

我还建议您按照以下文章创建在SharePoint中托管的自定义WCF REST服务:


Hi,

I am having a WCF service which is standalone application and not created under SharePoint solution. I want this service to get deployed manually under SharePoint vti_bin folder.  For this I have performed following actions:

1. Created a folder under <C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\isapi>

 and added my web service published code without web.config file.

2.Register the service dll in GAC

3.Added the app-settings keys and endpoints for WCF service under Service Model of SharePoint application Web.config file.

4. Created a Virtual directory for service under _vti_bin in IIS under Sharepoint-80.

5.When we browse the service getting 

The type 'MyCustomService.Service', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.. ---> System.InvalidOperationException: The type 'MyCustomService.Service', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found. 

We want the custom service to deploy under SharePoint as need to access the service using JavaScript in SharePoint environment with windows authentication.

Please help us in resolving the above error.

Thanks in advance

解决方案

Hi,

Please check endpoint address and the base Address in web.config file.

https://www.codeproject.com/Questions/611706/system-serviceModel-serviceHos

And check the article about enable Windows authentication on WCF BasicHttpBinding.

https://nishantrana.me/2014/09/05/configure-a-wcf-service-for-windows-authentication/

I also suggest you create a custom WCF REST Service hosted in SharePoint follow the article below:

https://social.technet.microsoft.com/wiki/contents/articles/24194.sharepoint-2013-create-a-custom-wcf-rest-service-hosted-in-sharepoint-and-deployed-in-a-wsp.aspx

Best Regards,

Dennis


这篇关于在不创建WSP的情况下在SharePoint2013中部署自定义WCF Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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