Manuel
Manuel

Reputation: 77

Host Service Visual Studio Development Server for Access over the LAN

I'm trying to host a service and access it through a local network.

This is a part of my app.config:

 <client>
        <endpoint address="net.tcp://<my IP>:49770/Service1.svc"
            binding="netTcpBinding" contract="ServiceReference1.IService1"
            name="LAN" />
        <endpoint address="http://localhost:49770/Service1.svc" binding="basicHttpBinding"
            bindingConfiguration="BasicHttpBinding_IService1" contract="ServiceReference1.IService1"
            name="BasicHttpBinding_IService1" />
    </client>

The localhost endpoint works great if I work on one machine but the LAN endpoint won't work. This is the code I use to connect via the LAN endpoint.

 ServiceReference1.Service1Client client = new
           ServiceReference1.Service1Client("LAN");

I read this post but it still won't work:

how to connect to WCF web service inside lan

Upvotes: 2

Views: 672

Answers (1)

PhonicUK
PhonicUK

Reputation: 13864

The development server can't accept remote connections. You have to use a proper IIS instance for that.

Upvotes: 1

Related Questions