[thelist] ASP.Net - Setting up SQL Express

j s jslist at sbcglobal.net
Wed Mar 5 09:19:07 CST 2008


I set up a couple of grid pages, on an intranet, and want to restrict access to them.  Was aiming for Windows authentication.  SQL Express was installed on the C: drive of windows 2003 server with .Net 3, IIS 6.  D: the intranet installed on it.  Ran aspnet_regsql.exe to generate aspnetdb.  TCP/IP was enabled in the SQL Server Configuration Manager.  I have a dummy account set up with active directory called aspdata.  
In the web.config file it has
<clear />
<add name="LocalSQLServer" connectionString="Server=.\SQLEXPRESS:Database=aspnetdb;Trusted_Connection=Yes;">
<authentication mode="Windows" />
<identity impersonate="true" userName="aspdata at xxx.com" password="xxx">

In Visual Studio 2005, when I click on the web site administration tool  - then - Security an error comes back 
Cannot open database "aspnetdb" requested by the login. The login failed. Login failed for user 'xxx\ASPDATA'. 

So I tried to set up a login account in SQL Server Management Studio Express - still didn't work.

I had trouble updating the tables from the grid pages - and one of the things Microsoft recommended was using impersonation.  This is set up and working.

A while ago I set this up on my laptop flipped the database over to full sql and it ran fine - I didn't have to add alot of extra stuff in the web.config file.  So what ever is wrong - I need a really good guide to explain this.  

So Ken - I know you are a real guru at this.  Any ideas?  

Thanks
JS
----- Original Message ----
From: Ken Schaefer <Ken at adOpenStatic.com>
To: "thelist at lists.evolt.org" <thelist at lists.evolt.org>
Sent: Tuesday, March 4, 2008 10:01:49 PM
Subject: Re: [thelist] ASP.Net - Setting up SQL Express

Hi,

What is "over the network"? 

When you say "you have setup a login" - what exactly did you do?

What is the exact error message you are getting?

When you say you want to use impersonation - which user are you impersonating?

Cheers
Ken

-----Original Message-----
From: thelist-bounces at lists.evolt.org [mailto:thelist-bounces at lists.evolt.org] On Behalf Of j s
Sent: Wednesday, 5 March 2008 9:12 AM
To: thelist at lists.evolt.org
Subject: [thelist] ASP.Net - Setting up SQL Express

Hello,

I'm having an incredibly difficult time setting up sql express for and .net windows authetication.  Does anyone know of a really complete guide to do this?  It's over a network - sql express is on c: and the intranet sits on d: of the server.  I've been using impersonation and an error msg comes up Cannot open database aspnetdb requested by the login.  The login failed.  I've created a login for this on sql express - but it's not working.

Thx
--

* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !
-- 

* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester 
and archives of thelist go to: http://lists.evolt.org 
Workers of the Web, evolt ! 



More information about the thelist mailing list