none
How to access WCF service over internet?

    Question

  • I think i'm missing something very basic...I have a working WCF service that i can access from my localmachines no problem.  I have now setup an outside address that other developers can use to access the wcf service.

    they can, in fact bring up the wsdl if they put in.

    http://www.mydomain.com/myservice/service.svc

    However, the page internally references just the machine name:

    svcutil.exe http://mymachine/myservice.svc

    In .NET 2.0, when the outside developers try to add a web-reference to the http://www.mydomain.com/myservice/service.svc?wsdl

    .NET complains about broken links at http://mymachine, which obviously the outside develoeprs don't have access to. I have tried playing with the endpoint in the webconfig and adding the address attribute set to "http://www.mydomain.com/myservice/service.svc"

    But when i do that, the developer get the following error trying to access my service,

    "a:ActionNotSupportedThe message with Action '' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None)."

    So, what am i missing? How do I allow the outside developers to access this WCF service using the Vs.NEt tool "add web reference" ???

    Thanks for your help,

    Mike

     

    Friday, December 08, 2006 4:08 PM

Answers

  • This is because of generated WSDL's Import ,XSD and Soap Address Locations point to machine name not domain name.If you replace machine name with domain name ,it works.

    Saturday, December 09, 2006 6:26 PM

All replies

  • From the exception specified, I see that the service cannot process the message as it gets one with Action as "" (empty). Can you please check the Action attribute on the Contract in the proxy code generated at client?
    Friday, December 08, 2006 10:29 PM
  • Can you share your web.config file?

    Saturday, December 09, 2006 5:46 PM
  • This is because of generated WSDL's Import ,XSD and Soap Address Locations point to machine name not domain name.If you replace machine name with domain name ,it works.

    Saturday, December 09, 2006 6:26 PM