I think what you want to do can be easily achieved by WCF REST service. By using the web HTTP programming model of WCF, you can build a REST style service which expose some operations that can be called via standard HTTP GET/POST requests.
For your case, you can just define a WCF REST service which expose some HTTP GET based operations. And you can pass any necessary input parameters via URL querystring. for example, to call a REST service operaiton for send an alert, you can just open web
browser and type the following style URL:
and you can just embed a hyperlink in your email message which point to the above style service operation URL. Whenever user click the link and the service operation is called.
Here are some reference about WCF REST service programming:
BTW, when calling REST service operation via HTTP GET in web browser, it is just the same like what we do to view a web page in web browser(by typing its page url). And if the code logic is not very complex, I even think it is more convenient to build an
ASP.NET httpHandle to do the work (which can also be directly invoked by a hyperlink in email ).
ESD
Member
11 Points
42 Posts
SOAP message via email (outlook)?
Apr 23, 2012 03:11 PM|LINK
Is it possible the send a message to a webservice via a link in an email message?
I want to provide a way for user to set a status by simply clicking a link.
I know I can add a hyper-link to a web-page which can then do the work, but this requires the site to open a page which I then force to close.
Any help greatly welcome!
Cheers…
Steven Cheng...
Contributor
4199 Points
548 Posts
Microsoft
Moderator
Re: SOAP message via email (outlook)?
Apr 24, 2012 06:48 AM|LINK
Hi ESD,
I think what you want to do can be easily achieved by WCF REST service. By using the web HTTP programming model of WCF, you can build a REST style service which expose some operations that can be called via standard HTTP GET/POST requests.
For your case, you can just define a WCF REST service which expose some HTTP GET based operations. And you can pass any necessary input parameters via URL querystring. for example, to call a REST service operaiton for send an alert, you can just open web browser and type the following style URL:
http://servername/servicename.svc/SendAlert?msg='some text data'
and you can just embed a hyperlink in your email message which point to the above style service operation URL. Whenever user click the link and the service operation is called.
Here are some reference about WCF REST service programming:
#An Introduction To RESTful Services With WCF
http://msdn.microsoft.com/en-us/magazine/dd315413.aspx
#WCF Web HTTP Programming Model Overview
http://msdn.microsoft.com/en-us/library/bb412172.aspx
#WCF REST Service Template 40(CS) h
ttp://visualstudiogallery.msdn.microsoft.com/fbc7e5c1-a0d2-41bd-9d7b-e54c845394cd
#UriTemplate and UriTemplateTable
http://msdn.microsoft.com/en-us/library/bb675245.aspx
BTW, when calling REST service operation via HTTP GET in web browser, it is just the same like what we do to view a web page in web browser(by typing its page url). And if the code logic is not very complex, I even think it is more convenient to build an ASP.NET httpHandle to do the work (which can also be directly invoked by a hyperlink in email ).
Feedback to us
Microsoft One Code Framework
ESD
Member
11 Points
42 Posts
Re: SOAP message via email (outlook)?
May 03, 2012 03:20 PM|LINK
thanks much for the kind and useful reply!