Click here to Skip to main content
15,917,793 members
Home / Discussions / C#
   

C#

 
QuestionException context in C# Pin
Antoine Jaussoin4-Jan-10 22:51
Antoine Jaussoin4-Jan-10 22:51 
AnswerRe: Exception context in C# Pin
Nicholas Butler4-Jan-10 23:20
sitebuilderNicholas Butler4-Jan-10 23:20 
GeneralRe: Exception context in C# Pin
Antoine Jaussoin5-Jan-10 0:10
Antoine Jaussoin5-Jan-10 0:10 
GeneralRe: Exception context in C# Pin
Nicholas Butler5-Jan-10 0:30
sitebuilderNicholas Butler5-Jan-10 0:30 
GeneralRe: Exception context in C# Pin
Antoine Jaussoin5-Jan-10 1:21
Antoine Jaussoin5-Jan-10 1:21 
GeneralRe: Exception context in C# Pin
Nicholas Butler5-Jan-10 1:35
sitebuilderNicholas Butler5-Jan-10 1:35 
GeneralRe: Exception context in C# Pin
Luc Pattyn5-Jan-10 2:26
sitebuilderLuc Pattyn5-Jan-10 2:26 
QuestionEnumerate eventlog sources Pin
Sunil G4-Jan-10 22:02
Sunil G4-Jan-10 22:02 
AnswerRe: Enumerate eventlog sources Pin
Programm3r4-Jan-10 23:19
Programm3r4-Jan-10 23:19 
AnswerRe: Enumerate eventlog sources Pin
Programm3r4-Jan-10 23:31
Programm3r4-Jan-10 23:31 
GeneralRe: Enumerate eventlog sources Pin
Sunil G5-Jan-10 1:31
Sunil G5-Jan-10 1:31 
QuestionC# Avr Pin
jojoba20104-Jan-10 21:30
jojoba20104-Jan-10 21:30 
AnswerRe: C# Avr Pin
OriginalGriff4-Jan-10 21:56
mveOriginalGriff4-Jan-10 21:56 
QuestionRe: C# Avr Pin
jojoba20104-Jan-10 22:00
jojoba20104-Jan-10 22:00 
AnswerRe: C# Avr Pin
OriginalGriff4-Jan-10 22:15
mveOriginalGriff4-Jan-10 22:15 
AnswerRe: C# Avr Pin
Luc Pattyn5-Jan-10 2:32
sitebuilderLuc Pattyn5-Jan-10 2:32 
QuestionHelp Pin
levan omadze4-Jan-10 20:58
levan omadze4-Jan-10 20:58 
AnswerRe: Help Pin
0x3c04-Jan-10 21:11
0x3c04-Jan-10 21:11 
GeneralRe: Help Pin
levan omadze4-Jan-10 21:43
levan omadze4-Jan-10 21:43 
GeneralRe: Help Pin
0x3c05-Jan-10 5:58
0x3c05-Jan-10 5:58 
AnswerRe: Help Pin
Game-point4-Jan-10 21:58
Game-point4-Jan-10 21:58 
QuestionA network-related or instance-specific error occurred while establishing a connection to SQL Server Pin
Tridip Bhattacharjee4-Jan-10 20:34
professionalTridip Bhattacharjee4-Jan-10 20:34 
AnswerRe: A network-related or instance-specific error occurred while establishing a connection to SQL Server Pin
Jimmanuel5-Jan-10 8:32
Jimmanuel5-Jan-10 8:32 
QuestionMSMQ Receiving messages Help!!! Pin
faheemnadeem4-Jan-10 19:32
faheemnadeem4-Jan-10 19:32 
Hi,
I have recently faced a problem, which i am unable to solve. Anyone can guide me please.

Scenario:
I am using MSMQ to communicate between many programs running concurrently...

Programs:
Dedicated TCP/IP server - Windows service
Dedicated Serial Server - Windows service
Dedicated listening Data Processor server - Windows service
Server Manager - Winform App

Message queues:
Data Queue
Command Queue
Admin Queue

I have two communication server listening and sending data to remote clients and data processor. Raw and Processed data are communicated through messages from servers to winform app through data processor. There are two classes named (Event receiver, Event reporter), which each running program subscribes too to communicate between each other. The reporting side is simple containing commands only to send messages. The problem lies in the design of event receiver class.

Its a single classes initializing three receiving(not peeking) events on three message queues. Whereby then it distributes received messages, by using many custom events.

Problem.
Currently declared events as static as they are too be used by many programs running in different projects (i.e the server service project , server manager winform project). The Event reporter, and receiver are in a class library.
What i want is a design pattern for the event receiver class. Which houses MSMQ object initialization and events generated by receiving messages on queue asynchronously, + custom delegates/ events for reporting these messages to different programs in different projects(who subscribe to the static event in this class).
Currently i initialized the Class in the main method of service project, every thing works perfectly there. But nothing happens if i initialize the same class in winform project, which is also dumb work from me as receiving event for message queues now occurs twice in memory as there are now two objects for the class. i.e. May be message is already taken by one class from the queue.

Finally i want a solution in the same design pattern whereby all programs running in different projects are able to to subscribe to same event receiver classes housing receiving events on MSMQ's and custom events , may be static or not?

Help pleasee
i am really stuck!!!!
AnswerRe: MSMQ Receiving messages Help!!! Pin
Jimmanuel5-Jan-10 8:52
Jimmanuel5-Jan-10 8:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.