473,602 Members | 2,811 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Callbacks from .NET 1.1 process to .NET 2.0

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?

Jun 26 '06 #1
7 1447
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.

Jun 27 '06 #2
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.

Jun 27 '06 #3
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.
Jun 28 '06 #4
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.

Jun 29 '06 #5
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.mi crosoft.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.

Jul 3 '06 #6
Solution finally found! It turns out I was not doing the Remoting correctly.

First of all, the remoted class has to inherit from MarshalByRefObj ect.

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:

BinaryServerFor matterSinkProvi der serverProv = new
BinaryServerFor matterSinkProvi der();
BinaryClientFor matterSinkProvi der clientProv = new
BinaryClientFor matterSinkProvi der();
serverProv.Type FilterLevel =
System.Runtime. Serialization.F ormatters.TypeF ilterLevel.Full ;
IDictionary props = new Hashtable();
props["port"] = 2555;
TcpChannel channel = new TcpChannel(prop s, clientProv,
serverProv);
ChannelServices .RegisterChanne l(channel);
Jul 10 '06 #7
Hi Dave,

Thanks for your the solution information!

MarshalByRefObj ect 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.

Jul 11 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2290
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 comment about this same problem on the web but no solution was noted. What makes the callbacks with the sequences so different? It seems that when one of the callbacks with a sequence is called it just hangs. I am talking to a TAO orb from...
5
1355
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 that "process" finds in "text", it creates a token object, "token", and calls "on_token(token)". Now, suppose I wanted to create a generator based on this function. I tried
0
2723
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 not the whole page, but a portion of the page. Strangely enough the URL below http://beta.asp.net/QUICKSTARTV20/aspnet/doc/ctrlref/data/gridview.aspx (VB GridView Paging and Sorting Callbacks example)
5
3240
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 object members. Can anyone help? I'm writing a C++ wrapper for a fairly old programming interface to a document editing program that has no OOP whatsoever; only tons of structs. This program has different callbacks I'm supposed to implement for...
0
1141
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 methods, deciding at runtime. 3. Notification
9
3337
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 limited c & c++ experience. Maybe some of you can help. the problem: I need several instances of a class whose (non-static!) methods should serve as callbacks for a dll (which can' be manipulated/adapted in any
1
2197
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 Python. I thought I could do this by wrapping the callback function in PyGILState_Ensure / PyGILState_Release. When I do this, the Python code in the callback in between those two calls certainly works, but when PyGILState_Release is called, the...
15
8391
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 (asynchronously). Then it repackages these UDP packets and sends them to a subscriber via TCP. Now, I can read the UDP stream all day long without the application
0
2037
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 understand how callbacks work, because it’s returning all three groups to my function at once, rather than having the function return the result of each set of users from their respective groups. // returns Group public...
0
7920
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8401
Oralloy
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8404
jinu1996
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8054
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8268
tracyyun
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
5867
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5440
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3900
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
1254
bsmnconsultancy
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.