Inquiridor
Erro ao acessar o WebService pela Internet

Pergunta
-
Boa tarde Pessoal,
eu possuo uma aplicação para smartphone acessando um webservice que esta publicado no servidor local ( a aplicação e o webservice) e tudo funciona.
Só que quando eutento acessar o WebService com a mesma apliocação mas de fora da rede local, não consigo a conexão e retorna o seguinte erro:
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SocketException (0x274c): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond] System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) +1002178 System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) +33 System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) +431 [WebException: Unable to connect to the remote server] System.Net.HttpWebRequest.GetRequestStream() +1504557 System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +103 Fv_web.FV_webService.BuscaProduto_nome(Int32 linha) +63 _Default.Frm_produtos_Load(Object sender, EventArgs e) +127 System.Web.UI.Control.OnLoad(EventArgs e) +99 System.Web.UI.MobileControls.MobileControl.OnLoad(EventArgs e) +556 System.Web.UI.Control.LoadRecursive() +47 System.Web.UI.Control.LoadRecursive() +131 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET VersionPoderiam me ajudar a resolver este problema ?
Abraços,
Marquinhos_CG
Todas as Respostas
-
-
Eu tenho um IP válido sim, mas não exclusivo para este servidor, o que eu fiz foi criar uma regra no Roteador / firewall dizendo que todo o acesso feito através da porta exemplo : 9090, seja redirecionado para o meu servidor interno (192.168.2.14 ) também para a porta 9090.
Obs.: Se eu digitar por exemplo o endereço http://endereçoip:9090/teste/meuwebservice.asmx no browser eu consigo ver a página principal do WebService.
Sim acesso, várias paginas com ele ?
Será que eu preciso liberar outras portas no firewall ?
-
-
-
-
Ola,
Quando você muda seu webreference de http://seuendereco/teste/seuwebservice.asmx, para http://seuendereco:9090/teste/seuwebservice.asmx, para chamar o mesmo de fora você dá um update no webreference?
-
-