Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > Unable to connect to SQL Server database

Reply
Thread Tools

Unable to connect to SQL Server database

 
 
James
Guest
Posts: n/a
 
      10-04-2006
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

 
Reply With Quote
 
 
 
 
James
Guest
Posts: n/a
 
      10-05-2006
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
> -----------------------------------------
>
>
>

 
Reply With Quote
 
 
 
 
Patrick.O.Ige
Guest
Posts: n/a
 
      10-06-2006
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=Tru e;"

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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>> -----------------------------------------
>>
>>
>>



 
Reply With Quote
 
James
Guest
Posts: n/a
 
      10-06-2006
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=Tru e;"
>
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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
> >> -----------------------------------------
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASPNETDB Problem - Unable to connect to SQL Server database ZZ_Scarab ASP .Net Security 2 01-05-2011 03:45 AM
"Unable to connect to SQL Server database" error when using profile Peter Afonin ASP .Net 2 10-08-2006 07:38 PM
Unable to connect to SQL Server database. James ASP General 2 10-04-2006 02:14 PM
Unable to connect to the Sql server database =?Utf-8?B?Q2FpbGlu?= ASP .Net 2 09-12-2005 09:50 AM
Unable to connect to SQL Server session database jamezw ASP .Net 2 06-17-2005 12:44 PM



Advertisments