Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging' cannot be resolved. Please verify the spelling is correct or that the full type name is provided

Topics: Exception Handling Application Block
May 17, 2007 at 7:14 PM
The type 'Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.LoggingExceptionHandler, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging' cannot be resolved. Please verify the spelling is correct or that the full type name is provided.

Hello, I created the exception block with the enterprise library configuration program, it wasnt compiling because the assembles were not on the GAC, so I deleted the part of every line that says version, culture and public key token.

After I deleted it I got this error.
The type 'Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.LoggingExceptionHandler, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging' cannot be resolved. Please verify the spelling is correct or that the full type name is provided.


I dont know what can it be, I will show you the code.
this is the codebehind.
protected void Button1_Click(object sender, EventArgs e)
{
if (Page.IsValid)
{

BLPerfil objBlPerfil = new BLPerfil();
Perfil objPerfil = new Perfil();
objPerfil.IdPrioridad = Convert.ToInt32(TextBox2.Text);
objPerfil.DSPerfil = TextBox1.Text;
ValidationResults results = Validation.Validate<Perfil>(objPerfil, "Regla");
if(results.IsValid)
{
try
{
objBlPerfil.Ingresar(objPerfil);
}
catch(Exception ex)
{
bool rethrow = ExceptionPolicy.HandleException(ex, "Log only");
if (rethrow)
{
throw;
}
}

GridView1.DataBind();
}
}
}

and the web.config

<loggingConfiguration name="Logging Application Block" tracingEnabled="true"
defaultCategory="Enterprise" logWarningsWhenNoCategoriesMatch="true">
<listeners>
<add source="Enterprise Library Logging" formatter="Text Formatter"
log="Application" machineName="" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FormattedEventLogTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging"
traceOutputOptions="None" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedEventLogTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging"
name="Formatted EventLog TraceListener" />
</listeners>
<formatters>
<add template="Timestamp: {timestamp}&#xD;&#xA;Message: {message}&#xD;&#xA;Category: {category}&#xD;&#xA;Priority: {priority}&#xD;&#xA;EventId: {eventid}&#xD;&#xA;Severity: {severity}&#xD;&#xA;Title:{title}&#xD;&#xA;Machine: {machine}&#xD;&#xA;Application Domain: {appDomain}&#xD;&#xA;Process Id: {processId}&#xD;&#xA;Process Name: {processName}&#xD;&#xA;Win32 Thread Id: {win32ThreadId}&#xD;&#xA;Thread Name: {threadName}&#xD;&#xA;Extended Properties: {dictionary({key} - {value}&#xD;&#xA;)}"
type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging"
name="Text Formatter" />
</formatters>
<categorySources>
<add switchValue="All" name="Enterprise">
<listeners>
<add name="Formatted EventLog TraceListener" />
</listeners>
</add>
</categorySources>
<specialSources>
<allEvents switchValue="All" name="All Events" />
<notProcessed switchValue="All" name="Unprocessed Category" />
<errors switchValue="All" name="Logging Errors & Warnings">
<listeners>
<add name="Formatted EventLog TraceListener" />
</listeners>
</errors>
</specialSources>
</loggingConfiguration>
<exceptionHandling>
<exceptionPolicies>
<add name="Log only">
<exceptionTypes>
<add type="System.Exception, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
postHandlingAction="NotifyRethrow" name="Exception">
<exceptionHandlers>
<add logCategory="Enterprise" eventId="100" severity="Error"
title="Enterprise Library Exception Handling" formatterType="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.TextExceptionFormatter, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling"
priority="0" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.LoggingExceptionHandler, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging"
name="Logging Handler" />
</exceptionHandlers>
</add>
</exceptionTypes>
</add>
</exceptionPolicies>
</exceptionHandling>