|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Remoting - Some methods hang on certain setups.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 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. 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 Show quoteHide quote "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. > > > > 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.
Create DLL in Visual Studio 2005 accessible by Excel 2002
UpdateDB from DataSet VS 2005 form designer major problem Public definitions in module - VS 2005 Dll basic question ThreadPool and DeadLock problems Assign a value to groupbox from a radiobutton contained in groupbo Writing a blank line under an if statement how to appened data into a arraylist? Reading Lines from a File that is in Memory |
|||||||||||||||||||||||