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


Top 5 Contributors of the Month
david stephan
Santhakumar Munuswamy
Asad Ali
Fauzul Azmi
Post New Web Links

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

Posted By:      Posted Date: August 21, 2010    Points: 0   Category :ASP.Net
 

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




View Complete Post


More Related Resource Links

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

  

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 ??

Thanks..

 


bfxtech.com

DIME: Sending Files, Attachments, and SOAP Messages Via Direct Internet Message Encapsulation

  

Direct Internet Message Encapsulation (DIME) is a new specification for sending and receiving SOAP messages along with additional attachments, like binary files, XML fragments, and even other SOAP messages, using standard transport protocols like HTTP. In this article, the author explains what DIME is and how it differs from MIME encapsulation. A detailed description of the message format and how it is parsed, as well as working with SOAP and extending it with WSDL, is also included.

Jeannine Hall Gailey

MSDN Magazine December 2002


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?

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

How to send an object using MSMQ and WCF service C#?

  

I'm trying to send an object in a queue:

 

PurchaseOrder po = new PurchaseOrder();
      
      po.CustomerId = "somecustomer.com";
      
      po.PONumber = Guid.NewGuid().ToString();

      PurchaseOrderLineItem lineItem1 = new PurchaseOrderLineItem();
      lineItem1.ProductId = "Blue Widget";
      lineItem1.Quantity = 54;
      lineItem1.UnitCost = 29.99F;

      PurchaseOrderLineItem lineItem2 = new PurchaseOrderLineItem();
      lineItem2.ProductId = "Red Widget";
      lineItem2.Quantity = 890;
      lineItem2.UnitCost = 45.89F;

      po.orderLineItems = new PurchaseOrderLineItem[2];
      po.orderLineItems[0] = lineItem1;
      po.orderLineItems[1] = lineItem2;


      OrderProcessorClient client = new OrderProcessorClient("OrderResponseEndpoint");


      MsmqMessage<PurchaseOrder> ordermsg = new MsmqMessage<PurchaseOrder>(po);

      ordermsg.Label = "MY MESSAGE"

Design Patterns: Simplify Distributed System Design Using the Command Pattern, MSMQ, and .NET

  

Service-oriented architecture is a great framework when you need to perform distributed computing tasks over the Internet. But when you want to perform processing inside your local network, a different solution may provide a better fit. That solution, based on the Command pattern, uses Windows services and Microsoft Message Queuing to implement a queued system that meets your needs better than a service-oriented solution. This article explains how to build it.

Brad King

MSDN Magazine September 2004


House of Web Services: Accessing Raw SOAP Messages in ASP.NET Web Services

  

Web Services exchange XML messages. Most of today's Web Service toolkits do their best to hide this fact from developers, by exposing a Web Service's behavior as method invocations against objects instead.

Tim Ewald

MSDN Magazine March 2003


HTTP Pipelines: Securely Implement Request Processing, Filtering, and Content Redirection with HTTP

  

ASP.NET is a flexible and extensible framework for server-side HTTP programming. While most people think of ASP.NET in terms of pages served, there is a lower-level infrastructure sitting beneath this page model. The underlying plumbing is based on a pipeline of app, module, and handler objects. Understanding how this pipeline works is key if you want to get the most out of ASP.NET as an HTTP server platform, while making your process more efficient, and keeping your server secure. This article introduces the architecture of the pipeline and shows how you can use it to add sophisticated functionality to an ASP.NET-based app.

Tim Ewald and Keith Brown

MSDN Magazine September 2002


Pocket PC: MSMQ for Windows CE Brings Advanced Windows Messaging to Embedded Devices

  

Handheld devices are becoming increasingly important nodes on wireless networks, allowing their users to connect to data stores and other central server applications over the network. But wireless network connections can be unreliable, requiring the use of store-and-forward messaging that does not need to maintain a continuous connection. Microsoft Message Queue (MSMQ) has supplied these features to desktop machines, and there is now a version for handheld devices. MSMQ for Windows CE allows users of embedded devices to perform tasks such as remote order processing and inventory update without worrying about the state of their connection. The benefits of MSMQ for Windows CE and how to install and run the service is covered here.

Bob Hartman

MSDN Magazine December 2001


MSMQ Remote Queueing

  
Hi All, My application is about message queuing. I have a problem checking the existence of a queue in the public/private queue in the remote server (win2003), my client is running Vista Business. I already set full control to everyone,etc in the message queueing in the server. Client is in the server's domain. Here's the code public MessageQueue(string queuePath, bool transactional)         {             try             {                 this.queuePath = queuePath;                 queue = new System.Messaging.MessageQueue(queuePath);  //UnsupportedFormatNameException in this line                 if (!(System.Messaging.MessageQueue.Exists(queue.Path)))                     System.Messaging.MessageQueue.Create(queue.Path, transactional);                               &nbs

FaultContract - can I use non soap fault messages

  
I want to use the FaultContract functionality for reporting errors but I want to completely define the message on the wire (as I do in the MessageContract) - I do NOT want the message to appear as a soap fault on the wire.  Is that possible?  I guess what I really want is for a contract to have two possible results, the normal successful result and a specialist exception result.  This is for something to go through an XML guard and a soap fault doesn't meet the IDL spec.   I'd be grateful for any pointers   Thanks

MSMQ Access Issue

  
I am trying to access a private queue through WCF from a windows service. If i make the windows service run under the context of my domain user account, WCF is able to access the queue, however if i make it run under local system/ Network Service WCF is unable to access the MSMQ. I tried giving full access to everyone and also to network service. Can anyone help? Thanks for ur time

MSMQ TCP determine sender ip

  
Hello to pros from MSMQ newbie. We are trying to use client-server scenario with MSMQ (using FormatName:Direct=TCP:[ip]/private$/queName syntax).  Right now [ip] component is hardcoded into server since we don't know the machine from which the client application sends messages.  For now we assigned a particular computer for the purpose, hardcoded its ip into server's code of a running client app and that is obviously quite a handicapped solution.  What we would like to see is to maintain a database of authorized ip addresses that the server can accept messages from, then have a server determine ip of message's sender and reply to that machine . Any suggestions?  It seems I can determine machine Guid that sent the message.  Is that possible to retreive that machine's ip in our LAN (we don't expect to carry application outside)? P.S.: Our server runs as a Windows service.

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

MSMQ TCP determine sender ip

  
Hello to pros from MSMQ newbie. We are trying to use client-server scenario with MSMQ (using FormatName:Direct=TCP:[ip]/private$/queName syntax).  Right now [ip] component is hardcoded into server since we don't know the machine from which the client application sends messages.  For now we assigned a particular computer for the purpose, hardcoded its ip into server's code of a running client app and that is obviously quite a handicapped solution.  What we would like to see is to maintain a database of authorized ip addresses that the server can accept messages from, then have a server determine ip of message's sender and reply to that machine . Any suggestions?  It seems I can determine machine Guid that sent the message.  Is that possible to retreive that machine's ip in our LAN (we don't expect to carry application outside)? P.S.: Our server runs as a Windows service. I also am unable to add reference to Microsoft Message Queue com in add reference dialog, beacuse it's not there.
Categories: 
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