Creating HTTP Listeners in my Application

leedo2k

Active member
Joined
Nov 9, 2006
Messages
28
Programming Experience
Beginner
Hello,



I intend to write a .NET application that does logging and analytics to data using VS 2010. I want to link my application with an external non .NET application via intranet. This external application provides integration through URL triggers. When an event occurs it can send this event parameters to any application via HTTP/HTTPS POST or GET requests. It allows me to select the event parameters to be included in the HTTP request that will be sent as URL parameters. URL parameters consist of a name and a value, and are separated from the URL with a question mark (?).

So an example request can look like this:

http://www.domain.com/DeviceName?Event_Attr=<some-attribute>&Event_ID=<23333> => where any dynamic elements in the URL are displayed in brackets (<>), and are replaced by the corresponding event used at run time.



Now what design method should I follow to create a component in my application to listen to the URL request and parse it's elements. Knowing that I want to protect my URL listener with a username and password.



I appreciate your help.



Thanks
 
HttpListener Class (System.Net)
Query is already parsed and available as key-value pairs from the contexts Request.QueryString.
WebClient or HttpWebRequest classes can be used to create test requests.
 
Back
Top