c# - Computers communicating on same network -


i'm trying 2 applications communicate through local network using http / wcf. master makes web requests , looks slave applications each has web service running. slaves configured answer localhost:\\[machinename]:8000

it works when run slave on same computer master not when run on computer on same network. confirm computers on same network cmd prompt ping [machinename]. required send requests computer on same network?

slave sets webservice:

 public void run()         {             config config = config.validateandcreate();             string machinename = system.environment.machinename;             string baseaddress = "http://" + machinename + ":" + config.port;             service.setconfig(config);              if (new service().updatescripts().status != execstatus.ok)             {                 throw new exception("failed update scripts");             }              using (webservicehost host = new webservicehost(typeof(service), new uri(baseaddress)))             {                 host.description.behaviors.add(new servicemetadatabehavior { httpgetenabled = true });                 host.description.behaviors.find<servicedebugbehavior>().includeexceptiondetailinfaults = true;                 host.description.behaviors.find<servicedebugbehavior>().httphelppageenabled = false;                  serviceendpoint ep = host.addserviceendpoint(typeof(iservice), new webhttpbinding(), "");                  host.open();                 log.info("service running at: " + baseaddress);                 log.info("press 'q' key quit...");                 while (console.readkey(true).key != consolekey.q) { }                 host.close();             }         } 

the thing blocking firewall. if haven't added 3rd party firewall, windows firewall (which on default) blocking it.

you need add exception firewall, permit traffic on port routed application.

click "start" , type "windows firewall advanced security".

click "inbound rules" -> new rule, , add either program rule or port rule appropriate.


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -