在内网访问web service的时候出错

yongyu2000 2004-02-02 04:03:40
内网,使用proxy上网,proxy无密码验证
在WinForm和Console中,可以访问web service,但是在asp.net中,访问时出错

可能是aspnet这个账号不能访问网络资源,如何更改这个账号?谢谢!!!

异常如下:
Server Error in '/WebApplication2' Application.
--------------------------------------------------------------------------------

The underlying connection was closed: Unable to connect to the remote server.
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.WebException: The underlying connection was closed: Unable to connect to the remote server.

Source Error:


Line 83: [return: System.Xml.Serialization.SoapElementAttribute("return")]
Line 84: public GoogleSearchResult doGoogleSearch(string key, string q, int start, int maxResults, bool filter, string restrict, bool safeSearch, string lr, string ie, string oe) {
Line 85: object[] results = this.Invoke("doGoogleSearch", new object[] {
Line 86: key,
Line 87: q,


Source File: c:\inetpub\wwwroot\WebApplication2\Web References\MyGoogle\Reference.cs Line: 85

Stack Trace:


[WebException: The underlying connection was closed: Unable to connect to the remote server.]
System.Net.HttpWebRequest.CheckFinalStatus()
System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult)
System.Net.HttpWebRequest.GetRequestStream()
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
WebApplication2.MyGoogle.GoogleSearchService.doGoogleSearch(String key, String q, Int32 start, Int32 maxResults, Boolean filter, String restrict, Boolean safeSearch, String lr, String ie, String oe) in c:\inetpub\wwwroot\WebApplication2\Web References\MyGoogle\Reference.cs:85
WebApplication2.WebForm1.Button1_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\webapplication2\webform1.aspx.cs:53
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain()




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
...全文
80 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

12,162

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 Web Services
社区管理员
  • Web Services社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