简体   繁体   中英

firewalls block client of wshttpbinding service

I have a server pc with Windows Server 2008 .and i also have a wcf service that work with Port 8525 and host it with Windows Service .i open the port in server firewall (Added Rule).

My server machine has a Valid IP. so my client try to connect to my service at ((http)://MyServerIP:8525/ServiceName).

all of my application users are people that work in companies .so user internet come from a secure network (Proxy Server Or VPN Connection).

the problem is here :

lots of my clients have the connection problem that seems local network block my program connection (if they try to connect to my server system.diagnostics listener will log it) but service does not save any log.

i think their internet Server has Firewall and it block me.i fixed some of them with

<defaultProxy enabled="true" useDefaultCredentials="true" />

but still lots of them have same problem.and the another annoying problem is the network administrators do not open that port because of security issue and do not help me.

A Common Exception is : System.ServiceModel.EndpointNotFoundException > System.Net.WebException > System.Net.Sockets.SocketException ( on client Side ).

this problem did not occur when i connect from home.

My question :

any way to fix this issue with c# code or client app.config? or at least fix this with some change in service config (server side).

The only easy solution is to host that service on port 80

The problem is that some networks do not permit outgoing connection to ports other than permitted services(http,https,pop, etc etc)

Or you can ask sysadmins of those networks to permit traffic to your ip/port

If you have iis on that server you could host wcf on iis.

Remenber that only one process can bind to a port on an address at any one time.

there you can find some info: How can a WCF service listen the same port as IIS?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM