views:

30

answers:

1

i want my servicehost to have the base address of any IP so i tried this

new ServiceHost(typeof(LoggingController),new Uri("0.0.0.0"));

and it gives me invalid URI format

any one knows how should i write this ?

well i tried to access it from outside of my local lan and it didnt work , i made a small test software using tcpiplistener and i started listening to the same port and i set the base address of the tcpip protocol to anyip and the small test software worked so i figured out all i need to do is setting the same for the Webservice –

TcpListener tcpListener = new TcpListener(IPAddress.Any,10021);

this works which also mean my system admin did his job of making sure the port/server is accessable from outside, now shouldnt my webservice work !? it work but i cant access it from outside , i can access it from the same pc if i run client on the same pc

+1  A: 

Reminds me of a problem we had with our software. The default configuration of the webservice used windows network credentials to apply message based security which - due to the domain/network credentials - won't work from another network. Our solution was to disable security on the service binding (which may be a bit tricky depending on the binding you use). For the default bindings like WebHttpBinding it's just passing a parameter in the constructor. Hope this helps!

Markus
can you explain more what do you mean plz ?
Stacker
what parameter i need to pass ?
Stacker
nevermind i got it to work it was a server issue , thanks any way , i will up your answer though
Stacker