.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Newbie Can a HTTP client recieve MSMQ messages from a queue?

Posted By:      Posted Date: September 24, 2010    Points: 0   Category :WCF

Can a HTTP client recieve MSMQ messages from a queue?

Thats the question. I see examples on sending messages via HTTP but how do I get messages via HTTP from a queue.

If it supports getting messages via HTTP is it a normal get HTTP request that would be blocked by a firewall or ??




View Complete Post

More Related Resource Links

MSMQ and .NET: Send MSMQ Messages Securely Across the Internet with HTTP and SOAP


When creating a distributed system you frequently need to provide for communication between two entities that are not in sync. Microsoft Message Queue Server (MSMQ) provides the kind of store-and-forward messaging in a pre-built infrastructure that can help you address these kinds of messaging needs. In the past, MSMQ was accessed using a COM wrapper. Now there's a .NET wrapper that lets you accomplish your messaging goals easily from your Framework-based code. To illustrate the use of the wrapper, the author builds a messaging application, sends MSMQ messages over the Web, and discusses messaging security.

David S. Platt

MSDN Magazine December 2003

Secure messages via MSMQ queue when using local system and local user accounts


I am trying to send a message to a WCF service via a private MSMQ queue.  With security turned off, there's no problem.  With security turned on and using a normal user account (one registered with the Active Directory) to send messages, there's no problem.  However, if I use either the local system account or a local user account, it fails.

If I use a local user account it fails with the message:

Unhandled Exception: System.ServiceModel.MsmqException: An error occurred while sending to the queue: Unrecognized error -1072824272 (0xc00e0030).Ensure that MSMQ is installed and running. If you are sending to a local queue, ensure the queue exists with the required access mode and authorization.

If I use the local system account, no exception is thrown, but nothing is delivered to the service, and the queue remains empty.

Both "Everyone" and SYSTEM have permissions to "Get Properties", "Get Permissions" and "Send Message" as regards the private queue.

I am thinking there must be an issue with the queue failing to authenticate the users in the Active Directory, but given it's a private queue, I didn't think it would do that?

I seem to be having the same problems as a previous

WinInet: Enable HTTP Communication in Windows-Based Client Applications


The Internet provides the infrastructure for applications to communicate, and that can include non-UI communication between Win32-based applications. If you think beyond the standard browser usage of HTTP, you can use this protocol to retrieve information from Win32-based applications and save it to a Web server. After explaining how HTTP can be used in this way, this article shows how to use Microsoft SQL Server, ASP, IIS, WinInet, and Visual Basic to implement two examples. The first reports usage data-how often an application is used and by whom. The second monitors application errors and reports error details for use by helpdesk staff or engineers in the debugging process.

Todd Meister

MSDN Magazine June 2001

How to bind a WCF Http client to a specific outbound IPAddress before making the request

I want my request to go out through a specific IP Addresses. Is there a way to do that in WCF. The explanation of why I need this is a little long winded so i'd rather not get into that. Here is sample code string ipAddress = ""; IService service; ChannelFactory<IOmlService> factory = new ChannelFactory<IService>(new BasicHttpBinding(), new EndpointAddress("http://" + IPAddress + ":6996/IService")); service = factory.CreateChannel(); service.Test(); Here is an example scenario to explain exactly what i'm looking for. Let's say I have two IPs on my machine ( and Both of them can hit If i run this code now, it will hit the IP (.32) from any of my IPs (.30 or .31). How can i force it to go through a specific IP of mine (say .30). Is there any way to do that using WCF? Thanks

MSMQ - Queue Validation

