Results 1 to 4 of 4

Thread: [SOLVED] WCF trying to check localhost on client

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2010
    Posts
    164

    [SOLVED] WCF trying to check localhost on client

    I have a WCF service deployed to AppHarbor. The problem is it tries to find the service and the clientaccesspolicy.xml file on the Localhost on the Client machine, not the server. That's why I'm the only one who can access the WCF on the site because I have the files on my computer. Everyone else gets a 404 error or "No connection could be made because the target machine actively refused it 127.0.0.1:80"

    What do I need to add to get the localhost on the Server?
    Last edited by acrym; Jan 8th, 2013 at 03:48 PM.

  2. #2
    Hyperactive Member
    Join Date
    Jan 2010
    Posts
    259

    Re: WCF trying to check localhost on client

    I'm not sure what part you are hosting, but you may have to do it programmatically veruses a file. Also, can you use a relative path for the xml file opposed to using an address like "http://localhostort/clientaccesspolicy.xml"?

    I found the following post that may help you out: http://stackoverflow.com/questions/2...ot-being-found

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Aug 2010
    Posts
    164

    Re: WCF trying to check localhost on client

    Fixed it, I programmatically set the Endpoint.Address property in the proxy client to the url of the service.

  4. #4
    Hyperactive Member
    Join Date
    Jan 2010
    Posts
    259

    Re: [SOLVED] WCF trying to check localhost on client

    Ah, so it was the client, you can also set that in the config file as when you add a service reference it should automatically add the binding and endpoints to the config file.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width