Unable to connect to SQL Server database

Last post 07-04-2009 12:28 AM by AvanthaSiriwardana. 12 replies.

Sort Posts:

  • Unable to connect to SQL Server database

    06-30-2009, 12:28 AM
    • Member
      5 point Member
    • coderchef
    • Member since 06-30-2009, 3:21 AM
    • Posts 11

    Unfortunately I have run into a problem where I am not able to access my security settings in the asp.net configuration.

    I get:
    "Unable to connect to SQL Server Database."

    I have run aspnet_regsql.exe like it suggested but no help.

    I previously connected a sqlserver 2008 database to visual web developer 2008 sp1

    My web research has turned up empty.

    Thank you

  • Re: Unable to connect to SQL Server database

    06-30-2009, 3:28 AM
    • Member
      94 point Member
    • reza141414
    • Member since 06-17-2009, 2:50 PM
    • iran
    • Posts 63

    hi

    can you see your seeting from project->asp.net configuration in security tab or not?

    for example number of your user?

  • Re: Unable to connect to SQL Server database

    06-30-2009, 11:33 AM
    • Member
      5 point Member
    • coderchef
    • Member since 06-30-2009, 3:21 AM
    • Posts 11

    Thank you for your response,


    I am not able to view anything other than the message ont the security tab


    http://4.bp.blogspot.com/_qFuBktPwZYQ/SkotQVEGMcI/AAAAAAAAEZ4/5ge2MDmA_as/s1600-h/vwd1.JPG

    http://1.bp.blogspot.com/_qFuBktPwZYQ/SkotzWrvbNI/AAAAAAAAEaA/X7iPdsqGKW4/s1600-h/vwd2.JPG

    http://1.bp.blogspot.com/_qFuBktPwZYQ/SkouXq92NYI/AAAAAAAAEaI/aodtZgN3CpM/s1600-h/vd3.JPG


    I have made a connection to an sqlserver express database that seems to work ok

    http://4.bp.blogspot.com/_qFuBktPwZYQ/SkpeqXwyYwI/AAAAAAAAEaQ/OdHkuxiZCsc/s1600-h/data+connecton.JPG


    My connection string is:

    <connectionStrings>
        <add name="AlphaMConnectionString" connectionString="Data Source=ALIEN\SQLEXPRESS;Initial Catalog=AlphaM;Integrated Security=True"
         providerName="System.Data.SqlClient" />
      </connectionStrings>

  • Re: Unable to connect to SQL Server database

    07-01-2009, 2:15 AM
    • Member
      94 point Member
    • reza141414
    • Member since 06-17-2009, 2:50 PM
    • iran
    • Posts 63

    hi boy;

    see this link:

    http://msdn.microsoft.com/en-us/library/ms998314.aspx

    and

    http://social.msdn.microsoft.com/Forums/en-US/winformsdatacontrols/thread/9e0afc71-5156-44b2-9443-b05c74376c62


  • Re: Unable to connect to SQL Server database

    07-01-2009, 3:13 AM
    Answer

    Hi
    Unfortunately I alos came up with the same issue when i was configuring that connection to the server. I also did every thing what these people have mentioned and nothing worked out.
    What i did was, uninstall the VS and the SQL Server and then Install VS first and SQL Server 2nd and i solved my problem.

    Hi


    Unfortunately I alos came up with the same issue when i was configuring that connection to the server. I also did every thing what these people have mentioned and nothing worked out.


    What i did was, uninstall the VS and the SQL Server and then Install VS first and SQL Server 2nd and i solved my problem.

    Avantha Siriwardana
    Beware of bugs in the above code; I have only proved it correct, not tried it.
    (Donald Knuth)
    http://www.linkedin.com/in/avanthasiriwardana
  • Re: Unable to connect to SQL Server database

    07-01-2009, 3:20 AM

     there can be several things
    could be no permissions
    could be no remote access
    could be serevr service not started
    could be worng username and pasword
    could be that the user name or password have been changed
    one by one..
    check if the service is statrted first of all
    from the SQL Server configuration manager
    then check if he can log into the server from managem,ent studio
    then check if there is connectivity from teh asp.net application machine to the SQL server machine

     there can be several things

    could be no permissions

    could be no remote access

    could be serevr service not started

    could be worng username and pasword

    could be that the user name or password have been changed



    one by one..

    check if the service is statrted first of all

    from the SQL Server configuration manager

    then check if he can log into the server from managem,ent studio

    then check if there is connectivity from teh asp.net application machine to the SQL server machine

    Avantha Siriwardana
    Beware of bugs in the above code; I have only proved it correct, not tried it.
    (Donald Knuth)
    http://www.linkedin.com/in/avanthasiriwardana
  • Re: Unable to connect to SQL Server database

    07-01-2009, 3:24 PM
    • Member
      5 point Member
    • coderchef
    • Member since 06-30-2009, 3:21 AM
    • Posts 11

    Thank you,

    I have went through those steps. Everything is a check.

    I have been able to link the database with VWD and create some pages with the data such as gridviews.

    Its just when I go into the security tab to create a user login is where I get the "Unable to connect to SQL Server database"

    I am currently looking to see if the role manager is the problem.

  • Re: Unable to connect to SQL Server database

    07-02-2009, 1:58 AM

    if its windows authentication then check whether you have the

    privileges to create roles. Try to give the administrator role and then create a user and see..



    Avantha Siriwardana
    Beware of bugs in the above code; I have only proved it correct, not tried it.
    (Donald Knuth)
    http://www.linkedin.com/in/avanthasiriwardana
  • Re: Unable to connect to SQL Server database

    07-02-2009, 7:49 AM
    • Star
      11,839 point Star
    • shahed.kazi
    • Member since 07-09-2008, 2:15 AM
    • Sydney, Australia
    • Posts 2,328

    Check if you are passing on the correct credentials to connect to the sql server.

  • Re: Unable to connect to SQL Server database

    07-02-2009, 8:57 PM
    • Member
      5 point Member
    • coderchef
    • Member since 06-30-2009, 3:21 AM
    • Posts 11

    Problem Resolved


    Did a complete uninstall and reinstalled a fresh VWD2008 express and SQL server 2008 express and I am now able to access the security tabs page.

    Thank you for your responses and help

  • Re: Unable to connect to SQL Server database

    07-02-2009, 11:20 PM

    Then why can't you my 1st answer as the correct one. please do that whn you get a correct answer pal.


    Tnks

    Avantha 

    Avantha Siriwardana
    Beware of bugs in the above code; I have only proved it correct, not tried it.
    (Donald Knuth)
    http://www.linkedin.com/in/avanthasiriwardana
  • Re: Unable to connect to SQL Server database

    07-03-2009, 10:39 AM
    • Member
      5 point Member
    • coderchef
    • Member since 06-30-2009, 3:21 AM
    • Posts 11

    sorry about that

    new to forum. should be all set

    thanks again

  • Re: Unable to connect to SQL Server database

    07-04-2009, 12:28 AM

    NO Prob


    All the best

    Avantha Siriwardana
    Beware of bugs in the above code; I have only proved it correct, not tried it.
    (Donald Knuth)
    http://www.linkedin.com/in/avanthasiriwardana
Page 1 of 1 (13 items)