-1

so this is my soap webservice url : http://localhost:50691/WebService.asmx it works fine . but i want to acess it via my ip address like this: http://192.168.1.2:50691/WebService.asmx but unfortunately i got no response. i'm using c# to create the webservice, so is there anything to do to make the webservice available ?

EDIT
i think the solution is to add to the WSDL another endpoint that contains my IP(192.168.1.2), but the question is ,how ?

    `<wsdl:service name="WebService">
     <wsdl:port name="WebServiceSoap" binding="tns:WebServiceSoap">
     <soap:address location="http://localhost:50691/WebService.asmx"/>
     </wsdl:port>
     <wsdl:port name="WebServiceSoap12" binding="tns:WebServiceSoap12">
     <soap12:address location="http://localhost:50691/WebService.asmx"/>
     </wsdl:port>
     </wsdl:service>`
karimsaieh
  • 387
  • 4
  • 6

2 Answers2

0

Host your web service in IIS (or IIS Express) http://programmerguru.com/webservice-tutorial/how-to-deploy-asp-dot-net-webservice-in-iis/

Chester Cobus
  • 701
  • 4
  • 12
  • Deploying Web Service on IIS is a good one solution, but debuging will be impossible. If You need debugger, better solution will be specifing local IIS web server in Visual Studio. Here is documentation from Microsoft https://msdn.microsoft.com/pl-pl/library/ms178108.aspx – Jacek Gzel Mar 22 '17 at 19:45
  • i can't find "IIS Manager" i'm using visual studio 2015 community and IIsExpress – karimsaieh Mar 22 '17 at 19:51
  • Here you go http://stackoverflow.com/questions/28471607/run-web-service-using-iis-express-without-visual-studio/ – Chester Cobus Mar 22 '17 at 19:56
0

So the problem was with IIS , you need to let it accept requests from any sort of ip address other than localhost
here's the solution

  1. be sure your firewall isn't blocking IIS , in my case : i've just disabled avg temporarly
  2. run visual studio as admin
  3. in `$(solutionDir)\.vs\config\applicationhost.config` i had to change the binding from bindingInformation="*:50691:localhost" to bindingInformation=":50691:"
  4. run the app and open http://192.168.1.2:50691/WebService.asmx from another device
karimsaieh
  • 387
  • 4
  • 6