I am new to asp .net 2.0, and equally as new to web stuff in general. I am having a hard time understanding the whole web.config file stuff. I had an administrator page that worked fine in the root directory. However, I wanted to make a sub folder and use a web.config file to manage the role access. I did that, but now when I try to access the page it says it cannot connect to the SQL Server database. I am using the login control that comes with Visual Web Developer Express.

I have been reading about the web.config files, and learned that the config file in the directory takes priority over the one in the parent directory. If this is true, how can I get the web.config file to read the connection string in the parent directory?

I have tried the code below, but get:

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

This is a hosted SQL Server 2005 database, so I know it excepts remote connections. I can connect with files on my main directory.

VB Code:
  1. <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
  2.   <appSettings>
  3.         <connectionStrings>
  4.           <dataConfiguration defaultDatabase="PEPSqlServer"/>
  5.         </connectionStrings>
  6.   </appSettings>
  7.   <system.web>
  8.     <authentication mode="Forms" />
  9.         <authorization>
  10.             <allow roles="Director" />
  11.             <deny users="*" />
  12.             <deny users="?" />
  13.         </authorization>
  14.   </system.web>
  15. </configuration>

Am I close?