[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework

Create msmq queue with wcf configuration?

Carl

11/5/2008 9:42:00 AM

Hi,

Is it possible to configure wcf to automatically create the msmq queue, when
using declarative configuration?

When I start my app, if the queue does not exist the application exits. This
happens even before any own code is executed, so it does not help that I
have

if (!MessageQueue.Exists(queueName))
MessageQueue.Create(queueName, true);

That code is never reached.

regards

Carl

3 Answers

Carl

11/5/2008 10:00:00 AM

0

Please disregard from my previous message. I did have an old host.Open()
statement that I forgot about, that caused the problem.

regards

Carl


"Carl" <ask@4it.com> wrote in message
news:C1B0BA44-C6FC-4D81-949B-A0A14EF64FE5@microsoft.com...
> Hi,
>
> Is it possible to configure wcf to automatically create the msmq queue,
> when using declarative configuration?
>
> When I start my app, if the queue does not exist the application exits.
> This happens even before any own code is executed, so it does not help
> that I have
>
> if (!MessageQueue.Exists(queueName))
> MessageQueue.Create(queueName, true);
>
> That code is never reached.
>
> regards
>
> Carl
>

sloan

11/5/2008 12:18:00 PM

0

Be careful with this method. Queue's usually need specific permissions.
If you're an "admin" on your machine, then deploy this code .... you'll
probably run into security issues when you deploy.


To go "Manage Computer", find the Queue and look at the Security Tab.

The best tip I can give you is to actually put your queue on a remote
machine.
You'll learn what you can and can't do and what permissions you need much
more clearly then having a local queue.




"Carl" <ask@4it.com> wrote in message
news:C1B0BA44-C6FC-4D81-949B-A0A14EF64FE5@microsoft.com...
> Hi,
>
> Is it possible to configure wcf to automatically create the msmq queue,
> when using declarative configuration?
>
> When I start my app, if the queue does not exist the application exits.
> This happens even before any own code is executed, so it does not help
> that I have
>
> if (!MessageQueue.Exists(queueName))
> MessageQueue.Create(queueName, true);
>
> That code is never reached.
>
> regards
>
> Carl
>


Carl

11/6/2008 11:52:00 AM

0

Thanks, that's a good advice to avoid deployment problems and such!


"sloan" <sloan@ipass.net> wrote in message
news:%233RJCC0PJHA.4776@TK2MSFTNGP05.phx.gbl...
> Be careful with this method. Queue's usually need specific permissions.
> If you're an "admin" on your machine, then deploy this code .... you'll
> probably run into security issues when you deploy.
>
>
> To go "Manage Computer", find the Queue and look at the Security Tab.
>
> The best tip I can give you is to actually put your queue on a remote
> machine.
> You'll learn what you can and can't do and what permissions you need much
> more clearly then having a local queue.
>
>
>
>
> "Carl" <ask@4it.com> wrote in message
> news:C1B0BA44-C6FC-4D81-949B-A0A14EF64FE5@microsoft.com...
>> Hi,
>>
>> Is it possible to configure wcf to automatically create the msmq queue,
>> when using declarative configuration?
>>
>> When I start my app, if the queue does not exist the application exits.
>> This happens even before any own code is executed, so it does not help
>> that I have
>>
>> if (!MessageQueue.Exists(queueName))
>> MessageQueue.Create(queueName, true);
>>
>> That code is never reached.
>>
>> regards
>>
>> Carl
>>
>
>