473,403 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

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.OdbcDataReader = OdbcCommand.ExecuteReader()' 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 'WellKnownObjectMode.Singleton'

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

TIA,

Michael
Aug 5 '06 #1
3 2294
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
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...
17
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...
4
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....
0
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...
1
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,...
6
by: RichieRich | last post by:
Any comments on .NET Remotinv vs. Web Services? Which would you choose? Thanks.
1
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....
2
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...
1
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
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,...
0
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...
0
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...
0
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,...

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.