Re: Server Error in '/MyWebForm' Application

From: Greg Burns (greg_burns_at_DONT_SPAM_ME_homtail.com)
Date: 09/17/04


Date: Thu, 16 Sep 2004 21:27:53 -0400

Edward Mitchell wrote:
> Greg,
>
> I'm a neophyte here, just trying to get a first ASP.NET test program to
> work.

I feel your pain. :^)

> I am running IIS on my XP workstation. No one else needs to get at
> it for now.
>
> It seems that I shouldn't be using <identity impersonate="true">.

Not needed here.

> All I want to do at the moment is to run the test under my account which should be
> the "integrated windows account" since I have admistrator privileges.
>

You could connect as yourself and it would work since you are
administrator, but this is NOT the recommended approach. Normally you
connect to a database as a single user, not just anybody who happens to
run your web page. This allows connection pooling to do its thing. (Of
course, this also may not be the correct approach depending on the
secuirty design of your database.)

> I don't have SQL Server, just the MSDE engine that I can use to test. The
> "select @@version" from osql shows Desktop Engine 5.1; SP2 though after "SQL
> Server 2000 - 8.00.760."
>

You know you can buy the Developer Edition of SQL 2000 for under $50.
This gives you everything in Enterpise verion of SQL, but only with a
for development only license.

> There is a user account on the machine "ASP.NET MachineA..." that is
> described as a limited account, password protected although I didn't create
> is as far as I know! I can't find an ASPNET account.

You won't see the ASPNET user acount in the sugar coated Users icon in
control panel. It is a "hidden" account by default. If your
right-click My Computer->Manage->Local Users & Groups you will see the
ASPNET here.

When anonymous access is turned on for the virtaul directory in IIS, and
  your access an .aspx page, it will run under the ASPNET user. This
account (ASPNET) is auto-created when you installed DOTNET. Its
password is also auto-generated, so don't change it or things will break.

> How would I give it rights under the SQL Enterprise Manager. Is this part of
> MSDE?

As you probably realized, MSDE does NOT come with a GUI. Hence, no
Enterprise Manager. Sure, you can do what you need using the command
window and OSQL, but you probably don't want to go there if you're just
getting started. (Or even after you obtain your MCDBA!) If you plan on
doing anything useful with SQL at all, you need to get EM.

>
> Regards,
>
> Ed

Leave the virtual directory set to Anonymous (this is the default,
unless you changed it).

I see in another post you are using the wizards, which fortunately for
me (unfortunate for you) I've never used. I do everything manually.
Which makes things so much more understandable, as far as what is
happening, but I digress...

When you use either "Integrated
Security=SSPI;" in your connection string OR "Trusted_Connection=true;"
(they are interchangeable) you will connect to your MSDE database as the
built in ASPNET user account (unless your also have identity
impersonate="true", in which case you will connect as the "actual user
on the domain requesting the page" credits to Karl).

The real issue you are having is how to give the ASPNET user access to
your MSDE instance and the specific database within that MSDE instance.

I would suggest (since this is just for learning), adding the ASPNET
account into your local adminstrators group on your PC. Any user in
that group is also an administrator for the SQL/MSDE server on the
machine. This is of course highly unsecure, but will still allow you to
use Integrated Security and not have to specify a SQL username/password
(which may not even work if your instance of MSDE is not in mixed-mode,
which I don't think it is by default...) or to connect to your web page
as yourself.

HTH,
Greg



Relevant Pages

  • Re: Server Error in /MyWebForm Application
    ... > Thanks also for the info that I can get the SQL 2000 for fifty bucks. ... >> connect to a database as a single user, not just anybody who happens to ... >> your access an .aspx page, it will run under the ASPNET user. ... MSDE does NOT come with a GUI. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: What version of SQL is on SBS R2 Standard and can I use it?
    ... named instance but default for SQL Express). ... A user level account works ... super administrative purposed within SQL Server and is not the same as the ... you can have MSDE and 2005 Express ...
    (microsoft.public.windows.server.sbs)
  • Re: Server Error in /MyWebForm Application
    ... >> I don't have SQL Server, just the MSDE engine that I can use to test. ... >> described as a limited account, ... I can't find an ASPNET account. ... > your access an .aspx page, it will run under the ASPNET user. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Global.asax not allowing identity impersonation?
    ... Forgot to mention the other reason that led me to believe that it was ... related to the ASPNET user. ... When I add that account back into SQL ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: How to backup MSDE db to Samba share
    ... System Account, not "sa" (which is not a real Windows ... It has null credentials on the network and therefore does ... You can change the MSDE service to run in a specific account by changing its ... > How can an MSDE database be backed up to a Samba share on a Unix server? ...
    (microsoft.public.sqlserver.msde)