Login problem: MSDE from ASP.Net

G

Gary Frank

I have just begun learning ASP.Net. I created another MSDE database. But I
can't get past the login problems. "Predict" is the name of the database.
"GARY" is the Windows user account name. The error message is as follows:

Cannot open database requested in login 'Predict'. Login fails. Login failed
for user 'GARY\ASPNET'.

I used the following 2 connection strings. Neither works.

data source=(local)\VSdotNET;database=Predict;integrated security=true

workstation id=GARY;packet size=4096;integrated security=SSPI;data
source="GARY\VSDOTNET";persist security info=False;initial catalog=Predict

Does anyone know what MSDE might be looking for here?
 
N

Norman Yuan

Obviously, your ASP.NET app is running on the default user account
"MachineName\ASPNET" (i.e. GARY\ASPNET, in your case). You need grant this
user account access to the MSDE/SQL Server.
If you have SQL Server Enterprise Manager or other SQL Server/MSDE
management tool, it will be fairly easy to create a new SQL Server login for
that user account and grant it access to target database. It you do not have
Enterprise Manager or other UI tool, you need to use osql.exe to run a few
SPs in SQL Server/MSDE to do just that (I used to use osql years ago, but
now I could not remeber those SPs' name anymore since I use Enterprise
Manager to do that. Search MS Knowledgebase or google on oqsl.exe will
definitely give your enough links on this regard).
 
G

Gary Frank

I just have MSDE and administer it from server explorer. Do you know where
I can get SQL Server Enterprise Manager or another SQL Server/MSDE
management tool? Do they cost a lot of money?
 
W

William \(Bill\) Vaughn

Sorry, MSDE is a deployment engine, not a development tool. If you get the
$49 (or less) "Developer Edition" of SQL Server, it has all the tools you
need.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top