Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_beginners thread: Unable to display WebForm in the Browser


Message #1 by "Arnold G. Higuit" <arnoldgh@p...> on Mon, 3 Mar 2003 04:18:24
Hi,
    I am trying to run the code below but it only displays the Title in 
my Browser (IE 6.0), it does not display the DataGrid. I have actually 
created a virtual directory in the IIS and linked that virtual directory 
to one of my folder in d: drive. This code is actually from the Book 
(Beginning ASP.NET using C#). Please help as I cannot figure out what is 
wrong with this code. Thank you very much.

Regards,
Arnold


Here is the code:

<%@ Import namespace="System.Data" %>
<%@ Import namespace="System.Data.OleDb" %>

<HTML>
	<HEAD>
		<title>Connecting to an Access Database</title>
	</HEAD>
	<body>
		<h3>Connecting to an Access Database</h3>
		<asp:DataGrid id="dgSuppliers" runat="server" />
	</body>
</HTML>

<script Language="c" runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
	String strConnection="Provider=Microsoft.Jet.OleDb.4.0;data 
source=D:\\Northwind.mdb;"
	OleDbConnection objConnection = new OleDbConnection
(strConnection);
	
	String strSQL = "SELECT SupplierID, CompanyName FROM Suppliers";
	OleDbCommand objCommand = new OleDbCommand(strSQL, objConnection);
	
	objConnection.Open();
	dgSuppliers.DataSource = objCommand.ExecuteReader();
	dgSuppliers.DataBind();
	objConnection.Close();
}
</script>
Message #2 by "Arnold G. Higuit" <arnoldgh@p...> on Mon, 3 Mar 2003 04:25:46
Hi,
    I am trying to run the code below but only the Title is displayed in 
the Browser (IE 6.0) and not the DataGrid control. I have actually 
created a virtual directory in the IIS and link this directory to one of 
my folders in d: drive. This code is actually from the book (Beginning 
ASP.NET using C#). I have just modified the path of the Northwind 
database. Please help as I cannot figure out the problem of this code. 
Thank you very much.
    

Regards,
Arnold

Here is the code:
    
<%@ Import namespace="System.Data" %>
<%@ Import namespace="System.Data.OleDb" %>

<HTML>
	<HEAD>
		<title>Connecting to an Access Database</title>
	</HEAD>
	<body>
		<h3>Connecting to an Access Database</h3>
		<asp:DataGrid id="dgSuppliers" runat="server" />
	</body>
</HTML>

<script Language="c" runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
	String strConnection="Provider=Microsoft.Jet.OleDb.4.0;data 
source=D:\\Northwind.mdb;"
	OleDbConnection objConnection = new OleDbConnection
(strConnection);
	
	String strSQL = "SELECT SupplierID, CompanyName FROM Suppliers";
	OleDbCommand objCommand = new OleDbCommand(strSQL, objConnection);
	
	objConnection.Open();
	dgSuppliers.DataSource = objCommand.ExecuteReader();
	dgSuppliers.DataBind();
	objConnection.Close();
}
</script>
Message #3 by irfan.syed@g... on Mon, 3 Mar 2003 12:30:56 +0800
Well I don't really program in C# but try this.

1. Change language in script opening tag to C#
2. Declare a dataset object and take the records into a dataset and then
bind the table of dataset to the datagrid.

HTH,
Irfan

-----Original Message-----
From: Arnold G. Higuit [mailto:arnoldgh@p...]
Sent: Monday, March 03, 2003 12:18 PM
To: aspx_beginners
Subject: [aspx_beginners] Unable to display WebForm in the Browser


Hi,
    I am trying to run the code below but it only displays the Title in
my Browser (IE 6.0), it does not display the DataGrid. I have actually
created a virtual directory in the IIS and linked that virtual directory 

