quinta-feira, 2 de dezembro de 2010 15:29
I have created a custom SharePoint 2010 WCF service that is deployed to 14\ISAPI\MYService folder. The issue i am facing is that this service should be accessible from all Web applications, that can be HTTPS (i.e. SSL) enabled or normal HTTP. If i am making in web.config file for web application that has HTTPS enabled, then it fails for Web applications having normal HTTP configuration. My requirement is that when this WCF service is deployed it should accessible from all web applications that can be HTTPS or HTTP both. I went through number of blogs and tried whatever option they had suggested but none of them worked for me :(. Here are some of the blog that i tried:-
Please find below the web.config content that i am using :-
<?xml version="1.0" encoding="utf-8" ?> <configuration> <system.serviceModel> <serviceHostingEnvironment aspNetCompatibilityEnabled ="true"/> <bindings> <basicHttpBinding > <binding name="customBasicHttpsBinding"> <security mode="Transport" > <transport clientCredentialType="Ntlm" proxyCredentialType="Ntlm" /> <message clientCredentialType="Certificate"></message> </security> </binding> </basicHttpBinding> </bindings> <services> <service name ="MYServiceName" behaviorConfiguration="MyServiceTypeBehaviors"> <endpoint address="" binding ="basicHttpBinding" contract ="MYServiceContract"></endpoint> <endpoint address="" binding ="basicHttpBinding" bindingConfiguration ="customBasicHttpsBinding" contract ="MYServiceContract"></endpoint> </service> </services> <behaviors> <serviceBehaviors> <behavior name="MyServiceTypeBehaviors" > <serviceMetadata httpsGetEnabled="true" httpGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="true" httpHelpPageEnabled="true" httpsHelpPageEnabled="true"/> </behavior> </serviceBehaviors> </behaviors> </system.serviceModel > </configuration >Please help me if anybody has the solution for it.Deepak
Todas as Respostas
sexta-feira, 3 de dezembro de 2010 06:14
Under Services node add below tag and check..
<endpoint address="" binding="webHttpBinding" contract="MYServiceContract" behaviorConfiguration="web"></endpoint>
/* My Code Runs in Visual Studio 2010 */
quinta-feira, 9 de dezembro de 2010 09:39
Thanks for reply but the solution suggested by you doen't work.