Home > Net >  Webservice the network connection error
Webservice the network connection error

Time:11-06

Iis configuration/myweb/root directory into applications, web services directly to this folder,
Network directly connected network IP http://: port/myweb/myweb asmx, success
Test methods http://network IP/myweb/myweb asmx? Op=HelloWorld, success
Click http://after debugging network IP/myweb/myweb asmx/HelloWorld, success

Outside the network connection of http://network IP: port/myweb/myweb. Asmx, success
Test method outside http://network IP: port/myweb/myweb. Asmx? Op=HelloWorld, success
Page at this time of the request and response when the sample in the post and the network connection is the same, is a network IP
Click debug after the jump page is http://network IP/myweb/myweb asmx/HelloWorld, failure,

Should be how to solve this problem, please? First, thank you,

CodePudding user response:

Outside the web services that can be accessed through the ie and get the XML as a result, means not webservice problem, you will only the caller's problem

CodePudding user response:

reference 1st floor shawn_yang response:
external web services that can be accessed through the ie and get the XML as a result, it is not a problem webservice, only is the problem that you invoke application

Just using the browser debugging, can go to the method of the interface, this interface prompt examples for a SOAP request and response of the HOST is still a network IP, the interface point to jump to the XML results after debug interface IP, is not the network is a network IP, so can not get the XML as a result,

CodePudding user response:

How do you write the web service? Is it write die of IP? How can jump back to the internal network IP networks outside

CodePudding user response:

The
reference 3 floor shawn_yang response:
how webservice you wrote it? Is it write die of IP? How can jump back to the internal network IP networks outside

Is the new asp.net web application, add the web service (ASMX), use the default directly the helloworld method, published on the server, nothing change, via HTTP open ASMX debugging, trying to test success, into a chain to the final debugging that step jump back to the Intranet IP,

CodePudding user response:

You look at the configuration file, don't you add wrong webservice, not outside the network

CodePudding user response:

reference 5 floor shawn_yang reply:
you look at the configuration file, whether to add wrong webservice, not outside the network

This is the default configuration file, vs released didn't change anything,
 & lt; ? The XML version="1.0" encoding="utf-8"?> 
Detailed information on how to configure the ASP.NET application, please visit
https://go.microsoft.com/fwlink/? LinkId=169433
-->




CodePudding user response:

You don't have a webservice address

CodePudding user response:

Do you write a death in the code

CodePudding user response:

refer to the eighth floor shawn_yang response:
do you write a death in the code

I find out the reason, is Nginx configuration problem, I am in Nginx. Add the following lines in the conf, no longer jump Intranet IP, but less network TCP/IP port number, could you tell me how to set it should be?
Is the last to jump to the address of the page, and now is http://the network IP/myweb/myweb asmx/HelloWorld,
Actual need outside http://network IP: port/myweb/myweb. Asmx/HelloWorld
Proxy_set_header HOST $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

CodePudding user response:

The default port 80, you just add on an external network port

CodePudding user response:

The
references to the tenth floor shawn_yang response:
is the default port 80, you just add on an external network port

How doesn't work proxy_set_header HOST here tried $http_host: $server_port, $HOST: port number, $http_host: port number, etc., not a play,
  •  Tags:  
  • C#
  • Related