473,594 Members | 2,768 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Remoting - Some methods hang on certain setups.

Hi,

We have a windows service passing objects to a client application by
remoting.
The windows service is started and running successfully.

* When the client app is running on the same machine as the windows service
(W2K3) every method gets executed successfully.
* When the client app is running on a different machine (XP SP2), some
methods from the remote object the client calls make client hang. Other
methods are executed successfully.
All the methods that will make the client hang are using a DataReader: At
'Dim Reader as ODBC.OdbcDataRe ader = OdbcCommand.Exe cuteReader()' the client
app freezes. The ODBC queries a Database on the same server (W2K3).
No exception is thrown.

The strange thing is when we reverse the setup (WinService on XP, DB &
ClientApp on W2K3-Server) it all works fine.

We're using tcpChannel.
All objects that the remote object could return are made serializable.
The remoteObject will be created as 'WellKnownObjec tMode.Singleton '

Is this a remoting, odbc, networking or ... -issue?
Any suggestions?

TIA,

Michael
Aug 5 '06 #1
3 2312
Hello Michael,

From your description, you're developing an distributed application which
use .net remoting as client/server communication mechanism. The programs
work well in most cases, however, the client appliation will suffer
application hang when ever call some method on the remote object, correct?

As you mentioned that the problem only occur against some certain methods
and on some particular machines, I think it is likely a environment
specific issue. And based on my experience, application hang is mostly due
to internal resource deadlock(such as handle or event object lock....). And
for your scenario, it'll be a bit hard to locate the exact cause directly
from the surface (generally it will require some raw mode debugging and
dump analysis). Also, look through our internal case storage, there seems
no existing definite issue of ODBC provider in .net remoting environment.

Currently, I would suggest you try the following things and isolate the
issue as much as possible:

1. Try creating two test console application and put the simplified
remoting server and client code logic into them and test them in the same
environment to see whether the problem remains. This can help confirm
whether it is windows service specific.

2. As for the ODBC provider, how are you using them in the remote object's
method, are you directly return the ODBC provider specific objects(such as
OdbcCommand) to client and execute the query in client or finish the query
at server-side and just return the query result (as custom class objects)
to client? If you directly return the ODBC provider specific objects to
client, I would recommend you try moving them to server-side and return the
query result only

3. Are you using ODBC driver to query some RDMBS(SQL Server or other dbms)?
Is it possible that you use some other database provider intead(just for
test)? If so, this can help determine whether the issue is also ODBC
provider specific.

Please feel free to let me know the above test results or if there is
anything else I missed. Meanwhile, I'll also tried some local test against
some typical ODBC query in remoting object to see whether my test can
provide any useful clues.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Aug 7 '06 #2
Hi Steven,

Thanks for your reply.
I'm still waiting for an answer of the supplier of "Unit 4 - Multivers" (a
dutch/belgian accounting-program).
Thanks to your suggestion (we created two test console applications with the
server and client code and tested them in the same environment), we were able
to detect the issue: a messagebox!

"[ODBC SqlBase driver] You are not licensed to use this Merant Driver under
the license you have purchased. If you wish to pruchase a license for use
with this application, then you may use this driver for a period of 30 days,
during which time you are required to obtain a license. You can order a
license for a MERANT ODBC Driver ...."

If we click "OK" the (remaining) code in the methods gets executed.

The weird part is when we run both client & server at the same location, the
msgbox does not appear.

FYI: all returned objects are custom classes. Queries are created and
executed on the server-side.

The ODBC-Driver is used to query the AccountancyDb through a provided API
(by Multivers).

Should you have any solution/workarround for this matter, it would be more
then welcome!

Thanks :-)

Michael
"Steven Cheng[MSFT]" wrote:
Hello Michael,

From your description, you're developing an distributed application which
use .net remoting as client/server communication mechanism. The programs
work well in most cases, however, the client appliation will suffer
application hang when ever call some method on the remote object, correct?

As you mentioned that the problem only occur against some certain methods
and on some particular machines, I think it is likely a environment
specific issue. And based on my experience, application hang is mostly due
to internal resource deadlock(such as handle or event object lock....). And
for your scenario, it'll be a bit hard to locate the exact cause directly
from the surface (generally it will require some raw mode debugging and
dump analysis). Also, look through our internal case storage, there seems
no existing definite issue of ODBC provider in .net remoting environment.

Currently, I would suggest you try the following things and isolate the
issue as much as possible:

