I am trying to migrate a legacy WSE 3 web service to WCF. Since maintaining backward compatibility with WSE 3 clients is the goal, I followed the recommendations in this article .
After much trial and error, I can call the WCF service on my WSE 3 client. However, I cannot add or update a web link to this service from Visual Studio 2005 (with WSE 3 installed). Answer: “Request error with HTTP status 400:“ Bad request. ”I get the same error trying to generate a proxy server using the wsewsdl3 utility. I can add a link to the service using VS 2008.
I tried using the service in IIS 7.5 on both Windows 7 and Windows Server 2008 R2 with the same result. Any solutions or troubleshooting tips?
Here are the relevant sections from the configuration 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>
UPDATE:. After trying to poll Paul tracing, I decided that the exception was System.Xml.XmlException: the message body could not be read because it is empty
Unfortunately, this does not seem to help much. Another thing I noticed is the presence of a separate httpsGetEnabled attribute of the serviceMetadata element. I added this and set it to true, since it is an https service, but the result was the same. For some reason, WCF seems to not recognize that it is a metadata request.
Kevin krueger
source share