I have a WCF webservice thats used to work over regular http. I just recently got a valid certificate from godday installed the certifcate now if i access the service.svc with the browser everything looks good but now what ever function i try to call gives
me a 400 bad request :*( help!
I just recently got a valid certificate from godday installed the certifcate now if i access the service.svc with the browser everything looks good but now what ever function i try to call gives me a 400 bad request
Hi,
400 is a general error. Please get the internal error message with fiddler or enable tracing.
From your code, you want to configure Https with BasicHttpBinding, please explain more clearly.
Best Regards.
Please mark the replies as answers if they help or unmark if not.
Feedback to us
Alex_808
Member
39 Points
92 Posts
webservice WCF with SSL error 400 bad request
Jan 16, 2013 04:40 PM|LINK
I have a WCF webservice thats used to work over regular http. I just recently got a valid certificate from godday installed the certifcate now if i access the service.svc with the browser everything looks good but now what ever function i try to call gives me a 400 bad request :*( help!
here is my web.config
<?xml version="1.0" encoding="utf-8"?> <configuration> <system.web> <customErrors mode="Off"/> <compilation debug="true" targetFramework="4.0"> <assemblies> <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> </assemblies> </compilation> <httpRuntime maxRequestLength="524288" /> <authentication mode="None"></authentication> </system.web> <system.serviceModel> <services> <service name="ServiceApp.Service1" behaviorConfiguration="ServiceBehaviour"> <endpoint address="" binding="basicHttpBinding" bindingConfiguration="secureHttpBinding" contract="ServiceApp.IService1"/> <endpoint address="mex" binding="mexHttpsBinding" contract="ServiceApp.IService1" /> </service> </services> <serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="true" /> <standardEndpoints> <webScriptEndpoint> <standardEndpoint name="" crossDomainScriptAccessEnabled="true" /> </webScriptEndpoint> </standardEndpoints> <bindings> <!--<webHttpBinding> <binding name="StreamedRequestWebBinding" bypassProxyOnLocal="true" useDefaultWebProxy="false" hostNameComparisonMode="WeakWildcard" sendTimeout="10:15:00" openTimeout="10:15:00" receiveTimeout="10:15:00" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" transferMode="StreamedRequest"> <readerQuotas maxArrayLength="2147483647" maxStringContentLength="2147483647" /> </binding> </webHttpBinding>--> <basicHttpBinding> <binding name="secureHttpBinding"> <security mode="Transport"> <transport clientCredentialType="None"/> </security> </binding> </basicHttpBinding> </bindings> <behaviors> <serviceBehaviors> <behavior name="ServiceBehaviour"> <serviceMetadata httpGetEnabled="false" httpsGetEnabled="True" /> <serviceDebug includeExceptionDetailInFaults="false" /> </behavior> </serviceBehaviors> <endpointBehaviors> <behavior name="web"> <webHttp /> </behavior> </endpointBehaviors> </behaviors> </system.serviceModel> <system.webServer> <modules runAllManagedModulesForAllRequests="true" /> <httpProtocol> <customHeaders> <add name="Access-Control-Allow-Origin" value="*" /> <add name="Access-Control-Allow-Headers" value="Content-Type" /> </customHeaders> </httpProtocol> </system.webServer> </configuration>Alex
kushalrdalal
Contributor
7130 Points
1272 Posts
Re: webservice WCF with SSL error 400 bad request
Jan 16, 2013 09:24 PM|LINK
Check this link -
http://www.codeproject.com/Articles/36705/7-simple-steps-to-enable-HTTPS-on-WCF-WsHttp-bindi
My Blog
LinkedIn Profile
Haixia Xie -...
Contributor
3023 Points
294 Posts
Microsoft
Re: webservice WCF with SSL error 400 bad request
Jan 17, 2013 09:04 AM|LINK
Hi,
400 is a general error. Please get the internal error message with fiddler or enable tracing.
From your code, you want to configure Https with BasicHttpBinding, please explain more clearly.
Best Regards.
Feedback to us
Develop and promote your apps in Windows Store