OBJECT REFERENCE NOT SET TO AN INSTANCE OF AN OBJECT

Last post 08-03-2008 11:25 PM by chetan.sarode. 55 replies.

Sort Posts:

  • Re: OBJECT REFERENCE NOT SET TO AN INSTANCE OF AN OBJECT

    06-25-2008, 11:23 PM

    Just try with service pack, may it will solve the issue

    Chetan Sarode
    Software Engineer,
    Approva Systems Pvt Ltd,
    Pune, India.
  • Re: OBJECT REFERENCE NOT SET TO AN INSTANCE OF AN OBJECT

    07-05-2008, 12:35 PM
    • Loading...
    • kenbati
    • Joined on 01-30-2007, 12:54 AM
    • Posts 265

    I tried the service pack and it did install but did solve the problem.  I think this may be a simple problem with the server setup.  Also, when I tried to add new mdf file it says that the server timed out due to no response.

     

    Please help

    Without your help I can do nothing. When I help you and you can do something then do not forget to mark it as answer!!
  • Re: OBJECT REFERENCE NOT SET TO AN INSTANCE OF AN OBJECT

    07-06-2008, 11:31 PM

    Solve the problem or not

    Chetan Sarode
    Software Engineer,
    Approva Systems Pvt Ltd,
    Pune, India.
  • Re: OBJECT REFERENCE NOT SET TO AN INSTANCE OF AN OBJECT

    07-07-2008, 12:08 AM
    • Loading...
    • kenbati
    • Joined on 01-30-2007, 12:54 AM
    • Posts 265

    the problem is not resolved - please help

    Without your help I can do nothing. When I help you and you can do something then do not forget to mark it as answer!!
  • Re: OBJECT REFERENCE NOT SET TO AN INSTANCE OF AN OBJECT

    07-07-2008, 11:26 PM

    The solution what I provided is working for me

    I tried it on my m/c may, on my m/c only one instance of sql is running i.e. mssql (sql 2005 developer edition)

    Chetan Sarode
    Software Engineer,
    Approva Systems Pvt Ltd,
    Pune, India.
  • Re: OBJECT REFERENCE NOT SET TO AN INSTANCE OF AN OBJECT

    07-10-2008, 9:35 PM
    • Loading...
    • kenbati
    • Joined on 01-30-2007, 12:54 AM
    • Posts 265

    When I run this aspnet_regsql

    I get the following error

    etup failed.

    Exception:
    Unable to connect to SQL Server database.

    ----------------------------------------
    Details of failure
    ----------------------------------------

    System.Web.HttpException: Unable to connect to SQL Server database. ---> 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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
       at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject)
       at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
       at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
       at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
       at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
       at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
       at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
       at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
       at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
       at System.Data.SqlClient.SqlConnection.Open()
       at System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString)
       --- End of inner exception stack trace ---
       at System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString)
       at System.Web.Management.SqlServices.SetupApplicationServices(String server, String user, String password, Boolean trusted, String connectionString, String database, String dbFileName, SqlFeatures features, Boolean install)
       at System.Web.Management.SqlServices.Install(String database, SqlFeatures features, String connectionString)
       at System.Web.Management.ConfirmPanel.Execute()

     

     

    Without your help I can do nothing. When I help you and you can do something then do not forget to mark it as answer!!
  • Re: OBJECT REFERENCE NOT SET TO AN INSTANCE OF AN OBJECT

    07-13-2008, 11:33 AM
    • Loading...
    • kenbati
    • Joined on 01-30-2007, 12:54 AM
    • Posts 265

    Do we have any one from ms on this forum to help me?

    Without your help I can do nothing. When I help you and you can do something then do not forget to mark it as answer!!
  • Re: OBJECT REFERENCE NOT SET TO AN INSTANCE OF AN OBJECT

    07-13-2008, 2:50 PM
    • Loading...
    • TATWORTH
    • Joined on 02-04-2003, 8:34 AM
    • England
    • Posts 6,573

     I need some more background

    • What O/S is SQL Running under
    • Is the database hosted on the same server
    Don't forget to click "Mark as Answer" on the post that helped you.
    This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
  • Re: OBJECT REFERENCE NOT SET TO AN INSTANCE OF AN OBJECT

    07-13-2008, 2:53 PM
    • Loading...
    • TATWORTH
    • Joined on 02-04-2003, 8:34 AM
    • England
    • Posts 6,573

     You should investigate what the connection string should be like:

    1) Create an empty text file in windows explorer and rename it to X.UDL
    2) Double click on it and the datalink provider dialog will appear.
    3) Select the provider tab. Find the provider for SQL Server and click next.
    4) Select your database and select integrated authentication.
    5) Test the connection and save it.
    6) Compare the contents of X.UDL with your connections string.

    You could try looking on http://www.connectionstrings.com/ for a SQL Express example.

    Don't forget to click "Mark as Answer" on the post that helped you.
    This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
  • Re: OBJECT REFERENCE NOT SET TO AN INSTANCE OF AN OBJECT

    07-14-2008, 1:34 PM
    • Loading...
    • kenbati
    • Joined on 01-30-2007, 12:54 AM
    • Posts 265

    1 ok

    2 ok

    3 Do not see SQL server express but only see SQL server

    4 No list appears

     

    I am using VWD 2005 express with ms sql express

    Without your help I can do nothing. When I help you and you can do something then do not forget to mark it as answer!!
  • Re: OBJECT REFERENCE NOT SET TO AN INSTANCE OF AN OBJECT

    07-14-2008, 1:35 PM
    • Loading...
    • kenbati
    • Joined on 01-30-2007, 12:54 AM
    • Posts 265

    1 ok

    2 ok

    3 Do not see SQL server express but only see SQL server

    4 No list appears

     

    I am using VWD 2005 express with ms sql express,

    Without your help I can do nothing. When I help you and you can do something then do not forget to mark it as answer!!
  • Re: OBJECT REFERENCE NOT SET TO AN INSTANCE OF AN OBJECT

    07-14-2008, 1:37 PM
    • Loading...
    • kenbati
    • Joined on 01-30-2007, 12:54 AM
    • Posts 265

    ms window xp with uptodate service and security packs

    Without your help I can do nothing. When I help you and you can do something then do not forget to mark it as answer!!
  • Re: OBJECT REFERENCE NOT SET TO AN INSTANCE OF AN OBJECT

    07-14-2008, 1:43 PM
    • Loading...
    • TATWORTH
    • Joined on 02-04-2003, 8:34 AM
    • England
    • Posts 6,573

     

    kenbati:

    1 ok

    2 ok

    3 Do not see SQL server express but only see SQL server

    4 No list appears

    The lack of list is disturbing - I suggest you setting up an X.UDL on a working development machine.

    Don't forget to click "Mark as Answer" on the post that helped you.
    This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
  • Re: OBJECT REFERENCE NOT SET TO AN INSTANCE OF AN OBJECT

    07-14-2008, 2:36 PM
    • Loading...
    • kenbati
    • Joined on 01-30-2007, 12:54 AM
    • Posts 265

    Shoudl I see SQL SERVER EXPRESS IN THE LIST??

    ALL I AM USING IS MY PC FOR DEVELOPMENT

    Without your help I can do nothing. When I help you and you can do something then do not forget to mark it as answer!!
  • Re: OBJECT REFERENCE NOT SET TO AN INSTANCE OF AN OBJECT

    07-14-2008, 11:42 PM

    Open "SQL Server Surface Area Configuration"

    then opne the "Surface Area Configuartion for Services and Connections "

    Under the Remote connection u have to enable the "Using both TCP/IP and Named  Pipes "

    then It will work..

    Try to set Data Source= "serverName" in you connectionString

    Data Source=.\SQLEXPRESS will work only on local m/c, It will not work if you host your site

    Chetan Sarode
    Software Engineer,
    Approva Systems Pvt Ltd,
    Pune, India.
Page 2 of 4 (56 items) < Previous 1 2 3 4 Next >