Hello Friends, I am getting this Error..
Here is my Web Config file looks like..
<?xml version="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=152368
-->
<configuration>
<configSections>
<!--<section name="spark" type="Spark.Configuration.SparkSectionHandler, Spark" />-->
<section name="securityConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Security.Configuration.SecuritySettings, Microsoft.Practices.EnterpriseLibrary.Security, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true" />
<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" />
<section name="exceptionHandling" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Configuration.ExceptionHandlingSettings, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true" />
<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true" />
<section name="enterpriseLibrary.ConfigurationSource" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ConfigurationSourceSection, Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true" />
<section name="cachingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Caching.Configuration.CacheManagerSettings, Microsoft.Practices.EnterpriseLibrary.Caching, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true" />
<sectionGroup name="telerik">
<section name="webAssets" type="Telerik.Web.Mvc.Configuration.WebAssetConfigurationSection, Telerik.Web.Mvc" requirePermission="false" />
</sectionGroup>
</configSections>
<securityConfiguration>
<authorizationProviders>
<add type="Microsoft.Practices.EnterpriseLibrary.Security.AuthorizationRuleProvider, Microsoft.Practices.EnterpriseLibrary.Security, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="Authorization Rule Provider" />
</authorizationProviders>
<securityCacheProviders>
<add type="Microsoft.Practices.EnterpriseLibrary.Security.Cache.CachingStore.CachingStoreProvider, Microsoft.Practices.EnterpriseLibrary.Security.Cache.CachingStore, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" cacheManagerInstanceName="Benefit Builder Cache Manager" defaultSlidingSessionExpirationInMinutes="10" defaultAbsoluteSessionExpirationInMinutes="60" name="Benefit Builder Security Cache" />
</securityCacheProviders>
</securityConfiguration>
<loggingConfiguration name="" tracingEnabled="true" defaultCategory="General">
<listeners>
<add name="Event Log Listener" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedEventLogTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FormattedEventLogTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" source="Enterprise Library Logging" formatter="Text Formatter" log="Application" machineName="." traceOutputOptions="None" />
<add name="Database Trace Listener" type="Microsoft.Practices.EnterpriseLibrary.Logging.Database.FormattedDatabaseTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging.Database, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Database.Configuration.FormattedDatabaseTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging.Database, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" databaseInstanceName="MiscEntities" writeLogStoredProcName="WriteLog" addCategoryStoredProcName="AddCategory" />
</listeners>
<categorySources>
<add switchValue="All" name="General">
<listeners>
<add name="Database Trace Listener" />
</listeners>
</add>
<add switchValue="All" name="Database">
<listeners>
<add name="Database Trace Listener" />
</listeners>
</add>
</categorySources>
<specialSources>
<allEvents switchValue="All" name="All Events">
<listeners>
<add name="Database Trace Listener" />
</listeners>
</allEvents>
<notProcessed switchValue="All" name="Unprocessed Category">
<listeners>
<add name="Rolling Flat File Trace Listener" />
</listeners>
</notProcessed>
<errors switchValue="All" name="Logging Errors & Warnings">
<listeners>
<add name="Event Log Listener" />
</listeners>
</errors>
</specialSources>
</loggingConfiguration>
<exceptionHandling>
<exceptionPolicies>
<add name="Benefit Builder Policy">
<exceptionTypes>
<add name="All Exceptions" type="System.Exception, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" postHandlingAction="None">
<exceptionHandlers>
<add name="Logging Exception Handler" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.LoggingExceptionHandler, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" logCategory="General" eventId="100" severity="Error" title="Enterprise Library Exception Handling" formatterType="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.TextExceptionFormatter, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling" priority="0" />
</exceptionHandlers>
</add>
</exceptionTypes>
</add>
</exceptionPolicies>
</exceptionHandling>
<dataConfiguration defaultDatabase="MiscEntities" />
<connectionStrings>
<add name="GeneralConnectionString" connectionString="Data Source=208.103.111.27,9500;Initial Catalog=BenefitLibrary;Persist Security Info=True;User ID=BenefitBuilderAppLogin;Password=A1batr0$;Pooling=False;MultipleActiveResultSets=True" />
<add name="CodeEntities" connectionString="metadata=res://*/Models.AppCodes.CodesModel.csdl|res://*/Models.AppCodes.CodesModel.ssdl|res://*/Models.AppCodes.CodesModel.msl;provider=System.Data.SqlClient;provider connection string="Data Source=208.103.111.27,9500\MSSQLSERVER;Initial Catalog=BenefitLibrary;Persist Security Info=True;User ID=BenefitBuilderAppLogin;Password=A1batr0$;Pooling=False;MultipleActiveResultSets=True"" providerName="System.Data.EntityClient" />
<add name="BvEntities" connectionString="metadata=res://*/Models.BenVariables.BvModel.csdl|res://*/Models.BenVariables.BvModel.ssdl|res://*/Models.BenVariables.BvModel.msl;provider=System.Data.SqlClient;provider connection string="Data Source=208.103.111.27,9500\MSSQLSERVER;Initial Catalog=BenefitLibrary;Persist Security Info=True;User ID=BenefitBuilderAppLogin;Password=A1batr0$;Pooling=False;MultipleActiveResultSets=True"" providerName="System.Data.EntityClient" />
<add name="ObnEntities" connectionString="metadata=res://*/Models.Obn.ObnModel.csdl|res://*/Models.Obn.ObnModel.ssdl|res://*/Models.Obn.ObnModel.msl;provider=System.Data.SqlClient;provider connection string="Data Source=208.103.111.27,9500\MSSQLSERVER;Initial Catalog=BenefitLibrary;Persist Security Info=True;User ID=BenefitBuilderAppLogin;Password=A1batr0$;Pooling=False;MultipleActiveResultSets=True"" providerName="System.Data.EntityClient" />
<add name="BbpEntities" connectionString="metadata=res://*/Models.BbProcessor.BbpModel.csdl|res://*/Models.BbProcessor.BbpModel.ssdl|res://*/Models.BbProcessor.BbpModel.msl;provider=System.Data.SqlClient;provider connection string="Data Source=208.103.111.27,9500\MSSQLSERVER;Initial Catalog=BenefitLibrary;Persist Security Info=True;User ID=BenefitBuilderAppLogin;Password=A1batr0$;Pooling=False;MultipleActiveResultSets=True"" providerName="System.Data.EntityClient" />
<add name="ProductEntities" connectionString="metadata=res://*/Models.Product.ProductModel.csdl|res://*/Models.Product.ProductModel.ssdl|res://*/Models.Product.ProductModel.msl;provider=System.Data.SqlClient;provider connection string="Data Source=208.103.111.27,9500\MSSQLSERVER;Initial Catalog=BenefitLibrary;Persist Security Info=True;User ID=BenefitBuilderAppLogin;Password=A1batr0$;Pooling=False;MultipleActiveResultSets=True"" providerName="System.Data.EntityClient" />
<add name="SecEntities" connectionString="metadata=res://*/Models.Security.SecModel.csdl|res://*/Models.Security.SecModel.ssdl|res://*/Models.Security.SecModel.msl;provider=System.Data.SqlClient;provider connection string="Data Source=208.103.111.27,9500\MSSQLSERVER;Initial Catalog=BenefitLibrary;Persist Security Info=True;User ID=BenefitBuilderAppLogin;Password=A1batr0$;Pooling=False;MultipleActiveResultSets=True"" providerName="System.Data.EntityClient" />
<add name="AcctEntities" connectionString="metadata=res://*/Models.AcctMembership.AcctModel.csdl|res://*/Models.AcctMembership.AcctModel.ssdl|res://*/Models.AcctMembership.AcctModel.msl;provider=System.Data.SqlClient;provider connection string="Data Source=208.103.111.27,9500\MSSQLSERVER;Initial Catalog=BenefitLibrary;Persist Security Info=True;User ID=BenefitBuilderAppLogin;Password=A1batr0$;Pooling=False;MultipleActiveResultSets=True"" providerName="System.Data.EntityClient" />
<add name="MiscEntities" connectionString="metadata=res://*/Models.MiscTables.MiscModel.csdl|res://*/Models.MiscTables.MiscModel.ssdl|res://*/Models.MiscTables.MiscModel.msl;provider=System.Data.SqlClient;provider connection string="Data Source=208.103.111.27,9500\MSSQLSERVER;Initial Catalog=BenefitLibrary;Persist Security Info=True;User ID=BenefitBuilderAppLogin;Password=A1batr0$;Pooling=False;MultipleActiveResultSets=True"" providerName="System.Data.EntityClient" />
<add name="GenericBenefitLibraryEntities" connectionString="metadata=res://*/Models.Generic.Generic.csdl|res://*/Models.Generic.Generic.ssdl|res://*/Models.Generic.Generic.msl;provider=System.Data.SqlClient;provider connection string="Data Source=208.103.111.27,9500;Initial Catalog=BenefitLibrary;Persist Security Info=True;User ID=BenefitBuilderAppLogin;Password=A1batr0$;MultipleActiveResultSets=True"" providerName="System.Data.EntityClient" />
<add name="StoredProcedureEntities" connectionString="metadata=res://*/Models.StoredProcedures.csdl|res://*/Models.StoredProcedures.ssdl|res://*/Models.StoredProcedures.msl;provider=System.Data.SqlClient;provider connection string="Data Source=208.103.111.27,9500;Initial Catalog=BenefitLibrary;Persist Security Info=True;User ID=ehodys;Password=Cuteboy448;MultipleActiveResultSets=True"" providerName="System.Data.EntityClient" />
</connectionStrings>
<enterpriseLibrary.ConfigurationSource selectedSource="System Configuration Source">
<sources>
<add name="System Configuration Source" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.SystemConfigurationSource, Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</sources>
</enterpriseLibrary.ConfigurationSource>
<cachingConfiguration defaultCacheManager="Benefit Builder Cache Manager">
<cacheManagers>
<add name="Benefit Builder Cache Manager" type="Microsoft.Practices.EnterpriseLibrary.Caching.CacheManager, Microsoft.Practices.EnterpriseLibrary.Caching, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" expirationPollFrequencyInSeconds="60" maximumElementsInCacheBeforeScavenging="1000" numberToRemoveWhenScavenging="10" backingStoreName="NullBackingStore" />
</cacheManagers>
<backingStores>
<add type="Microsoft.Practices.EnterpriseLibrary.Caching.BackingStoreImplementations.NullBackingStore, Microsoft.Practices.EnterpriseLibrary.Caching, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="NullBackingStore" />
</backingStores>
</cachingConfiguration>
<system.web>
<!--<trace enabled="true" pageOutput="true" requestLimit="40" localOnly="false"/>-->
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</assemblies>
<buildProviders>
<!-- add extension=".spark" type="System.Web.Compilation.PageBuildProvider"/ -->
</buildProviders>
</compilation>
<authentication mode="Forms">
<forms loginUrl="~/Account/LogOn" timeout="2880" />
</authentication>
<pages>
<namespaces>
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Routing" />
<add namespace="System.Linq" />
<add namespace="System.Collections.Generic" />
<add namespace="Telerik.Web.Mvc.UI" />
<add namespace="NascoBenefitBuilder.Helpers" />
</namespaces>
</pages>
<customErrors mode="On" defaultRedirect="~/Home/Error">
<error statusCode="403" redirect="~/Home/Error" />
<error statusCode="404" redirect="~/Home/Error" />
</customErrors>
<httpHandlers>
<add verb="*" path="*.mvc" validate="false" type="System.Web.Mvc.MvcHttpHandler, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add verb="GET,HEAD" path="asset.axd" validate="false" type="Telerik.Web.Mvc.WebAssetHttpHandler, Telerik.Web.Mvc" />
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</httpModules>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true" />
<handlers>
<remove name="asset" />
<add name="asset" preCondition="integratedMode" verb="GET,HEAD" path="asset.axd" type="Telerik.Web.Mvc.WebAssetHttpHandler, Telerik.Web.Mvc" />
</handlers>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<telerik>
<webAssets useTelerikContentDeliveryNetwork="false" />
</telerik>
<!--<spark>
compilation debug=”true”
</spark>-->
</configuration>
Activation error occured while trying to get instance of type LogWriter, key
When I using my Logging error ..
this is the code to log my error in my ControllerBase.cs
private static void LogException( Exception ex, ExceptionContext filterContext ) {
if (Logger.IsLoggingEnabled())
{
var logEntry = MvcUnity.Container.Resolve<LogEntry>();
logEntry.Title = filterContext.Exception.Message;
logEntry.Message = filterContext.Exception.ToString();
logEntry.AddErrorMessage("Source: " + ex.Source + "/r/nTarget: " + ex.TargetSite + "/r/nMessage: " +
ex.Message + "/r/nHelp Link: " + ex.HelpLink + "/r/n");
logEntry.AddErrorMessage("Stack Trace: /r/n" + ex.StackTrace + "/r/n");
logEntry.AddErrorMessage("Data: /r/n" + ex.Data + "/r/n");
logEntry.AddErrorMessage("Inner Exception: " + ex.InnerException + "/r/n");
Logger.Write(logEntry);
}
}
This Error I am getting while I am checking Logger.IsLogEnabled() and Logger.Write(logEntry)
Can any body help me out why its giving that error message?
thanks