Gareth, we have created a separate application for Store data entry within DNN, which uses some of the DNN classes. This application resides inside the root dotnetnuke installation as a seprate directory (obviously configured as an application in IIS). To make the whole thing work, all that you need to do is to copy the dotnetnuke root directory web.config into your application directory. Now modify the web.config in your local application directory to override the root dotnetnuke web.config directory.
Article on MSDN explains how the inheritance and hierarchy works (http://msdn2.microsoft.com/en-us/library/dtbwsx8s(VS.71).aspx). You have to make sure that you override every single section, if you don't then by default IIS will read the root web.config and try to apply that section to your local application and then shout if proper files are not found. Not to mention you will have to do this excercise everytime you upgrade dnn as upgrade changes the web.config and your root, and local web.config sections need to match "dot" same.
For your convinence I am pasting below our local web.config file, so you know how to overwrite the sections:
Hope this helps,
Sincerely,
Sample (not actual) Local Web.config file:-
<configuration>
<!-- register local configuration handlers -->
<configSections>
<sectionGroup name="dotnetnuke">
</sectionGroup>
</configSections>
<!-- Uncomment the following connection string if want to use with other db that parent website dnn db
By commenting below we are using the connectionstring from the parent website web.config
<connectionStrings>
<remove name="SiteSqlServer"/>
<add
name="SiteSqlServer"
connectionString="Driver={SQL Native Client};Server=.\SQLExpress;Database=udev2;uid=udev2;pwd=XXXXXXX;"
providerName="System.Data.SqlClient" />
</connectionStrings>-->
<appSettings>
<!-- Uncomment the following connection string if want to use with other db that parent website dnn db
By commenting below we are using the connectionstring from the parent website web.config
<add key="SiteSqlServer" value="Driver={SQL Native Client};Server=.\SQLExpress;Database=udev2;uid=udev2;pwd=XXXXXXXX;"/>
-->
<add key="CustomQuery" value="Select Query 1"/>
<add key="Key1" value="Invalid Username - User does not exist."/>
<add key="Key2" value="Invalid Password - Please try again."/>
<add key="Key3" value="This user is disabled. Please contact XXXXXXXXXX."/>
<add key="Key4" value="Could Not Open Connection to Authentication DB on XXXXX.Default.aspx. Please contact XXXXX, and Mention this Error."/>
<add key ="Key5" value="XXX"/>
<add key ="Key6" value="XXXX"/>
<add key ="Key7" value="XXXX"/>
<add key="Key8" value="XXXX.aspx"/>
<add key="Key9" value="XXX.aspx"/>
<add key="Key10" value="XXX.aspx"/>
<add key="Key11" value="XXX/"/>
<add key="Key12" value="XXX.aspx"/>
<add key="Key13" value="XXX/XXX/"/>
<add key="Key14" value="XXX.aspx"/>
<add key="Key15" value="XXX.aspx"/>
<add key="Key16" value="XXX.aspx"/>
<remove key="InstallTemplate"/>
<remove key="AutoUpgrade"/>
<remove key="UseInstallWizard"/>
<remove key="InstallMemberRole"/>
<remove key="ShowMissingKeys"/>
<remove key="EnableWebFarmSupport"/>
<remove key="EnableCachePersistence"/>
<remove key="HostHeader"/>
<remove key="RemoveAngleBrackets"/>
<remove key="PersistentCookieTimeout"/>
</appSettings>
<system.codedom>
<compilers>
<compiler
language="vb"
type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"
extension=".VB" />
</compilers>
</system.codedom>
<system.webServer>
<modules>
<remove name="ScriptModule"/>
<remove name="Compression"/>
<remove name="RequestFilter"/>
<remove name="UrlRewrite"/>
<remove name="Exception"/>
<remove name="UsersOnline"/>
<remove name="DNNMembership"/>
<remove name="Personalization"/>
</modules>
<handlers>
<remove name="AJAX_ScriptResourceHandler"/>
<remove name="AJAX_AppServiceHandler"/>
<remove name="AJAX_WebServiceHandler"/>
<remove name="LogoffHandler*"/>
<remove name="RSSJandler"/>
<remove name="LinkClickHandler"/>
<remove name="CaptchaHandler"/>
</handlers>
<validation validateIntegratedModeConfiguration="" />
</system.webServer>
<system.web>
<machineKey
validationKey="Your Hex Key"
decryptionKey="Your Hex Key"
decryption="3DES"
validation="SHA1" />
<httpModules>
<remove name="Compression"/>
<remove name="RequestFilter"/>
<remove name="UrlRewrite"/>
<remove name="Exception"/>
<remove name="UsersOnline"/>
<remove name="DNNMembership"/>
<remove name="Personalization"/>
<remove name="ScriptModule"/>
</httpModules>
<httpHandlers>
<remove verb="*" path="*.captcha.aspx"/>
<remove verb="*" path="LinkClick.aspx"/>
<remove verb="*" path="RSS.aspx"/>
<remove verb="*" path="Logoff.aspx"/>
<remove verb="*" path="*.asmx"/>
<remove verb="*" path="*.asmx"/>
<remove verb="*" path="*_AppService.axd"/>
<remove verb="GET,HEAD" path="ScriptResource.axd"/>
</httpHandlers>
<compilation debug="true" strict="false">
<buildProviders>
<remove extension=".resx"/>
<remove extension=".resources"/>
</buildProviders>
<assemblies>
<remove assembly="Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<remove assembly="System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<remove assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<remove assembly="System.Management, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<remove assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</assemblies>
</compilation>
<!--
<customErrors mode="RemoteOnly" >
<error statusCode="404" redirect="custom404.aspx"/>
</customErrors>
-->
<authentication mode="Forms">
<forms name="UEI_Login" protection="All" timeout="15" cookieless="UseCookies"/>
</authentication>
<httpRuntime useFullyQualifiedRedirectUrl="true" maxRequestLength="8192" requestLengthDiskThreshold="8192"/>
<httpCookies httpOnlyCookies="true" requireSSL="false" domain="" />
<globalization
culture="en-US"
uiCulture="en"
requestEncoding="UTF-8"
responseEncoding="UTF-8"
fileEncoding="UTF-8"/>
<pages validateRequest="false" enableViewStateMac="true" enableEventValidation="false">
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</controls>
<namespaces>
<add namespace="System.ComponentModel"/>
<add namespace="System.Data"/>
<add namespace="System.Data.SqlClient"/>
<add namespace="System.Drawing"/>
<add namespace="Microsoft.VisualBasic"/>
<add namespace="System.Globalization"/>
</namespaces>
</pages>
<anonymousIdentification
enabled="true"
cookieName=".ASPXANONYMOUS"
cookieTimeout="100000"
cookiePath="/"
cookieRequireSSL="false"
cookieSlidingExpiration="true"
cookieProtection="None" domain=""/>
<membership
defaultProvider=""
userIsOnlineTimeWindow="15">
<providers>
<clear/>
<add name="AspNetSqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="SiteSqlServer"
enablePasswordRetrieval="true"
enablePasswordReset="true"
requiresQuestionAndAnswer="true"
minRequiredPasswordLength="7"
minRequiredNonalphanumericCharacters="2"
requiresUniqueEmail="true"
passwordFormat="Encrypted"
applicationName="Your application Name"
description="Stores and retrieves membership data from the local Microsoft SQL Server database" />
</providers>
</membership>
</system.web>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="" />
</assemblyBinding>
</runtime>
</configuration>