steavy29 / Telegram.Net

Telegram (http://telegram.org) client library implemented in C#.
17 stars 6 forks source link

'System.ObjectDisposedException' in mscorlib.dll ("Cannot access a disposed object.") in mvc #35

Closed gprsm closed 7 years ago

gprsm commented 7 years ago

I run successfully Project with Console app but when use project in mvc the Exception thrown in

  1. MTprotoSender.cs line 102
  2. TcpTrasport.cs line 55
  3. TcpTrasport.cs line 102 all Exceptions are: 'System.ObjectDisposedException' in mscorlib.dll ("Cannot access a disposed object.")
steavy29 commented 7 years ago

Can you give me please more background on how you use Telegram in web application? The thing is that IIS(or other web host that you might use) can close active tcp connections at any time. And since TelegramNet uses persistent tcp connection, this might be the issue. Though I didn't test how it behaves inside web applications.

gprsm commented 7 years ago

thax