to one of my folder in d: drive. This code is actually from the Book
(Beginning ASP.NET using C#). Please help as I cannot figure out what is 

wrong with this code. Thank you very much.

Regards,
Arnold


Here is the code:

<%@ Import namespace=3D"System.Data" %>
<%@ Import namespace=3D"System.Data.OleDb" %>

<HTML>
	<HEAD>
		<title>Connecting to an Access Database</title>
	</HEAD>
	<body>
		<h3>Connecting to an Access Database</h3>
		<asp:DataGrid id=3D"dgSuppliers" runat=3D"server" />
	</body>
</HTML>

<script Language=3D"c" runat=3D"server">
private void Page_Load(object sender, System.EventArgs e)
{
	String strConnection=3D"Provider=3DMicrosoft.Jet.OleDb.4.0;data
source=3DD:\\Northwind.mdb;"
	OleDbConnection objConnection =3D new OleDbConnection
(strConnection);
=09
	String strSQL =3D "SELECT SupplierID, CompanyName FROM Suppliers";
	OleDbCommand objCommand =3D new OleDbCommand(strSQL, objConnection);
=09
	objConnection.Open();
	dgSuppliers.DataSource =3D objCommand.ExecuteReader();
	dgSuppliers.DataBind();
	objConnection.Close();
}
</script>
Message #4 by "Alan Chiu" <achiu@m...> on Mon, 3 Mar 2003 09:40:05 -0500
Change this line:

<script Language="c#" runat="server">

Alan

-----Original Message-----
From: Arnold G. Higuit [mailto:arnoldgh@p...] 
Sent: Monday, March 03, 2003 4:26 AM
To: aspx_beginners
Subject: [aspx_beginners] Unable to display WebForm in the Browser


Hi,
    I am trying to run the code below but only the Title is displayed in

the Browser (IE 6.0) and not the DataGrid control. I have actually 
created a virtual directory in the IIS and link this directory to one of

my folders in d: drive. This code is actually from the book (Beginning 
ASP.NET using C#). I have just modified the path of the Northwind 
database. Please help as I cannot figure out the problem of this code. 
Thank you very much.
    

Regards,
Arnold

Here is the code:
    
<%@ Import namespace="System.Data" %>
<%@ Import namespace="System.Data.OleDb" %>

<HTML>
	<HEAD>
		<title>Connecting to an Access Database</title>
	</HEAD>
	<body>
		<h3>Connecting to an Access Database</h3>
		<asp:DataGrid id="dgSuppliers" runat="server" />
	</body>
</HTML>

<script Language="c" runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
	String strConnection="Provider=Microsoft.Jet.OleDb.4.0;data 
source=D:\\Northwind.mdb;"
	OleDbConnection objConnection = new OleDbConnection
(strConnection);
	
	String strSQL = "SELECT SupplierID, CompanyName FROM Suppliers";
	OleDbCommand objCommand = new OleDbCommand(strSQL,
objConnection);
	
	objConnection.Open();
	dgSuppliers.DataSource = objCommand.ExecuteReader();
	dgSuppliers.DataBind();
	objConnection.Close();
}
</script>

Message #5 by "Arnold G. Higuit" <arnoldgh@p...> on Tue, 4 Mar 2003 06:39:47
Thanks for your replies Irfan and Alan and sorry for the typo error. It 
is actually "c#" in the code.
The way I see it, there seems to be no problem with the code but
what puzzled me is that it really does not display the WebForm in the 
Browser. Only the HTML part is displayed. Has it got something to do with
the IIS configuration or from the Visual Studio.NET environment?

Irfan: As much as possible, I don't want to do some work around like the 
one you suggested for the simple reason that since it is published in the 
book, I believe it should be tested, error free and running smoothly. I 
just don't understand why in my machine it does not work. I appreciate 
your feedback.

Regards,
Arnold

> Change this line:

<script Language="c#" runat="server">

Alan

-----Original Message-----
From: Arnold G. Higuit [mailto:arnoldgh@p...] 
Sent: Monday, March 03, 2003 4:26 AM
To: aspx_beginners
Subject: [aspx_beginners] Unable to display WebForm in the Browser


Hi,
    I am trying to run the code below but only the Title is displayed in

the Browser (IE 6.0) and not the DataGrid control. I have actually 
created a virtual directory in the IIS and link this directory to one of

my folders in d: drive. This code is actually from the book (Beginning 
ASP.NET using C#). I have just modified the path of the Northwind 
database. Please help as I cannot figure out the problem of this code. 
Thank you very much.
    

Regards,
Arnold

Here is the code:
    
<%@ Import namespace="System.Data" %>
<%@ Import namespace="System.Data.OleDb" %>

<HTML>
	<HEAD>
		<title>Connecting to an Access Database</title>
	</HEAD>
	<body>
		<h3>Connecting to an Access Database</h3>
		<asp:DataGrid id="dgSuppliers" runat="server" />
	</body>
</HTML>

<script Language="c" runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
	String strConnection="Provider=Microsoft.Jet.OleDb.4.0;data 
source=D:\\Northwind.mdb;"
	OleDbConnection objConnection = new OleDbConnection
(strConnection);
	
	String strSQL = "SELECT SupplierID, CompanyName FROM Suppliers";
	OleDbCommand objCommand = new OleDbCommand(strSQL,
objConnection);
	
	objConnection.Open();
	dgSuppliers.DataSource = objCommand.ExecuteReader();
	dgSuppliers.DataBind();
	objConnection.Close();
}
</script>

Message #6 by "Jerry Lanphear" <jerrylan@q...> on Tue, 4 Mar 2003 00:18:42 -0700
Arnold,

This is a well known configuration issue where your ASPNET user is not
getting the proper permissions to operate.  The first question to ask is are
you running ASP.NET on a domain controller? If you are, only an expert on
domain controllers can configure your machine to run ASP.NET and that is not
me. I have heard experts say "Do not install the framework on an domain
controller and expect it to run ASP.NET.

If not, then the first thing to do is to run and install the .NET Framework
Service Pack 2 (SP2).

If this does not help, then do a Google search on a file called
"machine.config" and you will get all the further information there is out
there on this problem.

Good Luck.  It took me 10 days of pulling my hair out until I got it going.

Regards

----- Original Message -----
From: "Arnold G. Higuit" <arnoldgh@p...>
To: "aspx_beginners" <aspx_beginners@p...>
Sent: Tuesday, March 04, 2003 6:39 AM
Subject: [aspx_beginners] RE: Unable to display WebForm in the Browser


> Thanks for your replies Irfan and Alan and sorry for the typo error. It
> is actually "c#" in the code.
> The way I see it, there seems to be no problem with the code but
> what puzzled me is that it really does not display the WebForm in the
> Browser. Only the HTML part is displayed. Has it got something to do with
> the IIS configuration or from the Visual Studio.NET environment?
>
> Irfan: As much as possible, I don't want to do some work around like the
> one you suggested for the simple reason that since it is published in the
> book, I believe it should be tested, error free and running smoothly. I
> just don't understand why in my machine it does not work. I appreciate
> your feedback.
>
> Regards,
> Arnold
>
> > Change this line:
>
> <script Language="c#" runat="server">
>
> Alan
>
> -----Original Message-----
> From: Arnold G. Higuit [mailto:arnoldgh@p...]
> Sent: Monday, March 03, 2003 4:26 AM
> To: aspx_beginners
> Subject: [aspx_beginners] Unable to display WebForm in the Browser
>
>
> Hi,
>     I am trying to run the code below but only the Title is displayed in
>
> the Browser (IE 6.0) and not the DataGrid control. I have actually
> created a virtual directory in the IIS and link this directory to one of
>
> my folders in d: drive. This code is actually from the book (Beginning
> ASP.NET using C#). I have just modified the path of the Northwind
> database. Please help as I cannot figure out the problem of this code.
> Thank you very much.
>
>
> Regards,
> Arnold
>
> Here is the code:
>
> <%@ Import namespace="System.Data" %>
> <%@ Import namespace="System.Data.OleDb" %>
>
> <HTML>
> <HEAD>
> <title>Connecting to an Access Database</title>
> </HEAD>
> <body>
> <h3>Connecting to an Access Database</h3>
> <asp:DataGrid id="dgSuppliers" runat="server" />
> </body>
> </HTML>
>
> <script Language="c" runat="server">
> private void Page_Load(object sender, System.EventArgs e)
> {
> String strConnection="Provider=Microsoft.Jet.OleDb.4.0;data
> source=D:\\Northwind.mdb;"
> OleDbConnection objConnection = new OleDbConnection
> (strConnection);
>
> String strSQL = "SELECT SupplierID, CompanyName FROM Suppliers";
> OleDbCommand objCommand = new OleDbCommand(strSQL,
> objConnection);
>
> objConnection.Open();
> dgSuppliers.DataSource = objCommand.ExecuteReader();
> dgSuppliers.DataBind();
> objConnection.Close();
> }
> </script>
>
>
>

Message #7 by "Rohit Arora" <rohit_arora@i...> on Tue, 4 Mar 2003 12:49:12 +0530
if its running on a domeain controller jes change the permissions for aspnet
acc to system from machine.

Regards
Rohit Arora
Intersolutions (P) Ltd
B - 21, Sector 58,
Noida - 201301
Tel : 91-2585703/04/05 Extn: 229


-----Original Message-----
From: Jerry Lanphear [mailto:jerrylan@q...]
Sent: Tuesday, March 04, 2003 12:49 PM
To: aspx_beginners
Subject: [aspx_beginners] RE: Unable to display WebForm in the Browser


Arnold,

This is a well known configuration issue where your ASPNET user is not
getting the proper permissions to operate.  The first question to ask is are
you running ASP.NET on a domain controller? If you are, only an expert on
domain controllers can configure your machine to run ASP.NET and that is not
me. I have heard experts say "Do not install the framework on an domain
controller and expect it to run ASP.NET.

If not, then the first thing to do is to run and install the .NET Framework
Service Pack 2 (SP2).

If this does not help, then do a Google search on a file called
"machine.config" and you will get all the further information there is out
there on this problem.

Good Luck.  It took me 10 days of pulling my hair out until I got it going.

Regards

----- Original Message -----
From: "Arnold G. Higuit" <arnoldgh@p...>
To: "aspx_beginners" <aspx_beginners@p...>
Sent: Tuesday, March 04, 2003 6:39 AM
Subject: [aspx_beginners] RE: Unable to display WebForm in the Browser


> Thanks for your replies Irfan and Alan and sorry for the typo error. It
> is actually "c#" in the code.
> The way I see it, there seems to be no problem with the code but
> what puzzled me is that it really does not display the WebForm in the
> Browser. Only the HTML part is displayed. Has it got something to do with
> the IIS configuration or from the Visual Studio.NET environment?
>
> Irfan: As much as possible, I don't want to do some work around like the
> one you suggested for the simple reason that since it is published in the
> book, I believe it should be tested, error free and running smoothly. I
> just don't understand why in my machine it does not work. I appreciate
> your feedback.
>
> Regards,
> Arnold
>
> > Change this line:
>
> <script Language="c#" runat="server">
>
> Alan
>
> -----Original Message-----
> From: Arnold G. Higuit [mailto:arnoldgh@p...]
> Sent: Monday, March 03, 2003 4:26 AM
> To: aspx_beginners
> Subject: [aspx_beginners] Unable to display WebForm in the Browser
>
>
> Hi,
>     I am trying to run the code below but only the Title is displayed in
>
> the Browser (IE 6.0) and not the DataGrid control. I have actually
> created a virtual directory in the IIS and link this directory to one of
>
> my folders in d: drive. This code is actually from the book (Beginning
> ASP.NET using C#). I have just modified the path of the Northwind
> database. Please help as I cannot figure out the problem of this code.
> Thank you very much.
>
>
> Regards,
> Arnold
>
> Here is the code:
>
> <%@ Import namespace="System.Data" %>
> <%@ Import namespace="System.Data.OleDb" %>
>
> <HTML>
> <HEAD>
> <title>Connecting to an Access Database</title>
> </HEAD>
> <body>
> <h3>Connecting to an Access Database</h3>
> <asp:DataGrid id="dgSuppliers" runat="server" />
> </body>
> </HTML>
>
> <script Language="c" runat="server">
> private void Page_Load(object sender, System.EventArgs e)
> {
> String strConnection="Provider=Microsoft.Jet.OleDb.4.0;data
> source=D:\\Northwind.mdb;"
> OleDbConnection objConnection = new OleDbConnection
> (strConnection);
>
> String strSQL = "SELECT SupplierID, CompanyName FROM Suppliers";
> OleDbCommand objCommand = new OleDbCommand(strSQL,
> objConnection);
>
> objConnection.Open();
> dgSuppliers.DataSource = objCommand.ExecuteReader();
> dgSuppliers.DataBind();
> objConnection.Close();
> }
> </script>
>
>
>



Message #8 by "Jerry Lanphear" <jerrylan@q...> on Tue, 4 Mar 2003 06:58:17 -0700
And what if any security risks may result from this change?

----- Original Message -----
From: "Rohit Arora" <rohit_arora@i...>
To: "aspx_beginners" <aspx_beginners@p...>
Sent: Tuesday, March 04, 2003 12:19 AM
Subject: [aspx_beginners] RE: Unable to display WebForm in the Browser


> if its running on a domeain controller jes change the permissions for
aspnet
> acc to system from machine.
>
> Regards
> Rohit Arora
> Intersolutions (P) Ltd
> B - 21, Sector 58,
> Noida - 201301
> Tel : 91-2585703/04/05 Extn: 229
>
>
> -----Original Message-----
> From: Jerry Lanphear [mailto:jerrylan@q...]
> Sent: Tuesday, March 04, 2003 12:49 PM
> To: aspx_beginners
> Subject: [aspx_beginners] RE: Unable to display WebForm in the Browser
>
>
> Arnold,
>
> This is a well known configuration issue where your ASPNET user is not
> getting the proper permissions to operate.  The first question to ask is
are
> you running ASP.NET on a domain controller? If you are, only an expert on
> domain controllers can configure your machine to run ASP.NET and that is
not
> me. I have heard experts say "Do not install the framework on an domain
> controller and expect it to run ASP.NET.
>
> If not, then the first thing to do is to run and install the .NET
Framework
> Service Pack 2 (SP2).
>
> If this does not help, then do a Google search on a file called
> "machine.config" and you will get all the further information there is out
> there on this problem.
>
> Good Luck.  It took me 10 days of pulling my hair out until I got it
going.
>
> Regards
>
> ----- Original Message -----
> From: "Arnold G. Higuit" <arnoldgh@p...>
> To: "aspx_beginners" <aspx_beginners@p...>
> Sent: Tuesday, March 04, 2003 6:39 AM
> Subject: [aspx_beginners] RE: Unable to display WebForm in the Browser
>
>
> > Thanks for your replies Irfan and Alan and sorry for the typo error. It
> > is actually "c#" in the code.
> > The way I see it, there seems to be no problem with the code but
> > what puzzled me is that it really does not display the WebForm in the
> > Browser. Only the HTML part is displayed. Has it got something to do
with
> > the IIS configuration or from the Visual Studio.NET environment?
> >
> > Irfan: As much as possible, I don't want to do some work around like the
> > one you suggested for the simple reason that since it is published in
the
> > book, I believe it should be tested, error free and running smoothly. I
> > just don't understand why in my machine it does not work. I appreciate
> > your feedback.
> >
> > Regards,
> > Arnold
> >
> > > Change this line:
> >
> > <script Language="c#" runat="server">
> >
> > Alan
> >
> > -----Original Message-----
> > From: Arnold G. Higuit [mailto:arnoldgh@p...]
> > Sent: Monday, March 03, 2003 4:26 AM
> > To: aspx_beginners
> > Subject: [aspx_beginners] Unable to display WebForm in the Browser
> >
> >
> > Hi,
> >     I am trying to run the code below but only the Title is displayed in
> >
> > the Browser (IE 6.0) and not the DataGrid control. I have actually
> > created a virtual directory in the IIS and link this directory to one of
> >
> > my folders in d: drive. This code is actually from the book (Beginning
> > ASP.NET using C#). I have just modified the path of the Northwind
> > database. Please help as I cannot figure out the problem of this code.
> > Thank you very much.
> >
> >
> > Regards,
> > Arnold
> >
> > Here is the code:
> >
> > <%@ Import namespace="System.Data" %>
> > <%@ Import namespace="System.Data.OleDb" %>
> >
> > <HTML>
> > <HEAD>
> > <title>Connecting to an Access Database</title>
> > </HEAD>
> > <body>
> > <h3>Connecting to an Access Database</h3>
> > <asp:DataGrid id="dgSuppliers" runat="server" />
> > </body>
> > </HTML>
> >
> > <script Language="c" runat="server">
> > private void Page_Load(object sender, System.EventArgs e)
> > {
> > String strConnection="Provider=Microsoft.Jet.OleDb.4.0;data
> > source=D:\\Northwind.mdb;"
> > OleDbConnection objConnection = new OleDbConnection
> > (strConnection);
> >
> > String strSQL = "SELECT SupplierID, CompanyName FROM Suppliers";
> > OleDbCommand objCommand = new OleDbCommand(strSQL,
> > objConnection);
> >
> > objConnection.Open();
> > dgSuppliers.DataSource = objCommand.ExecuteReader();
> > dgSuppliers.DataBind();
> > objConnection.Close();
> > }
> > </script>
> >
> >
> >
>
>
>
>
>
>

Message #9 by "Alan Chiu" <achiu@m...> on Tue, 4 Mar 2003 09:02:48 -0500
Did you installed .NET Framework SDK(131MB)? You need the web server,
iis5 and the .net framework sdk to run your 'WebForm.aspx'.

Here is the link to Full SDK Download (131 MB)
http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.as
p?url=/msdn-files/027/000/976/msdncompositedoc.xml

Alan

-----Original Message-----
From: Arnold G. Higuit [mailto:arnoldgh@p...] 
Sent: Tuesday, March 04, 2003 6:40 AM
To: aspx_beginners
Subject: [aspx_beginners] RE: Unable to display WebForm in the Browser


Thanks for your replies Irfan and Alan and sorry for the typo error. It 
is actually "c#" in the code.
The way I see it, there seems to be no problem with the code but what
puzzled me is that it really does not display the WebForm in the 
Browser. Only the HTML part is displayed. Has it got something to do
with the IIS configuration or from the Visual Studio.NET environment?

Irfan: As much as possible, I don't want to do some work around like the

one you suggested for the simple reason that since it is published in
the 
book, I believe it should be tested, error free and running smoothly. I 
just don't understand why in my machine it does not work. I appreciate 
your feedback.

Regards,
Arnold

> Change this line:

<script Language="c#" runat="server">

Alan

-----Original Message-----
From: Arnold G. Higuit [mailto:arnoldgh@p...] 
Sent: Monday, March 03, 2003 4:26 AM
To: aspx_beginners
Subject: [aspx_beginners] Unable to display WebForm in the Browser


Hi,
    I am trying to run the code below but only the Title is displayed in

the Browser (IE 6.0) and not the DataGrid control. I have actually 
created a virtual directory in the IIS and link this directory to one of

my folders in d: drive. This code is actually from the book (Beginning 
ASP.NET using C#). I have just modified the path of the Northwind 
database. Please help as I cannot figure out the problem of this code. 
Thank you very much.
    

Regards,
Arnold

Here is the code:
    
<%@ Import namespace="System.Data" %>
<%@ Import namespace="System.Data.OleDb" %>

<HTML>
	<HEAD>
		<title>Connecting to an Access Database</title>
	</HEAD>
	<body>
		<h3>Connecting to an Access Database</h3>
		<asp:DataGrid id="dgSuppliers" runat="server" />
	</body>
</HTML>

<script Language="c" runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
	String strConnection="Provider=Microsoft.Jet.OleDb.4.0;data 
source=D:\\Northwind.mdb;"
	OleDbConnection objConnection = new OleDbConnection
(strConnection);
	
	String strSQL = "SELECT SupplierID, CompanyName FROM Suppliers";
	OleDbCommand objCommand = new OleDbCommand(strSQL,
objConnection);
	
	objConnection.Open();
	dgSuppliers.DataSource = objCommand.ExecuteReader();
	dgSuppliers.DataBind();
	objConnection.Close();
}
</script>


Message #10 by "Rohit Arora" <rohit_arora@i...> on Tue, 4 Mar 2003 19:32:51 +0530
Hi jerry,
	sorry i am not a security expert..can u tell me wht all holes it can expose
? Looks like it can be a very interesting discussion.

Regards
Rohit Arora
Intersolutions (P) Ltd
B - 21, Sector 58,
Noida - 201301
Tel : 91-2585703/04/05 Extn: 229


-----Original Message-----
From: Jerry Lanphear [mailto:jerrylan@q...]
Sent: Tuesday, March 04, 2003 7:28 PM
To: aspx_beginners
Subject: [aspx_beginners] RE: Unable to display WebForm in the Browser


And what if any security risks may result from this change?

----- Original Message -----
From: "Rohit Arora" <rohit_arora@i...>
To: "aspx_beginners" <aspx_beginners@p...>
Sent: Tuesday, March 04, 2003 12:19 AM
Subject: [aspx_beginners] RE: Unable to display WebForm in the Browser


> if its running on a domeain controller jes change the permissions for
aspnet
> acc to system from machine.
>
> Regards
> Rohit Arora
> Intersolutions (P) Ltd
> B - 21, Sector 58,
> Noida - 201301
> Tel : 91-2585703/04/05 Extn: 229
>
>
> -----Original Message-----
> From: Jerry Lanphear [mailto:jerrylan@q...]
> Sent: Tuesday, March 04, 2003 12:49 PM
> To: aspx_beginners
> Subject: [aspx_beginners] RE: Unable to display WebForm in the Browser
>
>
> Arnold,
>
> This is a well known configuration issue where your ASPNET user is not
> getting the proper permissions to operate.  The first question to ask is
are
> you running ASP.NET on a domain controller? If you are, only an expert on
> domain controllers can configure your machine to run ASP.NET and that is
not
> me. I have heard experts say "Do not install the framework on an domain
> controller and expect it to run ASP.NET.
>
> If not, then the first thing to do is to run and install the .NET
Framework
> Service Pack 2 (SP2).
>
> If this does not help, then do a Google search on a file called
> "machine.config" and you will get all the further information there is out
> there on this problem.
>
> Good Luck.  It took me 10 days of pulling my hair out until I got it
going.
>
> Regards
>
> ----- Original Message -----
> From: "Arnold G. Higuit" <arnoldgh@p...>
> To: "aspx_beginners" <aspx_beginners@p...>
> Sent: Tuesday, March 04, 2003 6:39 AM
> Subject: [aspx_beginners] RE: Unable to display WebForm in the Browser
>
>
> > Thanks for your replies Irfan and Alan and sorry for the typo error. It
> > is actually "c#" in the code.
> > The way I see it, there seems to be no problem with the code but
> > what puzzled me is that it really does not display the WebForm in the
> > Browser. Only the HTML part is displayed. Has it got something to do
with
> > the IIS configuration or from the Visual Studio.NET environment?
> >
> > Irfan: As much as possible, I don't want to do some work around like the
> > one you suggested for the simple reason that since it is published in
the
> > book, I believe it should be tested, error free and running smoothly. I
> > just don't understand why in my machine it does not work. I appreciate
> > your feedback.
> >
> > Regards,
> > Arnold
> >
> > > Change this line:
> >
> > <script Language="c#" runat="server">
> >
> > Alan
> >
> > -----Original Message-----
> > From: Arnold G. Higuit [mailto:arnoldgh@p...]
> > Sent: Monday, March 03, 2003 4:26 AM
> > To: aspx_beginners
> > Subject: [aspx_beginners] Unable to display WebForm in the Browser
> >
> >
> > Hi,
> >     I am trying to run the code below but only the Title is displayed in
> >
> > the Browser (IE 6.0) and not the DataGrid control. I have actually
> > created a virtual directory in the IIS and link this directory to one of
> >
> > my folders in d: drive. This code is actually from the book (Beginning
> > ASP.NET using C#). I have just modified the path of the Northwind
> > database. Please help as I cannot figure out the problem of this code.
> > Thank you very much.
> >
> >
> > Regards,
> > Arnold
> >
> > Here is the code:
> >
> > <%@ Import namespace="System.Data" %>
> > <%@ Import namespace="System.Data.OleDb" %>
> >
> > <HTML>
> > <HEAD>
> > <title>Connecting to an Access Database</title>
> > </HEAD>
> > <body>
> > <h3>Connecting to an Access Database</h3>
> > <asp:DataGrid id="dgSuppliers" runat="server" />
> > </body>
> > </HTML>
> >
> > <script Language="c" runat="server">
> > private void Page_Load(object sender, System.EventArgs e)
> > {
> > String strConnection="Provider=Microsoft.Jet.OleDb.4.0;data
> > source=D:\\Northwind.mdb;"
> > OleDbConnection objConnection = new OleDbConnection
> > (strConnection);
> >
> > String strSQL = "SELECT SupplierID, CompanyName FROM Suppliers";
> > OleDbCommand objCommand = new OleDbCommand(strSQL,
> > objConnection);
> >
> > objConnection.Open();
> > dgSuppliers.DataSource = objCommand.ExecuteReader();
> > dgSuppliers.DataBind();
> > objConnection.Close();
> > }
> > </script>
> >
> >
> >
>
>
>
>
>
>



Message #11 by "Alex Smotritsky" <alex.smotritsky@v...> on Tue, 4 Mar 2003 09:36:34 -0500
I think you should also consider this:

http://support.microsoft.com/?id=306005

-----Original Message-----
From: Jerry Lanphear [mailto:jerrylan@q...] 
Sent: Tuesday, March 04, 2003 2:19 AM
To: aspx_beginners
Subject: [aspx_beginners] RE: Unable to display WebForm in the Browser


Arnold,

This is a well known configuration issue where your ASPNET user is not
getting the proper permissions to operate.  The first question to ask is
are you running ASP.NET on a domain controller? If you are, only an
expert on domain controllers can configure your machine to run ASP.NET
and that is not me. I have heard experts say "Do not install the
framework on an domain controller and expect it to run ASP.NET.

If not, then the first thing to do is to run and install the .NET
Framework Service Pack 2 (SP2).

If this does not help, then do a Google search on a file called
"machine.config" and you will get all the further information there is
out there on this problem.

Good Luck.  It took me 10 days of pulling my hair out until I got it
going.

Regards

----- Original Message -----
From: "Arnold G. Higuit" <arnoldgh@p...>
To: "aspx_beginners" <aspx_beginners@p...>
Sent: Tuesday, March 04, 2003 6:39 AM
Subject: [aspx_beginners] RE: Unable to display WebForm in the Browser


> Thanks for your replies Irfan and Alan and sorry for the typo error. 
> It is actually "c#" in the code. The way I see it, there seems to be 
> no problem with the code but what puzzled me is that it really does 
> not display the WebForm in the Browser. Only the HTML part is 
> displayed. Has it got something to do with the IIS configuration or 
> from the Visual Studio.NET environment?
>
> Irfan: As much as possible, I don't want to do some work around like 
> the one you suggested for the simple reason that since it is published

> in the book, I believe it should be tested, error free and running 
> smoothly. I just don't understand why in my machine it does not work. 
> I appreciate your feedback.
>
> Regards,
> Arnold
>
> > Change this line:
>
> <script Language="c#" runat="server">
>
> Alan
>
> -----Original Message-----
> From: Arnold G. Higuit [mailto:arnoldgh@p...]
> Sent: Monday, March 03, 2003 4:26 AM
> To: aspx_beginners
> Subject: [aspx_beginners] Unable to display WebForm in the Browser
>
>
> Hi,
>     I am trying to run the code below but only the Title is displayed 
> in
>
> the Browser (IE 6.0) and not the DataGrid control. I have actually 
> created a virtual directory in the IIS and link this directory to one 
> of
>
> my folders in d: drive. This code is actually from the book (Beginning

> ASP.NET using C#). I have just modified the path of the Northwind 
> database. Please help as I cannot figure out the problem of this code.

> Thank you very much.
>
>
> Regards,
> Arnold
>
> Here is the code:
>
> <%@ Import namespace="System.Data" %>
> <%@ Import namespace="System.Data.OleDb" %>
>
> <HTML>
> <HEAD>
> <title>Connecting to an Access Database</title>
> </HEAD>
> <body>
> <h3>Connecting to an Access Database</h3>
> <asp:DataGrid id="dgSuppliers" runat="server" />
> </body>
> </HTML>
>
> <script Language="c" runat="server">
> private void Page_Load(object sender, System.EventArgs e)
> {
> String strConnection="Provider=Microsoft.Jet.OleDb.4.0;data
> source=D:\\Northwind.mdb;"
> OleDbConnection objConnection = new OleDbConnection (strConnection);
>
> String strSQL = "SELECT SupplierID, CompanyName FROM Suppliers"; 
> OleDbCommand objCommand = new OleDbCommand(strSQL, objConnection);
>
> objConnection.Open();
> dgSuppliers.DataSource = objCommand.ExecuteReader(); 
> dgSuppliers.DataBind(); objConnection.Close();
> }
> </script>
>
> ---
> Change your mail options at http://p2p.wrox.com/manager.asp or to 
> unsubscribe send a blank email to
>
>



Message #12 by "Jerry Lanphear" <jerrylan@q...> on Tue, 4 Mar 2003 07:54:47 -0700
Alex,

Installing SP2 performs these functions to which you refer.

Regards
----- Original Message -----
From: "Alex Smotritsky" <alex.smotritsky@v...>
To: "aspx_beginners" <aspx_beginners@p...>
Sent: Tuesday, March 04, 2003 7:36 AM
Subject: [aspx_beginners] RE: Unable to display WebForm in the Browser


> I think you should also consider this:
>
> http://support.microsoft.com/?id=306005
>
> -----Original Message-----
> From: Jerry Lanphear [mailto:jerrylan@q...]
> Sent: Tuesday, March 04, 2003 2:19 AM
> To: aspx_beginners
> Subject: [aspx_beginners] RE: Unable to display WebForm in the Browser
>
>
> Arnold,
>
> This is a well known configuration issue where your ASPNET user is not
> getting the proper permissions to operate.  The first question to ask is
> are you running ASP.NET on a domain controller? If you are, only an
> expert on domain controllers can configure your machine to run ASP.NET
> and that is not me. I have heard experts say "Do not install the
> framework on an domain controller and expect it to run ASP.NET.
>
> If not, then the first thing to do is to run and install the .NET
> Framework Service Pack 2 (SP2).
>
> If this does not help, then do a Google search on a file called
> "machine.config" and you will get all the further information there is
> out there on this problem.
>
> Good Luck.  It took me 10 days of pulling my hair out until I got it
> going.
>
> Regards
>
> ----- Original Message -----
> From: "Arnold G. Higuit" <arnoldgh@p...>
> To: "aspx_beginners" <aspx_beginners@p...>
> Sent: Tuesday, March 04, 2003 6:39 AM
> Subject: [aspx_beginners] RE: Unable to display WebForm in the Browser
>
>
> > Thanks for your replies Irfan and Alan and sorry for the typo error.
> > It is actually "c#" in the code. The way I see it, there seems to be
> > no problem with the code but what puzzled me is that it really does
> > not display the WebForm in the Browser. Only the HTML part is
> > displayed. Has it got something to do with the IIS configuration or
> > from the Visual Studio.NET environment?
> >
> > Irfan: As much as possible, I don't want to do some work around like
> > the one you suggested for the simple reason that since it is published
>
> > in the book, I believe it should be tested, error free and running
> > smoothly. I just don't understand why in my machine it does not work.
> > I appreciate your feedback.
> >
> > Regards,
> > Arnold
> >
> > > Change this line:
> >
> > <script Language="c#" runat="server">
> >
> > Alan
> >
> > -----Original Message-----
> > From: Arnold G. Higuit [mailto:arnoldgh@p...]
> > Sent: Monday, March 03, 2003 4:26 AM
> > To: aspx_beginners
> > Subject: [aspx_beginners] Unable to display WebForm in the Browser
> >
> >
> > Hi,
> >     I am trying to run the code below but only the Title is displayed
> > in
> >
> > the Browser (IE 6.0) and not the DataGrid control. I have actually
> > created a virtual directory in the IIS and link this directory to one
> > of
> >
> > my folders in d: drive. This code is actually from the book (Beginning
>
> > ASP.NET using C#). I have just modified the path of the Northwind
> > database. Please help as I cannot figure out the problem of this code.
>
> > Thank you very much.
> >
> >
> > Regards,
> > Arnold
> >
> > Here is the code:
> >
> > <%@ Import namespace="System.Data" %>
> > <%@ Import namespace="System.Data.OleDb" %>
> >
> > <HTML>
> > <HEAD>
> > <title>Connecting to an Access Database</title>
> > </HEAD>
> > <body>
> > <h3>Connecting to an Access Database</h3>
> > <asp:DataGrid id="dgSuppliers" runat="server" />
> > </body>
> > </HTML>
> >
> > <script Language="c" runat="server">
> > private void Page_Load(object sender, System.EventArgs e)
> > {
> > String strConnection="Provider=Microsoft.Jet.OleDb.4.0;data
> > source=D:\\Northwind.mdb;"
> > OleDbConnection objConnection = new OleDbConnection (strConnection);
> >
> > String strSQL = "SELECT SupplierID, CompanyName FROM Suppliers";
> > OleDbCommand objCommand = new OleDbCommand(strSQL, objConnection);
> >
> > objConnection.Open();
> > dgSuppliers.DataSource = objCommand.ExecuteReader();
> > dgSuppliers.DataBind(); objConnection.Close();
> > }
> > </script>
> >
> > ---
> > Change your mail options at http://p2p.wrox.com/manager.asp or to
> > unsubscribe send a blank email to
> >
> >
>
>
>
>
>
>

Message #13 by "Arnold G. Higuit" <arnoldgh@p...> on Wed, 5 Mar 2003 03:31:06
Hi Guys,
    I have already found the solution to this problem. It seems that the 
ASP.NET driver to the IIS is not run or activated during the .NET 
Framework installation. I have searched through the archive of some 
newsgroup and they suggested to run the following exe file:

    * For Windows XP Professional:
    \\WINDOWS\Microsoft.NET\Framework\v1.0.3705\aspnet_regiis.exe -i

This will install the ASP.NET driver in the DOS prompt (around 1-2 
minutes). After I run this exe file, everything is alright and working 
just fine.

Thank you very much for all your feedbacks.

Regards,
Arnold


> Hi,
 >    I am trying to run the code below but it only displays the Title in 
m> y Browser (IE 6.0), it does not display the DataGrid. I have actually 
c> reated a virtual directory in the IIS and linked that virtual 
directory 
t> o one of my folder in d: drive. This code is actually from the Book 
(> Beginning ASP.NET using C#). Please help as I cannot figure out what 
is 
w> rong with this code. Thank you very much.

> Regards,
A> rnold

> 
H> ere is the code:

> <%@ Import namespace="System.Data" %>
<> %@ Import namespace="System.Data.OleDb" %>

> <HTML>
	> <HEAD>
	> 	<title>Connecting to an Access Database</title>
	> </HEAD>
	> <body>
	> 	<h3>Connecting to an Access Database</h3>
	> 	<asp:DataGrid id="dgSuppliers" runat="server" />
	> </body>
<> /HTML>

> <script Language="c" runat="server">
p> rivate void Page_Load(object sender, System.EventArgs e)
{> 
	> String strConnection="Provider=Microsoft.Jet.OleDb.4.0;data 
s> ource=D:\\Northwind.mdb;"
	> OleDbConnection objConnection = new OleDbConnection
(> strConnection);
	> 
	> String strSQL = "SELECT SupplierID, CompanyName FROM Suppliers";
	> OleDbCommand objCommand = new OleDbCommand(strSQL, 
objConnection);
	> 
	> objConnection.Open();
	> dgSuppliers.DataSource = objCommand.ExecuteReader();
	> dgSuppliers.DataBind();
	> objConnection.Close();
}> 
<> /script>

  Return to Index