|
请ADMIN 帮忙解决下,主要问题就是在发布售房、租房时,提示不允许远程连接。
文件 salehouse_pub.aspx
尾部有这样几段代码,,
mypub.ExecSql(sqlupdate);
//同时发布到房居客
myapi.Salehouse_Opert(0, csid, pub.strwebsite);
Jscript.AlertAndRedirect("新增成功!", "salehouse_pub.aspx");
文件 renthouse_pub.aspx
尾部有这样几段代码,,
mypub.ExecSql(sqlupdate);
//同时发布到房居客
myapi.Renthouse_Opert(0, czid, pub.strwebsite);
发布后返回页面:
“/”应用程序中的服务器错误。
--------------------------------------------------------------------------------
在建立与服务器的连接时出错。在连接到 SQL Server 2005 时,在默认的设置下 SQL Server 不允许进行远程连接可能会导致此失败。 (provider: TCP 提供程序, error: 0 - 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。)
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.Data.SqlClient.SqlException: 在建立与服务器的连接时出错。在连接到 SQL Server 2005 时,在默认的设置下 SQL Server 不允许进行远程连接可能会导致此失败。 (provider: TCP 提供程序, error: 0 - 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。)
源错误:
行 33: SqlConnection connall = new SqlConnection("Server=61.129.47.6,1433\\SQL2005;database=fangjukeall;Uid=fangjukeall;Pwd=@ty2008fangjukeall2008; Max Pool Size=512 ");
行 34: SqlCommand cmdall = new SqlCommand("select top 1 id,wzmc,wz,gsmc,szcs,lxr,lxdh,fjksjkmc,fjksjkzh,fjksjkmm,fjksjkip,fjksjksl,fjksjkdk,khsjkmc,khsjkzh,khsjkmm,khsjkip,khsjksl,khsjkdk from wzjk where wz='" + pub.strwebsite + "' ", connall);
行 35: connall.Open();
行 36: SqlDataReader drall = cmdall.ExecuteReader();
行 37: SqlConnection tempconn = new SqlConnection();
源文件: e:\wwwroot\hzfwq\web0414020\wwwroot\App_Code\API.cs 行: 35
堆栈跟踪:
[SqlException (0x80131904): 在建立与服务器的连接时出错。在连接到 SQL Server 2005 时,在默认的设置下 SQL Server 不允许进行远程连接可能会导致此失败。 (provider: TCP 提供程序, error: 0 - 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。)]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4846887
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject) +4860189
System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +90
System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +342
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +221
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +189
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +185
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +31
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +433
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +499
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +65
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +117
System.Data.SqlClient.SqlConnection.Open() +122
API.ConnFangjuke() in e:\wwwroot\hzfwq\web0414020\wwwroot\App_Code\API.cs:35
API.GetResultFangjuke(String strsql) in e:\wwwroot\hzfwq\web0414020\wwwroot\App_Code\API.cs:51
user_admin_renthouse_pub.Getlpzdid(String mcstr) in e:\wwwroot\hzfwq\web0414020\wwwroot\shop\admin\renthouse_pub.aspx.cs:126
user_admin_renthouse_pub.btn_submit_Click(Object sender, EventArgs e) in e:\wwwroot\hzfwq\web0414020\wwwroot\shop\admin\renthouse_pub.aspx.cs:272
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565 |
|