Desktop version

Main > Forum > 1C:Enterprise Platform > 1C:Integration > ComConnector TimeOut when tries to connect

Forum

Search UsersRules
ComConnector TimeOut when tries to connect
#1
Just came
Points:: 0
Joined:: Jun 4, 2014

Hello ,
I am developing an integration windows service that takes some data from 1C and transfer them to another ERP system.Nearly almost everything is working correctly.But sometimes when i try to connect with below code

Code
   V82.COMConnectorClass v82Connection = null;
   object ret = null;
 string connectString = string.Format("Srvr={0};Ref={1};Usr=\"{2}\";Pwd=\"{3}\";", "Srvr", "Ref", "Usr", "Pwd");
   try
   {
       v82Connection = new V82.COMConnectorClass();
       ret = v82Connection.Connect(connectString);//it waits at this line .. until i saw that in log file...and restart this method..      
   }
   catch
   {
       ret = null;
   }

it waits to eastablish a connection.and if i open log txt (this file is created from windows service that i wrote in c#) i can see that it waits.. when i restart the service and so connection is open without delay..
i wonder if there is a timeout mechanism/property that if it does not connect   30 seconds
v82Connection.Connect  method will throw an exception.. so the service will try after  minutes again...
like microsoft sqlconnection timeout..
thanks..

Profile
#2
Just came
Points:: 0
Joined:: Jun 4, 2014

thanks

Profile
#3
Guest
Points::
Joined::

Hello, Evgin İnanır, I'm glad to welcome you on 1C:Developer Network forums.

I'm afraid that there is no parameter for manipulation with timeout of connection.

This looks like a misconfigured of overloaded 1C:Enterprise server. If Thin client is connected normally on that computer where your application is executed?

Profile
#4
Just came
Points:: 0
Joined:: Jun 4, 2014

Thanks ...
My application is executed from different machine where a com connecter is installed  and a client is also installed to connect 1c server.
This connection issue occures nearly one or two times a day..
thanks..

Profile
#5
Guest
Points::
Joined::

Try to increase the period of running your application as the server might be busy with some task. And do not start a new instance until the previous is finished operating.

Profile
#6
Just came
Points:: 0
Joined:: Jun 4, 2014

There is somework arounds in  my mind.. but firstly i want to be sure if there is(or not) a timeout property for com connections
Thanks ...

Profile
#7
Guest
Points::
Joined::

I'm afraid the timeout can not be changed.

Profile
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)



© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.