I have a WCF Service that Hosted in Windows Service
It uses NetTCPBinding and i could connect, i want to implement new Silverlight client to access the service
i have walk through the normal way to add service reference, and it was added with Empty "ServiceReferences.ClientConfig"
so i have viewed some threads and topics, at last i have write my configuration manually for the service
when i try to connect it show's this exception Could not connect to net.tcp://localhost:4502/MyService/Service. The connection attempt lasted for a time span of 00:00:02.2111265. TCP error code 10013: An attempt was made to access a socket in a way forbidden by its access permissions.. This could be due to attempting to access a service in a cross-domain way while the service is not configured for cross-domain access. You may need to contact the owner of the service to expose a sockets cross-domain policy over HTTP and host the service in the allowed sockets port range 4502-4534.
i believe that the problem related to ClientAccessPolicy.xml file
after search people say i need to have IIS7 installed and file is accessible through it, i have tried this but i couldn't make it work
but, i have worked on this before, but i was using PollinghttpBinding no NetTCP, and i have created another service contract to return the ClientAccessPolicy file
i have tried to do the same i do before with PollinghttpBinding but i can't write the right Configuration of the Service
My client refuse to use IIS, so could i use this way and what is the right configuration i should use with this service?
this is the configuration i use for my Service
<service behaviorConfiguration="serviceBehavior" name="MyService"> <endpoint address="net.tcp://localhost:4502/MyService/Service" behaviorConfiguration="endpointBehavior" binding="netTcpBinding" bindingConfiguration="netTcpServiceBinding" contract="IMyService"> <identity> <dns value="localhost"/> </identity> </endpoint> <endpoint address="net.tcp://localhost:7000/MyService/mex" binding="mexTcpBinding" contract="IMetadataExchange"/> </service>
can anyone give help?
No comments:
Post a Comment
Send us your comment related to the topic mentioned on the blog