BigJ
unread,Oct 5, 2008, 2:49:55 PM10/5/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
I'm using Visual Web developer express to create
ASP.NET apps.
When I create a new file in the app_data directory, lets say
firstPage.aspx,
and then load the URL
http://localhost:1302/firstapp/app_data/firstpage.aspx,
it gives throws this error:
Server Error in '/firstApp' Application.
HTTP Error 403 - Forbidden.
Version Information:
ASP.NET Development Server 9.0.0.0
However when I make my own sub directory and put firstpage.aspx in,
http://localhost:1302/firstapp/subdir1/firstpage.aspx, it works fine.
Also another question, I have the file default.aspx with the following
code:
<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
void Page_Load(){
lblServerTime.Text=DateTime.Now.ToString();
}
</script>
<html xmlns="
http://www.w3.org/1999/xhtml">
<head runat="server">
<title>My First App</title>
</head>
<body>
<form id="form1" runat="server">
<div>
Holla <asp:Label id="lblServerTime" runat="server"></asp:Label>
</div>
</form>
</body>
</html>
In this case, the asp Label does not output any code, which i'm
assuming is because lblServerTime is not set. However, if i change
the compiler directive at the top to <%@ Page Langauge="C#" %>, it
produces the correct output. What the difference in the attributes
that's causing this?
Thanks
Jon