调试程序C#+SQL2005,错误:无法访问远程服务器

来源:百度知道 编辑:UC知道 时间:2024/06/16 21:44:21
系统为WIN2003,调试的程序为C#+SQL2005,在本机调试,可是发生了以下错误:
用户代码未处理 System.Net.WebException
Message="无法连接到远程服务器"
Source="System"
StackTrace:
在 System.Net.HttpWebRequest.GetRequestStream()
在 System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
在 localhost.FoodMarketSrv.GetCategories() 位置 c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\foodmarket\a5532914\84b0fb6d\App_WebReferences.sa8tfm3x.0.cs:行号 92
在 MasterPage.Page_Load(Object sender, EventArgs e) 位置 c:\FoodMarket\MasterPage.master.cs:行号 22
在 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
在 System.Web.UI.Control.OnLoad(EventArgs e)
在 System.Web.UI.Control.LoadRecursi

你先用数据近控件测试一下能不能连的上,如果不能再说吧,出这样的问题只有一个答案就是人的数据连接不上。

补存:你别弄应该,你还是试一下吧,还有你把你的原码粘出来吧。

。。数据库连接失败 从数据库找原因

把你的代码发出来看看.