Monday, April 29, 2013

Configuration system failed to initialize

Got this error?

Check your web.config or app.config, make sure that comes after

So it should be like this:

<configuration>
  <configSections>
    <section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true" />
  </configSections>
  <appSettings>
    <add key="ConfigXMLPath" value="D:\Config.xml" />
  </appSettings>
...
</configuration>

If your configSections does not come right after , it will throw such error.

Example of configuration that will throw the error:

<configuration>
  <appSettings>
    <add key="ConfigXMLPath" value="D:\Config.xml" />
  </appSettings>
  <configSections>
    <section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true" />
  </configSections>
...
</configuration>

Thursday, April 18, 2013

Check SQL version from Query

Just type this

SELECT @@VERSION VersionInfo
GO

:D
source: here