1. Try creating two test console application and put the simplified
remoting server and client code logic into them and test them in the same
environment to see whether the problem remains. This can help confirm
whether it is windows service specific.

2. As for the ODBC provider, how are you using them in the remote object's
method, are you directly return the ODBC provider specific objects(such as
OdbcCommand) to client and execute the query in client or finish the query
at server-side and just return the query result (as custom class objects)
to client? If you directly return the ODBC provider specific objects to
client, I would recommend you try moving them to server-side and return the
query result only

3. Are you using ODBC driver to query some RDMBS(SQL Server or other dbms)?
Is it possible that you use some other database provider intead(just for
test)? If so, this can help determine whether the issue is also ODBC
provider specific.

Please feel free to let me know the above test results or if there is
anything else I missed. Meanwhile, I'll also tried some local test against
some typical ODBC query in remoting object to see whether my test can
provide any useful clues.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Aug 8 '06 #3
Hello Michael,

Glad that you've made progress on this issue.

As you've mentioned, the cause of the problem is a MessageBox which will
block non-UI service context. So far I agree that the only solution is
contact the provider supplier and get a workable solution to avoid or
suppress this messagebox.

Please feel free to post here if you got any further progress or got it
resolved.

Good luck!

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Aug 9 '06 #4

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

Similar topics

5
2130
by: Mark Overstreet | last post by:
I am writing an app that needs to contain an object model that allows it to be controlled similiar to something like Word. However, I am writing this in C# and all managed code. I know that I can use remoting to talk to the UI components but I need an example of how to create an event when something happens on the UI (e.g. text box receives focus) and fire that via my object model back to any remote client. I also need the ability to...
17
2340
by: Picho | last post by:
Hi all, I popped up this question a while ago, and I thought it was worth checking again now... (maybe something has changed or something will change). I read this book about component oriented design (owreilly - Juval Lowy), and it was actually very nice. The book goes on about how we should use Interfaces exposure instead of classes (this is my terminology and english is not my language so I hope you understand what I'm on about...).
4
6200
by: Madhu Gopinathan | last post by:
Hi All, I am faced with a horrible hang problem. I have a COM exe server that executes some tasks. The task execution manager is a thread that manages the pool of threads, which is 4 per processor. Each task is processed in a separate thread. Each of the executer threads is an STA thread, and it goes ahead and executes the task. No problems are encountered when tasks are executed one at a time, but when multiple tasks are executed...
0
1010
by: Pushpendra | last post by:
Hi, I have created 2 dlls (Irefdata.dll, RefdataServer.dll) and one remoting service RefDataService.exe. Irefdata is ainterface and I have implemented this interface in refdataserver. I have referenced Irefdata & Refdataserver in the service (Refdataservice.exe) so that I can register this service on tcp channel and access the methods of refdataserver. If I reference these dll without deplying these in global assembly cache (means copy...
1
1375
by: TELOPHASE | last post by:
Hello All, I am working on a remoting project and i dont know why but the object created on server side and client side are totally diffrent from each other. Even their hash codes are diffrent, which means that i am getting 2 totally diff obj instead of sharing 1 obj between client/server. Please Help :-SS Also, can the server application call methods of the shared Object??
6
1457
by: RichieRich | last post by:
Any comments on .NET Remotinv vs. Web Services? Which would you choose? Thanks.
1
8633
by: Sagaert Johan | last post by:
Hi I tried to get around the problem on an un-available remoting server bij using the async methods (BeginInvoke) but noticed that this call is blocking if the remote server is not available. the the client throws an Exception after over 48 seconds, way to long . The async method seems to be only async when the remote operation takes a lot of time to execute.
2
1672
by: Padu | last post by:
Hi, I'm designing a system in C# and I believe the .net framework will simplify my task. Let me give you a background of my app first: Client: Has a collection of certain objects called "Command". Commands may be saved (serialized) to a local disk, loaded later and then sent to a host for execution. Must realize if server is on before sending the "script of Command"
1
1280
by: PRR | last post by:
i just started with .net remoting .... I have created a remoting application where client can connect to the server, get a reference to the object and call methods… its well and fine here.. I also need the server to tell the client from time to time certain thing … My problem is : 1. How do i let my server call client... just the way the client calls the server..
0
7874
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
8244
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
8368
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
7997
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
6647
agi2029
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5738
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
3854
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...
1
2383
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1204
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.