Problem with WCF Service

N

NetUser

Hello,

I'm having a problem with connection to the WCF Service from remote
computer (locally all works great). My IIS 7.0 runs on virtual machine
and I can access it with IP address along with port number. When I open
link to the WCF service in Internet Explorer
(http://IP_ADDRESS:PORT/PATH/Service.svc) the link that is shown there
looks like this:

svcutil.exe http://MACINE_NAME/TestWCFService/Service1.svc?wsdl


I think that the problem is with link in wsdl file. The end of this file
looks like this:

<wsdl:service name="Service">
- <wsdl:port name="WSHttpBinding_IService"
binding="tns:WSHttpBinding_IService">
<soap12:address
location="http://MACHINE_NAME/TestWCFService/Service.svc" />
- <wsa10:EndpointReference>
<wsa10:Address>http://MACHINE_NAME/TestWCFService/Service.svc</wsa10:Address>
- <Identity
xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity">
<Dns>localhost</Dns>
</Identity>
</wsa10:EndpointReference>
</wsdl:port>
</wsdl:service>

where the MACHINE_NAME is correct machine name, but there has to be an
IP address including port number to the server in format
XXX.XX.XXX.XXX:XXXXX.

If I put this IP address in web.config file for endpoint like this

<endpoint
address="http://XXX.XX.XXX.XXX:XXXXX/TestWCFService/Service.svc"
binding="wsHttpBinding" contract="IService">

and open this link in web browser there is an error

"No protocol binding matches the given address
'http://XXX.XX.XXX.XXX:XXXXX/TestWCFService/Service.svc'. Protocol
bindings are configured at the Site level in IIS or WAS configuration"

I also found on this link http://forums.asp.net/p/1096811/1659596.aspx
that I have to configure host header on web site. I also tried that but
without result. I can't write my real IP address including port number
in host name field.

Any suggestions?

Thanks
 
S

sloan

I would learn how to use the SvcTraceViewer tool.

It'll find the issue with your environment faster than anything.



Probably location on XP:
"C:\Program Files\Microsoft SDKs\Windows\v6.0\Bin\SvcTraceViewer.exe"
I've seen v6.0a as well.


Make sure the directory (c:\wutemp\ in my examples) already exists:



Put this on the client:


<system.diagnostics>

<trace autoflush="true" />

<sources>

<source name="System.ServiceModel"

switchValue="Information, ActivityTracing"

<listeners>

<add name="sdt"

type="System.Diagnostics.XmlWriterTraceListener"

initializeData= "c:\wutemp\Client1.svclog" />

</listeners>

</source>

</sources>

</system.diagnostics>



Put this on the Host(Server)





<system.diagnostics>

<trace autoflush="true" />

<sources>

<source name="System.ServiceModel"

switchValue="Information, ActivityTracing"

<listeners>

<add name="sdt"

type="System.Diagnostics.XmlWriterTraceListener"

initializeData= "c:\wutemp\Host1.svclog" />

</listeners>

</source>

</sources>

</system.diagnostics>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top