AvdASPNetLab1 CustomError1
AvdASPNetLab1 CustomError1
+ Default.aspx
public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { Response.Write("Connection String : "+ ConfigurationManager.ConnectionStrings["strcn"].ToSt ring()); } }
+ Create WebForm : GenericError.aspx + Create WebForm : NoAccess.aspx + Create WebForm : FileNotFound.aspx + Create Web.Congig =
<?xml version="1.0"?> <configuration> <appSettings/> <connectionStrings/> <system.web> <compilation debug="false" /> <authentication mode="Windows" /> <customErrors mode="On" defaultRedirect="GenericError.aspx"> <error statusCode="403" redirect="NoAccess.aspx" /> <error statusCode="404" redirect="FileNotFound.aspx" /> </customErrors> </system.web> </configuration>