c# - Is there a way to capture error in one application in other application -
i working on 2 different applications.
i calling application 2 process (.exe file ) in application 1 solution. when application 2 throws “invalid username , password” error want catch error exception in application 1 solution.
is there way capture error in 1 application in other application
my application c# windows application
you cannot throw-catch between process boundaries. have use inter-process communication technique. there many of them choose depending on situation.
here list of options...
- file: process writes log file process b listening to. easy implement.
- named pipes or tcp/ip sockets: can link 2 processes named pipe or sockets , transmit data on wire 1 application another.
- message queue: process can listen message queue process b pushing messages to.
- database: process can write database while process b checks database. remote database or simple sqlite database.
using file or named pipe easiest way go trying solve. other options depend on environment , requirements.
Comments
Post a Comment