Is there a way to not use the traditional .config files for ASP.NET? -


Let me know the web. Configure xml get beautiful verbose.

Do you like any initiative

edit : I already know that the FubuMVC Web Framework, built on top of ASP.NET , Which enables cleaner config files using YAML, or .rb files? , Tries to reduce too many XML to put you into that file to work properly. But it is still very ugly, I find it unnecessary: ​​

   & Lt; / Assemblies & gt; & Lt; / Compilation & gt; & Lt; Authentication mode = "none" /> & Lt; CustomArror mode = "remote-only" /> & Lt; Pages & gt; & Lt; Control & gt; & Lt; Add tagPrefix = "asp" namespace = "System.Web.UI" assembly = "System.Web.Extensions, version = 3.5.0.0, culture = neutral, publicKeyToken = 31BF3856AD364E35" /> & Lt; Add tagPrefix = "asp" namespace = "System.Web.UI.WebControls" assembly = "System.Web.Extensions, version = 3.5.0.0, culture = neutral, publicKeyToken = 31BF3856AD364E35" /> & Lt; / Control & gt; & Lt; / Pages & gt; & Lt; HttpModules & gt; & Lt; Add name = "UrlRoutingModule" type = "System.Web.Routing.UrlRoutingModule, System.Web.Routing, version = 3.5.0.0, culture = neutral, public keypoint = 31bf3856ad364e35" /> & Lt; / HttpModules & gt; & Lt; HttpHandlers & gt; & Lt; / HttpHandlers & gt; & Lt; /system.web> & Lt; System.codedom & gt; & Lt; Compilers & gt; & Lt; Compiler language = "c #; cs; csharp" extension = ".cs" warning = "4" type = "Microsoft CSARP. CSARP code provider, system, version = 2.0.0.0, culture = neutral, public key token = B77 A5C 561934A90 "& gt; & Lt; ProviderOption name = "CompilerVersion" value = "v3.5" /> & Lt; Provider Option name = "Warning error" value = "wrong" /> & Lt; / Compiler & gt; & Lt; / Compilers & gt; & Lt; /system.codedom> & Lt; System.webServer & gt; & Lt; Validation valid integrated integrated configuration = "false" /> & Lt; Run the moduleAll managed modules FOR ALLRequests = "true" & gt; & Lt; Remove name = "UrlRoutingModule" /> & Lt; Add name = "UrlRoutingModule" type = "System.Web.Routing.UrlRoutingModule, System.Web.Routing, Version = 3.5.0.0, Culture = Neutral, Public KeyToken = 31BF3856AD364E35" /> & Lt; / Module & gt; & Lt; Operators & gt; & Lt; Add name = "UrlRoutingHandler" preCondition = "IntegratedMode" verb = "*" path = "UrlRouting.axd" type = "System.Web.HttpForbiddenHandler, System.Web, version = 2.0.0.0, culture = neutral, publicKeyToken = B03f5f7f11d50a3a" /> & Lt; / Operators & gt; & Lt; /system.webServer> & Lt; / Configuration & gt;  

This is the minimum minimum amount of XML that you need to run, really bad. Many of the above things may just be the default.

My recommendation will leave Web.config alone as much as possible, and separate its own configuration settings - Split into different files.

For example

  & lt; Connection settings: configsource = "Configs \ connection.Strings.config" /> & lt; AppSettings configSource = "Configs \ AppSettings.config" />  

Instead of your connection strings and app settings inside Web.config.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -