Im not really familar with the MSMQ event sink in the logging block but...
It looks like the underlying .NET Framework
System.Messaging.MessageQueue.Exists() method is throwing.
I'd check the constructor of the MSMQ event sink and confirm that its
passing into MessageQueue.Exists() the exact string that you specifiy in
the parameter (i.e. not altering it - probably not).
Id then confirm that in your console app, (same machine, same user), that
it can call
MessageQueue.Exists("FormatName:DIRECT=OS:W03-Gehr2\Private$\EIFEventQueue")
successfully.
From the type of exception it appears that its not the syntax of the path
that's the problem (i.e. an ArgumentException wasnt thrown and the docs say
that this is thrown when the path syntax is invalid)
As a side note, an article at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/ht
ml/interactmessaque.asp talks about the FormatName syntax (see the "Format
Name Reference" section).
If it runs on you console app and not in the client app (and both pass the
exact same string into MessageQueue.Exists()), then it must be a
permissions issue. Is the client app, a Web Application runnning under the
low privilege user account named "ASPNET"?
If you can get it to work, I'd email the Logging Block people directly. In
a previous thread they said:
For any feedback to this please send to devfdbck@microsoft.com. We
(patterns & practices [1] )developed these extensions to EIF and would like
to here any feedback or help in anyways we can.
The title of the thread was "Please read for info on Logging Application
Block (Extensions to EIF)" from Scott Densmore (scottden@microsoft.com).
Perhaps you could post their reply?
Maybe you might like to suggest that they check this newsgroup and reply to
the logging block questions directly?
Sorry I couldnt be of more help
Mike
--------------------
| Hello,
|
| Im using the MSMQ Sink from the Logging Block and want to sink into a
| private queue at the client and forward this message to a queue on the
| Server (which persists this message in the db).
| But the msmq eventsink doesnt understand my parameter (in
| EnterpriseInstrumentation.config -> Msmq event Sink Config):
|
| <parameter name="queuePath"
| value="FormatName:DIRECT=OS:W03-Gehr2\Private$\EIFEventQueue" />
|
| In eventviewer i see this error:
|
| System.InvalidOperationException: Cannot determine whether a queue with
the
| specified format name exists.
| at System.Messaging.MessageQueue.Exists(String path)
| at
|
Microsoft.ApplicationBlocks.Logging.EventSinks.MsmqEventSink.WriteToLog(Obje
| ct[] list)
| at
|
Microsoft.ApplicationBlocks.Logging.EventSinks.BaseSink.WriteToLogWithRetry(
| BaseSink sink, Int32 numberOfRetries, Object[] itemList)
| at
Microsoft.ApplicationBlocks.Logging.EventSinks.MsmqEventSink.Write(Object
| eventToRaise)
| at Microsoft.EnterpriseInstrumentation.EventSource.RaiseEvent(Object
| eventToRaise, RequestContext requestContext)
|
| It seems the MessageQueue.Exist is called the wrong way...
| It is necessary to modify the msmq event sink code to support format name
| queue paths ?
|
| greets
| Bernd
|
| ps. i tried this in a simple console app. No problem. the message ist
| forwarded to the dest server. I disconnected the network - the message
| appeared in outgoing queues. After reconnect the message was autom. send
to
| the dest.
|
|
|
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm