Unable to connect to SQL Server database

Discussion in 'ASP .Net Security' started by James, Oct 4, 2006.

  1. James

    James Guest

    Hello

    I am new to ASP and I am using ASP.Net Visual Web Developer Express Edition.

    I have been following 'How To' videos online and I am currently trying to
    add Login forms.

    When I first go to add a Role, by clicking on the ASP.Net Configuration
    button, then select Security like it shows me in the video, it waits for a
    long time then comes up with:

    There is a problem with your selected data store. This can be caused by an
    invalid server name or credentials, or by insufficient permission. It can
    also be caused by the role manager feature not being enabled. Click the
    button below to be redirected to a page where you can choose a new data
    store.

    The following message may help in diagnosing the problem: Unable to connect
    to SQL Server database.

    Can anyone shed some light on to why this is happening as I cannot find
    anything about it anywhere.

    Many thanks

    James
    James, Oct 4, 2006
    #1
    1. Advertising

  2. James

    James Guest

    Hi

    THanks for your post,

    Sorry but I do not understand, connection to what? I am just following the
    How To videos from Microsoft. Is there something I should do first?

    James

    "Gaurav Vaish (www.EdujiniOnline.com)" wrote:

    > > The following message may help in diagnosing the problem: Unable to
    > > connect
    > > to SQL Server database.

    >
    > Problem with connection string!
    > Trusted_Connection=true does not work since ASPNet user, under which ASP.Net
    > application runs, is not a trusted user.
    >
    > Better use SQL mode of authentication with a specific username/password.
    > Elevating permissions to the user is another way out... but I would not
    > recommend it.
    >
    >
    > --
    > Happy Hacking,
    > Gaurav Vaish | www.mastergaurav.com
    > www.edujinionline.com
    > http://articles.edujinionline.com/webservices
    > -----------------------------------------
    >
    >
    >
    James, Oct 5, 2006
    #2
    1. Advertising

  3. James u can use Windows Auth by going to IIS right clcik on the website >
    Directory settings>Edit> Disable Anonymous Access > Enalble Integrated
    security
    Use one of this connections below
    Trusted Connection:

    "Data Source=Aron1;Initial Catalog=pubs;Integrated Security=SSPI;"
    - or -
    "Server=Aron1;Database=pubs;Trusted_Connection=True;"

    Now it will use your "MachineName/ASPNET" to connect..
    Go to SQLserver logins and add "MachineName/ASPNET" acct.
    Go to ur table ,database etc.. and give the acct the required permission.
    Hope that helps
    Patrick



    "James" <> wrote in message
    news:...
    > Hi
    >
    > THanks for your post,
    >
    > Sorry but I do not understand, connection to what? I am just following the
    > How To videos from Microsoft. Is there something I should do first?
    >
    > James
    >
    > "Gaurav Vaish (www.EdujiniOnline.com)" wrote:
    >
    >> > The following message may help in diagnosing the problem: Unable to
    >> > connect
    >> > to SQL Server database.

    >>
    >> Problem with connection string!
    >> Trusted_Connection=true does not work since ASPNet user, under which
    >> ASP.Net
    >> application runs, is not a trusted user.
    >>
    >> Better use SQL mode of authentication with a specific username/password.
    >> Elevating permissions to the user is another way out... but I would not
    >> recommend it.
    >>
    >>
    >> --
    >> Happy Hacking,
    >> Gaurav Vaish | www.mastergaurav.com
    >> www.edujinionline.com
    >> http://articles.edujinionline.com/webservices
    >> -----------------------------------------
    >>
    >>
    >>
    Patrick.O.Ige, Oct 6, 2006
    #3
  4. James

    James Guest

    Hi

    thanks for your replies. I actualy found the answer, I needed to download
    and install a SQL Server Component, I went to add a SQL Database and it gave
    me a link to the download.

    Now it works fine

    Many thanks

    James

    "Patrick.O.Ige" wrote:

    > James u can use Windows Auth by going to IIS right clcik on the website >
    > Directory settings>Edit> Disable Anonymous Access > Enalble Integrated
    > security
    > Use one of this connections below
    > Trusted Connection:
    >
    > "Data Source=Aron1;Initial Catalog=pubs;Integrated Security=SSPI;"
    > - or -
    > "Server=Aron1;Database=pubs;Trusted_Connection=True;"
    >
    > Now it will use your "MachineName/ASPNET" to connect..
    > Go to SQLserver logins and add "MachineName/ASPNET" acct.
    > Go to ur table ,database etc.. and give the acct the required permission.
    > Hope that helps
    > Patrick
    >
    >
    >
    > "James" <> wrote in message
    > news:...
    > > Hi
    > >
    > > THanks for your post,
    > >
    > > Sorry but I do not understand, connection to what? I am just following the
    > > How To videos from Microsoft. Is there something I should do first?
    > >
    > > James
    > >
    > > "Gaurav Vaish (www.EdujiniOnline.com)" wrote:
    > >
    > >> > The following message may help in diagnosing the problem: Unable to
    > >> > connect
    > >> > to SQL Server database.
    > >>
    > >> Problem with connection string!
    > >> Trusted_Connection=true does not work since ASPNet user, under which
    > >> ASP.Net
    > >> application runs, is not a trusted user.
    > >>
    > >> Better use SQL mode of authentication with a specific username/password.
    > >> Elevating permissions to the user is another way out... but I would not
    > >> recommend it.
    > >>
    > >>
    > >> --
    > >> Happy Hacking,
    > >> Gaurav Vaish | www.mastergaurav.com
    > >> www.edujinionline.com
    > >> http://articles.edujinionline.com/webservices
    > >> -----------------------------------------
    > >>
    > >>
    > >>

    >
    >
    >
    James, Oct 6, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jamezw
    Replies:
    2
    Views:
    3,588
    jamezw
    Jun 17, 2005
  2. =?Utf-8?B?Q2FpbGlu?=

    Unable to connect to the Sql server database

    =?Utf-8?B?Q2FpbGlu?=, Sep 9, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    2,652
    Patrick.O.Ige
    Sep 12, 2005
  3. Peter Afonin
    Replies:
    2
    Views:
    759
    Peter Afonin
    Oct 8, 2006
  4. ZZ_Scarab
    Replies:
    2
    Views:
    2,412
    ravish
    Jan 5, 2011
  5. James
    Replies:
    2
    Views:
    447
    James
    Oct 4, 2006
Loading...

Share This Page