4
I Use This!
Inactive

News

Analyzed 2 days ago. based on code collected 4 days ago.
Posted over 7 years ago by yallie
[en] TcpEx shouldn't crash the server when a client sends bad or damaged ChannelInfo, issue #2618.
Posted over 7 years ago by yallie
Перечитал я дискуссию и вижу, что проморгал я здесь важный момент. Ошибки сериализации/десериализации в Моно это отдельный вопрос, но в любом случае, ни при каких подобных ошибках сервер не должен падать. Я сделал тикет по этой теме: #2618. Как ... [More] минимум, падение сервера необходимо устранить. Кстати, насчет BinaryFormatter. Скачал я вчера последний tarball исходников Моно и смотрю, что они в конце концов просто выбросили свои исходники и используют MIT-лицензированный код Microsoft. Так что в распоследнем Моно такой ошибки десериализации встречаться больше не должно. [Less]
Posted over 7 years ago by yallie
Originated from this discussion: https://zyan.codeplex.com/discussions/657090Mono has a weird deserialization bug that might crash the server application.We should stop the server from crashing. >И сервер и клиент на моно.На сервере выпадает такая ... [More] ошибка и приложение закрывается. Так как выловить ошибку нельзя.Можно конечно сохранить трафик в файлик, но сервер зачастую работает несколько недель с кучей транзакций, а потом падает. Большой файлик будет.Причём как мы поняли, это происходит при входящем запросе. [Less]
Posted over 7 years ago by yallie
Originated from this discussion: https://zyan.codeplex.com/discussions/657090Mono has a weird deserialization bug that might crash the server application.We should stop the server from crashing. >И сервер и клиент на моно.На сервере выпадает такая ... [More] ошибка и приложение закрывается. Так как выловить ошибку нельзя.Можно конечно сохранить трафик в файлик, но сервер зачастую работает несколько недель с кучей транзакций, а потом падает. Большой файлик будет.Причём как мы поняли, это происходит при входящем запросе. [Less]
Posted over 7 years ago by yallie
Hello! This issue has been finally resolved. It was a limitation of the TcpExChannel, not the .NET Remoting itself. Please download the latest version of the source code to get the fix. The fix will be included in the upcoming Zyan 2.8 release. Thanks for your patience! Kind regards, Alex.
Posted over 7 years ago by yallie
Zyan events can be used to trace server-side events like SQL queries, permission checks, etc.Capturing server-side call stack is straightforward.But the whole picture needs a client-side call stack as well.TODO: add the ability to capture client-side ... [More] call stack on remote calls.Of course it must be optional (and disabled by default) because it's quite an expensive operation.Comments: ** Comment from web user: yallie ** Perhaps it can be done on the application level.First, Zyan provides a call tracking Guid.Second, ZyanConnection has BeforeInvoke/AfterInvoke/InvokeCanceled events.We can hook onto these events to capture the call stack matching the tracking Guids.```csharpvar stackTraces = new Dictionary();// BeforeInvoke (if tracing is enabled in the application):stackTraces[CallTrackingID] = new StackTrace();// AfterInvoke/InvokeCanceled:stackTraces.Remove(CallTrackingID);// TODO: add CallTrackingID property to the SessionEventArgs``` [Less]
Posted over 7 years ago by yallie
Hello Mark, Here is the complete sample: https://gist.github.com/yallie/d39a2e81106dc5572f1e2b5f519510eb Below is the essential part: // shared interface public interface IService { void RegisterCallback(Action callback); void ... [More] DoCallback(); } // server-side class code public class Service : IService { private static ConcurrentDictionary Callbacks { get; } = new ConcurrentDictionary(); private Guid ClientID { get { return ServerSession.CurrentSession.SessionID; } } public void RegisterCallback(Action callback) { // register my delegate Callbacks[ClientID] = callback; Console.WriteLine("Client {0} registered the delegate.", ClientID); } public void DoCallback() { Action action; if (Callbacks.TryGetValue(ClientID, out action)) { // call my delegate, if registered action(); Console.WriteLine("Calling client {0}'s delegate.", ClientID); } } } Hope that helps. Regards, Alex. [Less]
Posted over 7 years ago by yallie
An app has two TcpEx-based connections to two different servers.Maxim Sobolev reports that events are only marshaled to the first connection.Sample project is attached. The original error report follows.Issue #dev-9==============Написал с нуля ... [More] приложение. Прицепился к астер-сервису. События работают: protected override void OnLoad(EventArgs e) { base.OnLoad(e); var asterConnection = CreateAsterConnection(); var testservice = asterConnection.CreateProxy(); testservice.AgentConnected += testservice_Test; } private void testservice_Test(object sender, AgentConnectEventArgs args) { if (InvokeRequired) { Invoke(new EventHandler(testservice_Test), new object[] { sender, args }); return; } MessageBox.Show(this, args.UniqueId); } private ZyanConnection CreateAsterConnection() { var proto = new TcpDuplexClientProtocolSetup(false); return new ZyanConnection("tcpex://localhost:5039/AsterServer", proto); }далее добавил соединение к ультиме, и события астериска перестали отлавливаться: protected override void OnLoad(EventArgs e) { base.OnLoad(e); var ultimaConnection = CreateUltimaConnection(); var notificationService = ultimaConnection.CreateProxy(); notificationService.NotificationRead += notificationService_NotificationRead; var asterConnection = CreateAsterConnection(); var testservice = asterConnection.CreateProxy(); testservice.AgentConnected += testservice_Test; }Затем поменял местами порядок подключений, заработало: protected override void OnLoad(EventArgs e) { base.OnLoad(e); var asterConnection = CreateAsterConnection(); var testservice = asterConnection.CreateProxy(); testservice.AgentConnected += testservice_Test; var ultimaConnection = CreateUltimaConnection(); var notificationService = ultimaConnection.CreateProxy(); notificationService.NotificationRead += notificationService_NotificationRead; }таким образом есть предположение, что события работают только для первого коннекта.Есть какие-нибудь идеи как можено это исправить?Test solution=========Запускаем сперва FirstServerApplication.Затем SecondServerApplication.Затем СlientApplication. При загрузке он подсоединяется к серверам и подписывается на события.Далее в форме первого сервера жмём кнопку "Test". В клиенте выскакивает окно.Ждём во втором сервере кнопку - в клиенте ничего не выскакивает.Comments: ** Comment from web user: yallie ** Woohoo! It's finally fixed! Thanks a lot [Max Sobolev](https://www.codeplex.com/site/users/view/sobolev88). [Less]
Posted over 7 years ago by yallie
An app has two TcpEx-based connections to two different servers.Maxim Sobolev reports that events are only marshaled to the first connection.Sample project is attached. The original error report follows.Issue #dev-9==============Написал с нуля ... [More] приложение. Прицепился к астер-сервису. События работают: protected override void OnLoad(EventArgs e) { base.OnLoad(e); var asterConnection = CreateAsterConnection(); var testservice = asterConnection.CreateProxy(); testservice.AgentConnected += testservice_Test; } private void testservice_Test(object sender, AgentConnectEventArgs args) { if (InvokeRequired) { Invoke(new EventHandler(testservice_Test), new object[] { sender, args }); return; } MessageBox.Show(this, args.UniqueId); } private ZyanConnection CreateAsterConnection() { var proto = new TcpDuplexClientProtocolSetup(false); return new ZyanConnection("tcpex://localhost:5039/AsterServer", proto); }далее добавил соединение к ультиме, и события астериска перестали отлавливаться: protected override void OnLoad(EventArgs e) { base.OnLoad(e); var ultimaConnection = CreateUltimaConnection(); var notificationService = ultimaConnection.CreateProxy(); notificationService.NotificationRead += notificationService_NotificationRead; var asterConnection = CreateAsterConnection(); var testservice = asterConnection.CreateProxy(); testservice.AgentConnected += testservice_Test; }Затем поменял местами порядок подключений, заработало: protected override void OnLoad(EventArgs e) { base.OnLoad(e); var asterConnection = CreateAsterConnection(); var testservice = asterConnection.CreateProxy(); testservice.AgentConnected += testservice_Test; var ultimaConnection = CreateUltimaConnection(); var notificationService = ultimaConnection.CreateProxy(); notificationService.NotificationRead += notificationService_NotificationRead; }таким образом есть предположение, что события работают только для первого коннекта.Есть какие-нибудь идеи как можено это исправить?Test solution=========Запускаем сперва FirstServerApplication.Затем SecondServerApplication.Затем СlientApplication. При загрузке он подсоединяется к серверам и подписывается на события.Далее в форме первого сервера жмём кнопку "Test". В клиенте выскакивает окно.Ждём во втором сервере кнопку - в клиенте ничего не выскакивает.Comments: Fixed, see changeset #44712. [Less]
Posted over 7 years ago by yallie
[en] Fixed the problem of two registered TcpExChannels trying to establish the callback connections, issue #2283.