Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 17th, 2004, 10:44 AM
Registered User
 
Join Date: Apr 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default new to ASPX

I am new to ASPX.
I get the following error when I try to run my page:
_________________________________
Server Error in '/BegASPNETdb' Application.
--------------------------------------------------------------------------------

Access denied to 'C:\BegASPNETdb\webroot\ch03\web.config'. Failed to start monitoring file changes.
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.Web.HttpException: Access denied to 'C:\BegASPNETdb\webroot\ch03\web.config'. Failed to start monitoring file changes.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[HttpException (0x80070005): Access denied to 'C:\BegASPNETdb\webroot\ch03\web.config'. Failed to start monitoring file changes.]
   System.Web.DirectoryMonitor.AddFileMonitor(String file) +381
   System.Web.DirectoryMonitor.StartMonitoringFile(St ring file, FileChangeEventHandler callback, String alias) +76
   System.Web.FileChangesMonitor.StartMonitoringFile( String alias, FileChangeEventHandler callback) +322
   System.Web.Configuration.HttpConfigurationSystem.A ddFileDependency(String file) +139
   System.Web.Configuration.HttpConfigurationSystem.C omposeConfig(String reqPath, IHttpMapPath configmap) +503
   System.Web.HttpContext.GetCompleteConfigRecord(Str ing reqpath, IHttpMapPath configmap) +434
   System.Web.HttpContext.GetCompleteConfig() +49
   System.Web.HttpContext.GetConfig(String name) +195
   System.Web.CustomErrors.GetSettings(HttpContext context, Boolean canThrow)
   System.Web.HttpResponse.ReportRuntimeError(Excepti on e, Boolean canThrow)
   System.Web.HttpRuntime.FinishRequest(HttpWorkerReq uest wr, HttpContext context, Exception e) +486


__________________________________________

This is what on my page:

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

<html>
  <head>
    <title>Beginning ASP.NET Databases Chapter 3</title>
  </head>

  <body>
    <h4>First Example: Listing data from the Employees table</h4>
    <asp:DataGrid id="dgNameList"
                  runat="server"
                  Gridlines="None"
                  BackColor="LightBlue"
                  CellPadding="5"
                  CellSpacing="5"
                  BorderWidth="2"
                  BorderColor="Black"
                  ToolTip="Includes only those employees who are at HQ" />
  <body>
</html>

<script language="VB" runat="server">
Sub Page_Load(Source As Object, E As EventArgs)
  Dim strConnection As String = "server=(local)\NetSDK; database=Northwind; " & _
                                "integrated security=true"
  Dim objConnection As New SqlConnection(strConnection)

  Dim strSQL As String = "SELECT FirstName, LastName, Country " & _
                         "FROM Employees;"
  Dim objCommand As New SqlCommand(strSQL, objConnection)

  objConnection.Open()

  Response.Write("ServerVersion: " & objConnection.ServerVersion & _
                 vbCRLF & "Datasource: " & objConnection.DataSource & _
                 vbCRLF & "Database: " & objConnection.Database)

  dgNameList.DataSource = objCommand.ExecuteReader()
  dgNameList.DataBind()
  objConnection.Close()
End Sub
</script>

And the following in my Web.config:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>

  <system.web>

    <customErrors mode="off" />
    <compilation debug="true" />

  </system.web>

</configuration>

Any suggestions????? Thanks
 
Old April 19th, 2004, 07:21 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Does the ASPNET user account have access to the 'ch03' folder?

 
Old April 19th, 2004, 11:50 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Check out this link and see if it helps you:

http://p2p.wrox.com/topic.asp?TOPIC_ID=4267

J





Similar Threads
Thread Thread Starter Forum Replies Last Post
Help on aspx! cloud1414 ASP.NET 1.0 and 1.1 Basics 6 January 20th, 2005 01:40 AM
New.aspx works but login.aspx fails Validation nigelhamilton BOOK: ASP.NET Website Programming Problem-Design-Solution 8 September 13th, 2004 02:29 AM
New.aspx works but not Login.aspx ? reidcor BOOK: ASP.NET Website Programming Problem-Design-Solution 2 May 24th, 2004 10:32 AM
HowTo Pass Form data from Page1.aspx to Page2.aspx dati ASP.NET 1.0 and 1.1 Basics 6 January 27th, 2004 06:57 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.