|
Cannot access a disposed object. Object name: 'System.ServiceModel.Channels.ServiceChannel
|
|||
---|---|---|---|
#18+
Объявляю : static IStatReplicatServer proxy; Создаю public static bool ListenerOpen(string AdressRouter,int portnum) { EndpointAddress endpointAddress = new EndpointAddress(endPointAddr); proxy = ChannelFactory<IStatReplicatServer>.CreateChannel(tcpBinding, endpointAddress); proxy.ReplRevisionLastDate(); } Всё ок. С другого метода в этом же классе вызываю у proxy.ReplRevisionLastDate(); ошибка. public static DateTime geReplRevisionLastDate() { DateTime d = DateTime.MinValue; using (proxy as IDisposable) { d = proxy.ReplRevisionLastDate(); } return d; } Помогите плиз ! Cannot access a disposed object. Object name: 'System.ServiceModel.Channels.ServiceChannel'. ... |
|||
:
Нравится:
Не нравится:
|
|||
20.07.2011, 12:36 |
|
Cannot access a disposed object. Object name: 'System.ServiceModel.Channels.ServiceChannel
|
|||
---|---|---|---|
#18+
Валится на строке return d ? ... |
|||
:
Нравится:
Не нравится:
|
|||
20.07.2011, 13:46 |
|
Cannot access a disposed object. Object name: 'System.ServiceModel.Channels.ServiceChannel
|
|||
---|---|---|---|
#18+
... |
|||
:
Нравится:
Не нравится:
|
|||
20.07.2011, 13:47 |
|
|
start [/forum/topic.php?fid=21&msg=37359305&tid=1442226]: |
0ms |
get settings: |
9ms |
get forum list: |
14ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
33ms |
get topic data: |
10ms |
get forum data: |
3ms |
get page messages: |
42ms |
get tp. blocked users: |
1ms |
others: | 13ms |
total: | 131ms |
0 / 0 |