What controls the URL used at the location of the WSDL soap address?

I expose the wcf service via https from iis 6. I’m sure how much better I understand that the binding is set correctly in iis (yes, it’s positive that the site identifier is β€œ1” and made iisreset).

when i run this:

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>cscript.exe //NoLogo %sys temdrive%\inetpub\adminscripts\adsutil.vbs enum W3SVC/1 

this is on the list:

 SecureBindings : (LIST) (1 Items) ":443:dev.mydomain.com" 

When I open the service url, I see that it generates the url for wsdl correctly:

 https://dev.mydomain.com/virtual.directory/servicename.svc 

points this url for svcutil.exe:

 https://dev.mydomain.com/virtual.directory/servicename.svc?wsdl 

However, when I check wsdl itself, it stops using the domain and replaces it with the machine name in this wsdl xml section:

 <wsdl:service name="servicename"> <wsdl:port name="BasicHttpBinding_servicename" binding="tns:BasicHttpBinding_servicename"> <soap:address location="http://machinename.inernaldomain/virtual.directory/servicename.svc"/> </wsdl:port> </wsdl:service> 

Is the problem a web.config problem or an IIS problem? Also, why does it change the soap address to http from https?

+4
source share
1 answer

Stupid error ... I named my binding in the web configuration, but did not indicate its binding to the service. All I had to do was clear the binding name. The simplified configuration of wcf services does this so that you do not need to specify a binding. In my case, I simply did not realize that I did not see the binding (without errors) and used defaults. http://msdn.microsoft.com/en-us/library/ee530014.aspx

+1
source

Source: https://habr.com/ru/post/1388171/


All Articles