试了各种方法,依然无济于事,大家给我看看,给点提示也好。
我的是server2003,vs2005,sql server 2005,装vs2005的时候顺带装了sqlexpress数据库实例,不过项目中用的都是sqlserver。问题1,我是先发布(如C:\web),然后对这个文件夹进行web共享。目的是想网络的其他客户端(网站是给局域网里的用户使用的)可以访问我这个服务器上的网站(通过http://ip/web)。
本地(服务器上)试验的时候,没问题,就是有点慢(有没有好的建议,可以加快点速度的?)。但其他客户端却不能访问,why?问题2,本地访问到水晶报表的时候,就让我输入数据库的登陆信息。但我在数据库的连接信息里设置了用户名密码:Data Source=zzh-xxc-10;AttachDBFileName=|DataDirectory|\web.MDF;user id=sa;password=12345,在网页里也设置成:myReport.SetDatabaseLogon("sa", "12345", "zzh-xxc-10", "D:\web\APP_DATA\web.MDF"),还是不行。那这个用户名,密码在什么地方设置的?问题3,也不知道从第几次运行发布以后,本地访问,就出现如下的错误--------在建立与服务器的连接时出错。在连接到 SQL Server 2005 时,在默认的设置下 SQL Server 不允许进行远程连接可能会导致此失败。 (provider: 命名管道提供程序, error: 40 - 无法打开到 SQL Server 的连接)。
我已经设置过可以远程访问,而且前面几次都没问题的。
如果再用vs运行发布几次,访问网站的时候,错误就变成超时了!!! 问题4,我现在服务器(A)上的sql server外部不能连接,但我在另外一台设置一样的机器(B)上,A可以连接B。那是什么原因导致了其他机器不能连接服务器的呢?问题5,我在B机器上(配置跟服务器A基本一样)发布网站,运行的时候,出现了另外的错误---分析器错误信息: 无法识别的属性“xmlns”。源错误: 
行 1:  <?xml version="1.0"?>
行 2:  <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"> 
我的目的很简单,就是想把我现在开发的网站,放到服务器上,其他机器可以访问,运行,打印报表。各位能帮我看看错误都是什么原因吗,拜谢!

解决方案 »

  1.   

    超时时间已到。在操作完成之前超时时间已过或服务器未响应。 
    说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.Data.SqlClient.SqlException: 超时时间已到。在操作完成之前超时时间已过或服务器未响应。源错误: 执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。  堆栈跟踪: 
    [SqlException (0x80131904): 超时时间已到。在操作完成之前超时时间已过或服务器未响应。]
       System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +171
       System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +199
       System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error) +530
       System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj) +157
       System.Data.SqlClient.TdsParserStateObject.ReadPacket(Int32 bytesExpected) +79
       System.Data.SqlClient.TdsParserStateObject.ReadBuffer() +44
       System.Data.SqlClient.TdsParserStateObject.ReadByte() +18
       System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +74
       System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +34
       System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +606
       System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +193
       System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +502
       System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
       System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +429
       System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +70
       System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +512
       System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +85
       System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +89
       System.Data.SqlClient.SqlConnection.Open() +160
       System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +84
       System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +199
       System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate) +1029
       System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +106
       System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) +43
       System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) +81
       System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +131
       System.Web.UI.WebControls.Login.AttemptLogin() +106
       System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +82
       System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
       System.Web.UI.WebControls.ImageButton.OnCommand(CommandEventArgs e) +86
       System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +173
       System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4920 
    --------------------------------------------------------------------------------
    版本信息: Microsoft .NET Framework 版本:2.0.50727.42; ASP.NET 版本:2.0.50727.42
      

  2.   

    问题1,我是先发布(如C:\web),然后对这个文件夹进行web共享。目的是想网络的其他客户端(网站是给局域网里的用户使用的)可以访问我这个服务器上的网站(通过http://ip/web)。
    -------------------------------我不太会,想问,你web共享是如何共享?是设置IIS后发布网站那样还是直接在文件夹上按右键属性共享?
    你试试用IIS发布网站吧,不用共享文件夹什么的.
      

  3.   

    web共享,就是点我以前发布的C:\web文件夹,属性>共享与安全>web共享。现在错误变成----在建立与服务器的连接时出错。在连接到 SQL Server 2005 时,在默认的设置下 SQL Server 不允许进行远程连接可能会导致此失败。 (provider: 命名管道提供程序, error: 40 - 无法打开到 SQL Server 的连接) 这是我重起服务器,刚才正常运行,然后用iis发布以后的错误提示。
    这太奇怪了吧。郁闷的要死!