Hi Folks, does anyone know a way of checking that the creation of a private message queue (or attaching to an already existsing message queue) has actually worked? In my program, I create an instance of the MessageQueue class tied to an existing queue by calling the MessageQueue constructor with a 'Format Name' string I've constructed. The string includes the queue name which I extract from a config file. This all works well as long as the queue name is correct. If, however, the referenced queue does not exist then I was expecting the constructor to throw an exception. Unfortunately, it doesn't do this. So, I've tried accessing some of the members of the MessageQueue class after the constructor has executed. In some circumstances accessing MessageQueue.FormatName caused an exception but in other circumstances it didn't. Is there any definitive, fool-proof way of determining an instance of a MessageQueue class is connected to a valid queue? Many thanks, RobDev

The HTTP request is unauthorized with client authentication scheme 'Anonymous'

I am trying to do a soap request from a WebCTRL server. I went to add a service reference, entered the URL to my wsdl and (after prompting me for a username and password) it added the reference and I can create an instance of the service object and makes calls against it.   Dim eval As New WebCTRL_Eval.EvalClient eval.Open() Debug.Print(eval.getValue("#reception_40/lstat"))   I get this back from the server, on open and getvalue.   The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Basic realm="SOAP Access"'.   I understand that it is the HTTP authentication that I need to setup or configure, but just dont understand how to do it.   I have tried eval.ClientCredentials.UserName.UserName = "myusername" eval.ClientCredentials.UserName.Password = "mypassword"   How do I change the client authentication scheme and provide my credentials to it?   Here is what is on my app.config file.   <system.serviceModel>  <bindings>   <wsHttpBinding>    <binding name="EvalSoapBinding"     bypassProxyOnLocal="false"     transactionFlow="false"     hostNameComparisonMode="StrongWildcard"     maxBufferPoolSize="524288"     maxReceivedMessageSize="65536"     messageEncoding="Text"

MS Message Queueing (MSMQ) 4.0 - Slow HTTP delivery

I've sent 1000 messages with a simple 20 character string as the body using DIRECT:FORMAT=HTTP://mydomain.com/msmq/private$/myqueue   The outbound queue currently sends batches of about 20-30 messages then pauses for 5 minutes before sending another 20-30.   The outbound message queue is on ADSL and the receiving queue is on a 100Mb internet connection in co-location.   Has anyone else encountered such slow send speeds? Any clues or hints on how to speed this up?

WCF Client Behind ISA: HTTP Error 407


I am moving this thread to WCF from .NET Networking and Communication


We have to connect to a 3rd party XML Web Service outside our LAN by adding a WCF Service Reference to a simple console application


When attempting to invoke any of the generated client class methods, we recieve the following error: "The remote server returned an unexpected response: (407) Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy service is denied.  )."

In old style ASMX Web Reference:

TheServiceWse client = new TheServiceWse();

client.Proxy = new System.Net.WebProxy("ISA Server Name", 800);


HTTP, .NET 4 and the Client Profile


We're about to release our new WPF application that's based on the .NET 4 framework. I'm trying to see if we can use the client profile rather than the full framework since installing the latter has turned out to take a loooong time (>15-20 minutes post-download) on our users' computers.

With that said, I've determined that our WPF application has two dependencies that don't exist in the client profile:

  • JavaScriptSerializer
  • HttpUtility (specifically the UrlEncode() method)
Are there any alternatives to these classes in the client profile that I could use instead?

The HTTP request was forbidden with client authentication scheme 'Anonymous'

I am trying to build a proof of concept of a WCF service utilisting a
wsHttpBinding with Transport Certificate security. I am having problems
connecting to it with a console client - everytime I try to open the channel
I get the following error: The HTTP request was forbidden with client authentication scheme 'Anonymous'.

can any one help me?
Thanks a lot
Frank Xu Lei--????,????
Focus on Distributed Applications Development and EAI based on .NET
?????????????:Welcome to My Chinese Technical Blog
??????WCF??????:Welcome to Microsoft Chinese WCF Forum
??????WCF??????:Welcome to Microsoft English WCF Forum

Newbie MSMQ and the REST API


Where to start.. Currently we use AcitveMQ to produce and consume messages via REST over port 80. We use Port 80 to eliminate issues with our clients firewalls. I was wondering if MSMQ can be setup the same way. Using only port 80 to communicate through and if it uses REST. If it does use REST is there a listing of the API that is supported during a post and get.




