Login  
Search All Forums
Dart Home | PowerWEB LiveControls for ASP.NET | Custom Development Reply | PowerWEB LiveControls for ASP.NET Topics | Forums   
AuthorForum: PowerWEB LiveControls for ASP.NET
Topic: Visual Studio keeps changing my web.config
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted April 12, 2013 1:14 PM

PROBLEM: When you open a webform that contains a livecontrol in Framework 4.0 and higher Visual Studio alters my web.config and causes my site to stop working.

SOLUTION: In future versions this will work seamlessly but for now you can't stop the changes from being made. You can however stop the error that occurs by adding the following to you <system.webServer> section:

<validation validateIntegratedModeConfiguration="false" />
  
I like to keep a file around that defines the minimal web.config settings I want for a LiveControls project. Here is the contents of the file:

Framework 4.0:
 <?xml version="1.0"?>
<configuration>
 <appSettings>
  <add key="Dart.LiveControls.ViewStateCacheEnabled" value="false" />
 </appSettings>
 <system.web>
  <pages clientIDMode="AutoID" />
  <compilation debug="true" targetFramework="4.0" />
 </system.web>
 <system.webServer>
  <validation validateIntegratedModeConfiguration="false" />
  <modules>
   <add name="CallbackManager_LiveControls" type="Dart.LiveControls.CallbackManager,Dart.LiveControls" preCondition="managedHandler" />
  </modules>
  <handlers>
   <add name="Dart.LiveControls.GetResource.aspx_*" path="Dart.LiveControls.GetResource.aspx" verb="*" type="Dart.LiveControls.ResourceHttpHandler,Dart.LiveControls" preCondition="integratedMode,runtimeVersionv2.0" />
  </handlers>
 </system.webServer>
</configuration>

Framework 4.5
<?xml version="1.0"?>
<configuration>
 <appSettings>
  <add key="Dart.LiveControls.ViewStateCacheEnabled" value="false" />
 </appSettings>
 <system.web>
  <pages clientIDMode="AutoID" />
  <compilation debug="true" targetFramework="4.5" />
  <httpRuntime targetFramework="4.5" />
 </system.web>
 <system.webServer>
  <validation validateIntegratedModeConfiguration="false" />
  <modules>
   <add name="CallbackManager_LiveControls" type="Dart.LiveControls.CallbackManager,Dart.LiveControls" preCondition="managedHandler" />
  </modules>
  <handlers>
   <add name="Dart.LiveControls.GetResource.aspx_*" path="Dart.LiveControls.GetResource.aspx" verb="*" type="Dart.LiveControls.ResourceHttpHandler,Dart.LiveControls" preCondition="integratedMode,runtimeVersionv2.0" />
  </handlers>
 </system.webServer>
</configuration>
Reply | PowerWEB LiveControls for ASP.NET Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX