Re: Help me the webapplication cannot run

From: Greg Low \(MVP\) (greglow_at_lowell.com.au)
Date: 04/13/04


Date: Tue, 13 Apr 2004 15:25:06 +1000

Hi Aurora,

It looks like the ASPNET account on your computer has not been given
permission to access the database you are using. Check the logon/permissions
for this user using Enterprise Manager (if you have it) or you could use the
personal edition (free) of our MSDE Manager (at our site) to do it.

HTH,

-- 
Greg Low (MVP)
MSDE Manager SQL Tools
www.whitebearconsulting.com
"Aurora" <tooktoon55@hotmail.com> wrote in message
news:25504584-238B-4D97-8A34-284C437F3413@microsoft.com...
> When I setup the msde2000 and use Vc#.net create program webapplication
for show the database on web.
> I use the  Datagrid control  for show the result database on web. In the
IDE of Vc# I use Server Exploler select the Northwind.mdf  and drag&drop the
table Customers and create sqlDataAdapter, sqlConnection and dataSet for it.
> and contain it to the datagrid.  Final I write the source code for it
>
> private void Page_Load(object sender, System.EventArgs e)
> {
> // Put user code to initialize the page here
> sqlDataAdapter1.Fill(dataSet11);
> DataGrid1.DataBind();
> }
> the Vc#  compile is completed. and the webapp. is show complete too.
> But When I create new database in Server Exploler  (ETC test.mdf ) and
create table in the database.(table name is 'TEST')
> And now I create field id  and name. And input the value in the id and
name.
> And then the every step is same when I use the northwind.mdf ...
> And compile the program .... Vc# IDE is compile complete ..no error But
the webapp is show
>
> Server Error in '/dbtest2' Application.
> --------------------------------------------------------------------------
------
>
> Cannot open database requested in login 'test'. Login fails. Login failed
for user 'COMPUTER\ASPNET'.
> Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
>
> Exception Details: System.Data.SqlClient.SqlException: Cannot open
database requested in login 'test'. Login fails. Login failed for user
'COMPUTER\ASPNET'.
>
> Source Error:
>
>
> Line 29: {
> Line 30: // Put user code to initialize the page here
> Line 31: sqlDataAdapter1.Fill(dataSet11);
> Line 32: DataGrid1.DataBind();
> Line 33: }
>
>
> Source File: c:\inetpub\wwwroot\dbtest2\webform1.aspx.cs    Line: 31
>
> Help me for the problem. I think the test.mdf is not permission to the use
it.But the northwind can...
> How i create the database looklike to northwind Because the northwind is
not error but the new database  is error
> p.s. my computer name is  COMPUTER
> system ..... winxp+ sp1
>            .....vs.net 2002
>           ..... msde include in vs.net  and setup by advice of the Net
framwork sdk ''sample and quickstart tutorial
> thank you
>


Relevant Pages

  • Re: code access security
    ... Error 1 CREATE ASSEMBLY for assembly 'GmsSqlClr' failed because assembly ... owner has EXTERNAL ACCESS ASSEMBLY permission and the database has the ... make sure the database owner is mapped to the correct login on ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: db_owner role in SQL 2k
    ... Windows login name. ... login that is the owner of a database and members of the sysadmin role. ... >> the username dbo" ... >> FULL permission to do anything and everything. ...
    (microsoft.public.sqlserver.programming)
  • Re: PDO: Switch database user without reopening connection
    ... At the bare minimum there will be a login user who only has ... modifications to the database as well (editors get update permission, ... As database connections are expensive to ... a certain visitor in the Session, and use that value to start the right ...
    (comp.lang.php)
  • Re: PDO: Switch database user without reopening connection
    ... At the bare minimum there will be a login user who only has ... the postgres user they are logged in as to one that can make ... modifications to the database as well (editors get update permission, ... As database connections are expensive to ...
    (comp.lang.php)
  • RE: How to allow users to change their password?
    ... be set up to provide the Security dialog window for password changes. ... I'll have to login using their login ... > name/password first. ... See http://www.QBuilt.com for all your database needs. ...
    (microsoft.public.access.security)

Loading