The HTTP request is unauthorized with client authentication scheme 'Anonymous'.




I am receiving an error when i am callign the WCF service which is hosted in the IIS,


The HTTP request is unauthorized with client authentication scheme 'Anonymous'.The authentication header received from the server was 'Negotiate,NTLM' while calling service hosted in IIS.


Both check boxes are checkd in the properties->DirectorySecurity->Edit...

Anonymus and Integrated Windows.


Can anybody help me regarding thsi issue...






net.tcp service does not recieve messages using WCF4 routing service multicast scenario


I am trying out the WCF 4.0 multicast scenario. i have two services exposed

Service A- using NetTcpBinding,

Service B-using basichttpbinding.

A WCF 4 Routing service is used to multicast messages to both the services.

When i send a message, only the service with basichttp binding recieves it. the other does not.

I modified service A to use basichttpbinding and it started recieving messages from multicast router.

Am I missing here something that nettcp service is not recieving messages from multicasting routing service.


The HTTP request is unauthorized with client authentication scheme 'Anonymous' The authentication


Hi all,

The scenario is as follows.

I need to connect to a webservice hosten in a JBOSS server.

The server provides a certificate, besides it requires username and password to validate against an LDAP.

My part is to develop a client in .NET WCF that uses the constraints defined above.

Here is my client code:


service.ServiceModificarDomicilioContactoPersonasClient servicioJboss = new service.ServiceModificarDomicilioContactoPersonasClient();

service.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation;

service.ClientCredentials.UserName.Password = "******";
service.ClientCredentials.UserName.UserName = "******";

service.ClientCredentials.Windows.ClientCredential.UserName = "********";
service.ClientCredentials.Windows.ClientCredential.Password = "********";

service.modificarDomicilioResponse resp = new service.modificarDomicilioResponse();
service.modificarDomicilio metodo = new service.modificarDomicilio();
metodo.arg0 = 1;

metodo.arg1 = 1402251;

metodo.arg2 = 506907;

metodo.arg3 = 1;

metodo.arg4 = 999999;

TCP Client - messages going lost


Hello everybody,

i have a problem with my tcpclient. My send receive messages going lost every second send for sending, and every sencond receive for receiving. Here the code:

  public class OUCClient
    TcpClient m_client;
    bool conntected = false;
    byte[] bytes = new byte[4] { 1, 2, 3, 4 };

    public byte[] InBuffer;
    private byte[] OutBuffer;
    private int bufferSize;

    public event EventHandler DataReceived;

    public OUCClient(int bufferSize)
      this.bufferSize = bufferSize;
      // Data received from PLC
      this.InBuffer = new byte[

HTTP Client to Client Audio


I am just looking for a little push towards the right direction. I was able to make an audio stream from client to client using WCF in both http and net.tcp however a new question comes up to how would I approach this over a WAN? for an example I have the application on my computer and my friend in another state has the same application we type addresses in and connect and talk away. Is this possible to do without a server and without configuration (besides typing the other persons IPAddress)? How does AIM or live messenger approach this? Do they simply use a server as a passthrough using duplex?


MSMQ Recieve Activty fails in workflow hosted in Windows Service



I am trying to implement a windows service hosted workflow service that polls from a message queue. The message queue is is populated by a separate windows service.

I followed the post below for my hosted workflow as it looked to be close to what I was trying to do.


Following the steps in the post I was able to get my service to work when the message body was a simple string and using the WCFTestClient.

I then changed the code to use a a custom .NET object as the Recieve parameter instead of the string. The class library in which the object is defined was added as a reference. The service that populates my queue uses the custom .NET object as the message body.

In this scenario, the service would run but only process a message from the queue if it was in the queue before the service started. Any new messages added are ignored and if I add the message after I start the queue it also does not get picked up.

My xamlx is below, followed by my app.config:


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend