When I sustitute ConfigurationManager.AppSettings.Get("Configuratio nString") for the book's value of ConfigurationSettings.AppSettings("ConnectionStrin g") I get the error message that ConfigurationManager is undefined. In the web.config file there is no mention of ConfigurationManager. The web.config file seems like it is properly set up to accept the book's configurationString but there is something wrong somewhere either in the web.config file or the DataAccessCode.
vb. i've listed the main part of the DataAccessCode.
vb in the last message. I will now list what is in the web.config file.
---------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8" ?>
<configuration>
<!--
The <appSettings> section is used to configure application-specific configuration
settings. These can be fetched from within apps by calling the
"ConfigurationSettings.AppSettings(key)" method:
-->
<appSettings>
<add key="ConnectionString" value="Provider=Microsoft.Jet.OLEDB.4.0; Ole DB Services=-4; Data Source=C:\BegASPNET11\WroxUnited\WroxUnited.mdb"/>
</appSettings>
<system.web>
<!--
The <sessionState" section is used to configure session state for the application.
It supports four modes: "Off", "InProc", "StateServer", and "SqlServer". The
later two modes enable session state to be stored off the web server machine -
allowing failure redundancy and web farm session state scenarios.
<sessionState mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;trusted_connection=true"
cookieless="false"
timeout="20" />
-->
<!--
The <customErrors> section enables configuration of what to do if/when an
unhandled error occurs during the execution of a request. Specifically, it
enables developers to configure html error pages to be displayed in place of
a error stack trace:
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm"/>
<error statusCode="404" redirect="FileNotFound.htm"/>
<customErrors>
-->
<!--
The <authentication> section enables configuration of the security authentication
mode used by ASP.NET to identify an incoming user. It supports a "mode"
attribute with four valid values: "Windows", "Forms", "Passport" and "None":
The <forms> section is a sub-section of the <authentication> section,
and supports configuring the authentication values used when Forms
authentication is enabled above:
<authentication mode="Windows">
<forms name=".ASPXAUTH"
loginUrl="login.aspx"
protection="Validation"
timeout="999999" />
</authentication>
-->
<!--
The <authorization> section enables developers/administrators to configure
whether a user or role has access to a particular page or resource. This is
accomplished by adding "<allow>" and "<deny>" sub-tags beneath the <authorization>
section - specifically detailing the users/roles allowed or denied access.
Note: The "?" character indicates "anonymous" users (ie: non authenticated users).
The "*" character indicates "all" users.
<authorization>
<allow users="joeuser" />
<allow roles="Admins" />
<deny users="*" />
</authorization>
-->
</system.web>
</configuration>
--------------------------------------------------------------------
If you can give me any help on this problem I would certainly appreciate it. Thank you.
Steven Cist
[email protected]