Web服务连接被拒绝

时间:2010-03-31 02:06:07

标签: c# asp.net asp.net-ajax asmx web-services

我使用网络服务开发了一个网络应用程序。在开发环境中一切正常。我已将web服务移动到主网站后面的测试文件夹中的生产服务器上。我可以在生产服务器上浏览已发布的服务,我可以从我的开发机器访问远程服务。

如果我在开发环境中运行我的网络应用程序,我可以使用远程网络服务没问题。如果我将Web应用程序移动到生产环境,则当应用程序执行ajax登录方法时,浏览器会输出此错误。

以下javascript错误输出到浏览器

Error: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server.

The status code returned from the server was: 500
Source File: www.grav80.com/clients/callswharf/Redshift/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_HiddenField&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a1247b7d8-6b6c-419f-a45f-8ff264c90734%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2009.2.826.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3ad2d891f5-3533-469c-b9a2-ac7d16eb23ff%3a16e4e7cd%3a86526ba7%3aed16cbdc%3ab7778d6c
Line: 15

事件日志中出现以下错误

Exception information: 
    Exception type: WebException 
    Exception message: Unable to connect to the remote server 

Request information: 
    Request URL: www.grav80.com/clients/callswharf/redshift/login.aspx 
    Request path: /clients/callswharf/redshift/login.aspx 
    User host address: 77.68.58.231 
    User:  
    Is authenticated: False 
    Authentication Type:  
    Thread account name: NT AUTHORITY\NETWORK SERVICE 

您可以在此处查看测试环境中的行为。 http://www.grav80.com/clients/callswharf/redshift/

您可以在此处查看服务 http://www.grav80.com/clients/callswharf/redshift/service/g80cms.asmx

我希望有些人可以为我发光。

1 个答案:

答案 0 :(得分:2)

异常消息显示您正在运行Login.aspx,而不是您的Web服务。

此外,WebResource.axd用于从资源文件返回资源。与Login.aspx绑定的事实使我认为您的表单身份验证配置不正确。不应为WebResource.axd配置它。


为了防止您使用“AJAX”从Login.aspx调用服务,我会提到“无法连接到远程服务器”通常意味着这一点。尝试与远程服务器建立TCP / IP连接,通常是在端口80或443上,并且未成功建立连接。这意味着现在是时候研究网络问题,如防火墙,网络拦截器(如Bluecoat),代理服务器等。

如果在您的环境中可以使用Fiddler,您可能会尝试查看网络流量。

相关问题