Is it possible to call a .NET 2.0 delegate from an event in a .NET 1.1
process? We have a class compiled with Framework 1.1 that has a public
Event called 'Error.' That class is instantiated in a separate
process and made available to our Framework 2.0 process via
Remoting. A class in the 2.0 process hooks up to the 1.1 event.
When Visual Studio steps through the code in the 2.0 process, it
shows Error as always being non-null, and hooked up to the proper
delegate. However, the .NET 1.1 process always claims that the Error
event is null, and thus cannot call it.
I assume that this is a result of the difficulties of calling events
in unknown assemblies (the 2.0 app references the 1.1 assembly, but
not vice versa because 1.1 apps are seemingly unable to reference 2.0
assemblies). During remoting instantiation, the TypeFilter.Full
property is set.
What manner can be used to let 1.1 callbacks receive 2.0 delegates? 7 1443
Hi dbooksta,
Thanks for your post!
Based on my knowledge and testing, in VS.net2003, we can not reference
..Net2.0 assembly. While .Net remoting requires both client and service
reference the assembly containing remoting class. Can you show me some
detail information regarding how do you do remoting between .Net1.1 and
..Net2.0? Do you place the remoting class in a .Net1.1 assembly, so that
both client and server can reference it without any problem?
For efficiency's sake, is it possible for you to provide a sample project
to demonstrate the problem? Then we can troubleshoot it efficiently.
I look forward to your feedback. Thanks
Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
I have posted a minimal sample solution demonstrating the problem at http://204.9.191.76/NailYale/RemoteSample.zip
This is all VS2005; we are using MSBee to force the remote process to run
under .NET 1.1. (See the Readme.txt for info on where to get that plug-in).
Is this sufficient to see and help with this problem?
""Jeffrey Tan[MSFT]"" wrote: Hi dbooksta,
Thanks for your post!
Based on my knowledge and testing, in VS.net2003, we can not reference .Net2.0 assembly. While .Net remoting requires both client and service reference the assembly containing remoting class. Can you show me some detail information regarding how do you do remoting between .Net1.1 and .Net2.0? Do you place the remoting class in a .Net1.1 assembly, so that both client and server can reference it without any problem?
For efficiency's sake, is it possible for you to provide a sample project to demonstrate the problem? Then we can troubleshoot it efficiently.
I look forward to your feedback. Thanks
Best regards, Jeffrey Tan Microsoft Online Community Support ================================================== When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights.
Hi Dave,
Thanks for your feedback.
I will perform some test and research on your sample project. I will update
you ASAP. Thanks.
Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Hi Dave,
Yes, I can reproduce out this problem now. I will spend some more time on
analysising it. Thanks for your patient.
Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Hi Dave,
I am still contacting US support team for coworking on this issue, is it
possible for you to send an email to je***@online.microsoft.com(remove
"online.")? We will work with you more efficiently. Thanks!
Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Solution finally found! It turns out I was not doing the Remoting correctly.
First of all, the remoted class has to inherit from MarshalByRefObject.
Second of all, for the callback to be possible the remoting has to be done
across a TcpChannel with both a Client and Server Sink Provider, like the
following:
BinaryServerFormatterSinkProvider serverProv = new
BinaryServerFormatterSinkProvider();
BinaryClientFormatterSinkProvider clientProv = new
BinaryClientFormatterSinkProvider();
serverProv.TypeFilterLevel =
System.Runtime.Serialization.Formatters.TypeFilter Level.Full;
IDictionary props = new Hashtable();
props["port"] = 2555;
TcpChannel channel = new TcpChannel(props, clientProv,
serverProv);
ChannelServices.RegisterChannel(channel);
Hi Dave,
Thanks for your the solution information!
MarshalByRefObject is a basic point, it seems that we both missed it :-(.
Again, thank you sharing the solution with the community!
Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Melissa Wallis |
last post by:
I have a class with 5 callbacks. Two of the callbacks work fine but the
others don't. The main difference is that the callbacks that don't work are
composed of a sequence of structs. I noticed a...
|
by: Dave Benjamin |
last post by:
Is there a straightforward way to create a generator from a function that
takes a callback? For instance, I have a function called "process":
def process(text, on_token):
...
For each token...
|
by: ck388 |
last post by:
For some reason when I enable the callback feature of the gridview I
still get a page refresh, that is it seems like there is a postback
that occurs, not a callback which is just supposed to update...
|
by: Christopher Jastram |
last post by:
I'm a self-taught programmer, so this might be a pretty dumb question.
If it is, please point me in the right direction and I shall
apologize profusely.
I have a question regarding C++ and...
|
by: anilkoli |
last post by:
I want clear cut idea about callbacks and also of delegates
I have doughts about callbacks,
I feel callbacks are used for
1. recursion
2. dynamically calling a perticular method out of
many...
| |
by: zholthran |
last post by:
Hi folks,
after reading several threads on this issue (-> subject) I fear that I
got a problem that cannot easily be solved by the offered workarounds
in an acceptable way, at least not with my...
|
by: geoffschmidt |
last post by:
I'm trying to write an extension in C that delivers callbacks to
Python. The C code starts several threads, and I'd like one of the new
threads that is started to be able to deliver callbacks to...
|
by: dennis.richardson |
last post by:
Greetings all.
Here's a problem that's been driving me nuts for the last 48 hours.
I'm hoping that someone has come across this before.
I have a C# Application that reads a UDP broadcast...
|
by: kronus |
last post by:
I need further help in understanding how callbacks work with Alfresco.
I am able to connect to alfresco and I’m trying to return a list of users from three groups, but it seems that I don’t quite...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |