asp.net – 与SQL Server建立连接时出现网络相关或实例特定错误[已关闭]
|
我在somee.com上部署了我的asp.net Web应用程序,每当我登录到这个网站(ipc.somee.com),它给我一个网络相关的错误,如: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces,error: 26 - Error Locating Server/Instance Specified) 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.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces,error: 26 - Error Locating Server/Instance Specified) Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces,error: 26 - Error Locating Server/Instance Specified)] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception,Boolean breakConnection,Action`1 wrapCloseInAction) +5296071 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj,Boolean callerHasConnectionLock,Boolean asyncClose) +558 System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo,SqlInternalConnectionTds connHandler,Boolean ignoreSniOpenTimeout,Int64 timerExpire,Boolean encrypt,Boolean trustServerCert,Boolean integratedSecurity,Boolean withFailover) +5308555 System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo,String newPassword,SecureString newSecurePassword,TimeoutTimer timeout,Boolean withFailover) +145 System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo,Boolean redirectedUserInstance,SqlConnectionString connectionOptions,SqlCredential credential,TimeoutTimer timeout) +920 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout,Boolean redirectedUserInstance) +307 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity,Object providerInfo,SqlConnectionString userConnectionOptions) +434 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options,DbConnectionPoolKey poolKey,Object poolGroupProviderInfo,DbConnectionPool pool,DbConnection owningConnection,DbConnectionOptions userOptions) +5311099 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool,DbConnectionOptions options,DbConnectionOptions userOptions) +37 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnectionOptions userOptions) +558 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnectionOptions userOptions) +67 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject,UInt32 waitForMultipleObjectsTimeout,Boolean allowCreate,Boolean onlyOneCheckConnection,DbConnectionOptions userOptions,DbConnectionInternal& connection) +1052 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject,TaskCompletionSource`1 retry,DbConnectionInternal& connection) +78 System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection,DbConnectionInternal& connection) +167 System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection,DbConnectionFactory connectionFactory,DbConnectionOptions userOptions) +143 System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) +83 System.Data.SqlClient.SqlConnection.Open() +96 Default.log(Object sender,EventArgs e) in c:userssreekanthdocumentsvisual studio 2010ProjectsIPCWebAppIPCWebAppDefault.aspx.cs:43 System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +115 System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +124 System.Web.UI.WebControls.ImageButton.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) +35 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,Boolean includeStagesAfterAsyncPoint) +1724 解决方法当您的应用程序没有足够的权限访问数据库时,Sql Server将触发此错误。这个错误有几个原因。要解决此错误,您应该遵循以下说明。>尝试使用管理工作室从服务器连接sql server。如果使用Windows身份验证连接sql server,则将应用程序池标识设置为服务器管理员。 >在对属性进行任何更改后重新启动sql server实例,因为某些更改将需要重新启动。 如果您进一步面对任何困难,那么您需要提供有关您的网站和sql服务器的更多信息。 (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- 单元测试 – 测试ASP.NET Web API多部分表单数据文件上载
- asp.net – Excel单元格对齐:例如,数值xlLeft,xlRight还是
- asp.net – 有人有一种方法来保持页面呈现一旦一个人已退出
- asp-classic – 经典ASP SQL注入
- 如何在ASP.NET MVC中使用flot和jQuery?
- 实体框架 – MVC3应用程序/服务层/存储库层/ POCO类/ EF4 –
- asp.net-mvc – 在MVC4中为ViewModel设置默认值的适当方法?
- asp.net – WebApi:将参数映射到标头值
- asp.net – ClaimsAuthenticationManager与IAuthentication
- asp.net-mvc – 如何让ASP.NET MVC在IIS 6中运行?
- asp.net-mvc – 汇编绑定重定向不工作
- asp.net-mvc – 在ASP.NET MVC中实现“记住我”功
- asp.net-mvc – 如何在ASP.NET MVC中创建旋转广告
- asp.net-mvc – 将参数传递给Azure Active Direc
- 如何在ASP.NET MVC模型中为POST保存选定的DropDo
- 剃刀 – MVC布局VS MVC主页
- asp.net-mvc – 使用部分页面的PagedList.MVC中的
- asp.net – 在自托管Web应用程序中使用性能计数器
- asp.net-mvc – ‘Personal’是一种类型,在给定的
- asp.net-mvc – 在哪里可以找到一个简单的简单解
