Cindy Liu
10/11/2004 6:47:00 PM
Hi,
I have downloaded Ingo's EventsEnhanced sample and did the following
modification:
In General.cs:
1. Add a serializable class:
[Serializable]
public class MyClass
{
public string _str;
public string MyString{get { return _str;} set {_str=value;}}
string _private;
public string ReadOnly{get {return _str;}}
}
2. Modified the delegate to:
public delegate void MessageArrivedHandler(String msg,MyClass oClass);
In Server.cs:
Modified SafeInvokeEvent to print out MyClass.MyString.
I have no problem to run the modified samples on my Windows 2003 Server box.
However, after I add the strong name for General.dll (I haven't put it in
GAC and didn't change any configuation files either), I ran server.exe, no
problem. Then ran EventListener.exe, no problem. Then ran EventInitiator.exe,
no problem with itself, but the server.exe console showed
"Number of Listeners: 1. Exception occured, will remove Delegate. Because of
security restrictions, the type General.MyClass cannot be accessed. InnerErr:
Request failed."
I modified his code to print out error message and inner error message.
Anybody has idea why?
Thanks in advance!!!
Cindy