HTTP 400 Bad Request error attempting to add web reference to WCF Service
Posted
by c152driver
on Stack Overflow
See other posts from Stack Overflow
or by c152driver
Published on 2010-05-25T21:28:06Z
Indexed on
2010/05/25
21:31 UTC
Read the original article
Hit count: 469
I have been trying to port a legacy WSE 3 web service to WCF. Since maintaining backwards compatibility with WSE 3 clients is the goal, I've followed the guidance in this article.
After much trial and error, I can call the WCF service from my WSE 3 client. However, I am unable to add or update a web reference to this service from Visual Studio 2005 (with WSE 3 installed). The response is "The request failed with HTTP status 400: Bad Request". I get the same error trying to generate the proxy using the wsewsdl3 utility. I can add a Service Reference using VS 2008.
Any solutions or troubleshooting suggestions?
Here are the relevant sections from the config file for my WCF service.
<system.serviceModel>
<services>
<service behaviorConfiguration="MyBehavior"
name="MyService">
<endpoint address="" binding="customBinding" bindingConfiguration="wseBinding"
contract="IMyService" />
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
</service>
</services>
<bindings>
<customBinding>
<binding name="wseBinding">
<security authenticationMode="UserNameOverTransport" />
<mtomMessageEncoding messageVersion="Soap11WSAddressingAugust2004" />
<httpsTransport/>
</binding>
</customBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="MyBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceCredentials>
<userNameAuthentication userNamePasswordValidationMode="Custom"
customUserNamePasswordValidatorType="MyCustomValidator" />
</serviceCredentials>
<serviceAuthorization principalPermissionMode="UseAspNetRoles" roleProviderName="MyRoleProvider" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
</system.serviceModel>
© Stack Overflow or respective owner