Click here to Skip to main content
15,901,505 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: General question about allocate memory in .NET Pin
Luc Pattyn3-Apr-09 8:45
sitebuilderLuc Pattyn3-Apr-09 8:45 
GeneralRe: General question about allocate memory in .NET Pin
harold aptroot3-Apr-09 13:10
harold aptroot3-Apr-09 13:10 
Generalcount save Pin
AARONDAS3-Apr-09 6:42
AARONDAS3-Apr-09 6:42 
GeneralRe: count save Pin
led mike3-Apr-09 8:33
led mike3-Apr-09 8:33 
GeneralRe: count save Pin
Luc Pattyn3-Apr-09 8:49
sitebuilderLuc Pattyn3-Apr-09 8:49 
GeneralRe: count save Pin
dojohansen9-Apr-09 5:05
dojohansen9-Apr-09 5:05 
GeneralRe: count save Pin
kumarnitesh6-Apr-09 1:19
kumarnitesh6-Apr-09 1:19 
QuestionResolving the full type name Pin
Vipul Mehta3-Apr-09 2:46
Vipul Mehta3-Apr-09 2:46 
Hi,

We are writing an WPF application using .NET 3.5 with Enterprise Library 4.1. We have created an custom handler - UIExceptionHandler within our exe project. When we try to invoke the ExceptionPolicy.HandleException(e, "UI Message Policy"); method, we encounter the below [1] error.

Find below my code for 

namespace CName.DName.AName.UI
{
[ConfigurationElementType(typeof(CustomHandlerData))] 
public class UIExceptionHandler : IExceptionHandler 
{
public UIExceptionHandler(NameValueCollection ignore) 
{
}

public Exception HandleException(Exception exception, Guid handlingInstanceId) {
DialogResult result = this.ShowThreadExceptionDialog(exception); 
return exception;
}

// Creates the error message and displays it. 
private DialogResult ShowThreadExceptionDialog(Exception ex) 
{return MessageBox.Show("Some Error Message", "Application Error", MessageBoxButtons.OK, MessageBoxIcon.Stop); 
}
}
}

Also find below the implementation of the custom handler in the app.config file

<

add name="UIExceptionPolicy">
<exceptionTypes>
<add type="System.Exception, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" postHandlingAction="NotifyRethrow" name="Exception">
<exceptionHandlers>
    <add logCategory="General" eventId="100" severity="Error" title="Enterprise Library Exception Handling" formatterType="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.TextExceptionFormatter, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" priority="0" useDefaultLogger="false" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.LoggingExceptionHandler, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="Logging Handler" />
   <add type="CName.DName.AName.UI.UIExceptionHandler, CName.DName.AName.UI" name="UI Message Handler"/> 
</exceptionHandlers>
</add>
</exceptionTypes>
</add> 


FYI - When I tried implementing the UIExceptionHandler custom handler class in an DLL and provided the full name in the app.config, it worked fine. But this fails when I create the handler within the exe project. The name of our exe project is Test.

What might be wrong here?

[1]
The current build operation (build key Build Key[Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionPolicyImpl, UIExceptionPolicy]) failed: The type 'CName.DName.AName.UI.UIExceptionHandler, CName.DName.AName.UI.' cannot be resolved. Please verify the spelling is correct or that the full type name is provided. (Strategy type ConfiguredObjectStrategy, index 2)

Regards,
Vipul

Regards,
Vipul Mehta

AnswerRe: Resolving the full type name Pin
Pete O'Hanlon3-Apr-09 3:07
mvePete O'Hanlon3-Apr-09 3:07 
AnswerRe: Resolving the full type name Pin
Vipul Mehta3-Apr-09 3:37
Vipul Mehta3-Apr-09 3:37 
QuestionIdea behind Chinese PinYin in c# Pin
dhanaid3-Apr-09 1:56
dhanaid3-Apr-09 1:56 
QuestionRe: Idea behind Chinese PinYin in c# Pin
dhanaid3-Apr-09 1:59
dhanaid3-Apr-09 1:59 
Question.NET Database Migrations Pin
AntonGogolev2-Apr-09 21:38
AntonGogolev2-Apr-09 21:38 
AnswerRe: .NET Database Migrations Pin
Eddy Vluggen2-Apr-09 22:11
professionalEddy Vluggen2-Apr-09 22:11 
QuestionMS Visual Studio 2008 pro vs MS Visual Studio 2005 Pin
Senthil S2-Apr-09 18:46
Senthil S2-Apr-09 18:46 
AnswerRe: MS Visual Studio 2008 pro vs MS Visual Studio 2005 Pin
Anubhava Dimri2-Apr-09 21:38
Anubhava Dimri2-Apr-09 21:38 
GeneralRe: MS Visual Studio 2008 pro vs MS Visual Studio 2005 Pin
dojohansen9-Apr-09 5:10
dojohansen9-Apr-09 5:10 
Questionwhy the program does not execute the "Play( )" function in webservice? Pin
lynn10072-Apr-09 2:39
lynn10072-Apr-09 2:39 
AnswerRe: why the program does not execute the "Play( )" function in webservice? Pin
led mike2-Apr-09 4:52
led mike2-Apr-09 4:52 
GeneralRe: why the program does not execute the "Play( )" function in webservice? Pin
lynn10072-Apr-09 16:55
lynn10072-Apr-09 16:55 
GeneralRe: why the program does not execute the "Play( )" function in webservice? Pin
led mike3-Apr-09 5:49
led mike3-Apr-09 5:49 
GeneralRe: why the program does not execute the "Play( )" function in webservice? Pin
lynn10073-Apr-09 17:27
lynn10073-Apr-09 17:27 
Questionerror........ Pin
yashoda.gm1-Apr-09 18:40
yashoda.gm1-Apr-09 18:40 
AnswerRe: error........ Pin
Thanigainathan.S1-Apr-09 19:04
Thanigainathan.S1-Apr-09 19:04 
QuestionlbuttonDown out of a mode window, witch message is spring? Pin
coderormnger1-Apr-09 16:36
coderormnger1-Apr-09 16:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.