What has gone wrong Please

Last post 10-17-2007 8:52 PM by bbudz. 1 replies.

Sort Posts:

  • What has gone wrong Please

    10-17-2007, 6:49 PM
    • Loading...
    • StarUK
    • Joined on 09-30-2007, 9:47 AM
    • Posts 1

    I have been following the personal website template and the notes that accompany it. Got the site working So thought I would go to the advance documentation

    http://msdn2.microsoft.com/en-us/library/ms972963.aspx

     http://msdn2.microsoft.com/en-us/library/aa479336.aspx

    Followed the instruction or so I thought (doing too much thinking) now I get this error when I transfer it to my host site

    Server Error in '/' Application.

    An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not 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: An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

    Source Error:

    Line 5:  	Sub Application_Start(ByVal sender As [Object], ByVal e As EventArgs)
    Line 6:  		AddHandler SiteMap.SiteMapResolve, AddressOf Me.AppendQueryString
    Line 7:  		If (Roles.RoleExists("Administrators") = False) Then
    Line 8:  			Roles.CreateRole("Administrators")
    Line 9:  		End If

    Source File: E:\web\allstarukin\htdocs\global.asax    Line: 7

    Stack Trace:

    [SqlException (0x80131904): An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)]
       System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +739123
       System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188
       System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject) +685966
       System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +109
       System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +383
       System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +181
       System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170
       System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +130
       System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
       System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424
       System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
       System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496
       System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
       System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
       System.Data.SqlClient.SqlConnection.Open() +111
       System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +84
       System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +197
       System.Web.Security.SqlRoleProvider.RoleExists(String roleName) +482
       System.Web.Security.Roles.RoleExists(String roleName) +242
       ASP.global_asax.Application_Start(Object sender, EventArgs e) in E:\web\allstarukin\htdocs\global.asax:7
    


    Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832

     

    What does all this mean and where can I find a solution in plain English..................I have been reading the forum and cannot see a solution or if I have I am just not understanding it.

     

    Thank you in advance for helping

  • Re: What has gone wrong Please

    10-17-2007, 8:52 PM
    Answer
    • Loading...
    • bbudz
    • Joined on 08-02-2007, 7:34 PM
    • Posts 97

    Boy I'am all to familiar with that error!  Double check your connection string, since you moved your application your connection string has to be updated.  Also make sure that the server that is hosting the application supports SQL databases (in my case it didn't so I had to switch over to access). 

    The problem could also be, as the error says, by default SQL server does not allow remote connections.  You have to use the Surface Are confiugration tool to configure it.  There was an article somewhere on how to do it... I'll see if I can find it for you.

    Bart

Page 1 of 1 (2 items)
Microsoft Communities
Page view counter