Re: Access DB

  •  02-21-2008, 10:20 AM

    Re: Access DB

    Adam,
    There has got to be a step missing in your Access DB soultion page.
     
    Correct me if I am doing something wrong.
     
    I downloaded http://CuteSoft.net/download/Access_CuteChat.zip and renamed it to CuteChat4.mdb then copied the file to the /access directory.
    I then checked the Web.Config file and made sure the path was set correctly.
     

    <?xml version="1.0"?>
    <configuration>
     <appSettings> 
      <add key="DefaultAdminUsername" value="admin" />  
      <add key="ConnectionString" value="server=(local)\portal;uid=test;pwd=test;database=CuteChat4;connection reset=false;"/>

        <!--
     <add key="DatabaseType" value="MSAccess" />
      <add key="MSAccessFilePath" value="./access/CuteChat4.mdb" />
      -->   
        <!--
      <add key="DatabaseType" value="OracleOleDb" />
      <add key="ConnectionString" value="Provider=OraOLEDB.Oracle;Data Source=orcl;User Id=sysman;Password=admin;"/>
      -->
     </appSettings>
     
     
    Now I am getting the error:
     
       

    Server Error in '/fastchat/access' 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 209:			using(System.Data.IDbConnection conn=Instance.CreateConnection())
                Line 210:			{
                Line 211:				conn.Open();
                Line 212:
                Line 213:				using(System.Data.IDbCommand cmd=conn.CreateCommand())

    Source File: d:\hosting\inetguys\fastchat\access\Global.asax    Line: 211

    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) +359
                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
                ASP.ExampleProvider.GetUserInfo(String loginName, String& nickName, String& password, Boolean& isAdmin) in d:\hosting\inetguys\fastchat\access\Global.asax:211
                ASP.ExampleProvider.GetUserInfo(String loginName, String& nickName, Boolean& isAdmin) in d:\hosting\inetguys\fastchat\access\Global.asax:177
                CuteChat.ChatProvider.GetUserInfo(String loginName, String& nickName) +26
                ASP.login_aspx.LoginButton_Click(Object sender, EventArgs e) in d:\hosting\inetguys\fastchat\access\Login.aspx:84
                System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
                System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
                System.Web.UI.WebControls.Button.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) +5102
                


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

    Scott
View Complete Thread