Friday, February 24, 2012

Help me the webapplication cannot run

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
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
>
|||Msde Manager use .Net 1.1 ?
my system is install .Net 1.0. I download msde manager form your web But cannot install.
|||Hi Aurora,
Yes. In that case, just use the other standard win32 version (ie the
non-.NET version).
HTH,
Greg Low (MVP)
MSDE Manager SQL Tools
www.whitebearconsulting.com
"aurora" <anonymous@.discussions.microsoft.com> wrote in message
news:561E9539-392C-411B-8C46-1FB16922974C@.microsoft.com...
> Msde Manager use .Net 1.1 ?
> my system is install .Net 1.0. I download msde manager form your web But
cannot install.
>

No comments:

Post a Comment