header image

Url Rewriting using WCF

Posted by: | December 22, 2008 | No Comment |

One of my interesting thing is “URL Rewriting”. The first time I have implemented it through implementing HTTPHandler using .NET 1.1. Same concept I have applied to a Document Management Service [DMS] project to PUT the document and GET the document by an .ASMX WebService. There I added verb * using wild charater in IIS 6.0 as well as added  <httpHandler> node in web.config. Then we got in different way in .NET 2.0. Finally this time we got using URITemplate, WebGet, WebInvoke in WCF 3.5 SP1.


The UriTemplate class provides methods for working with sets of URIs that share a common structure for URL Rewriting.
As this follows based on the URL pattern comprises left portion of URI which is fixed and rest is dynamic where certain parameter is getting manipulated or changed to request a page. System.UriTemplate provides runtime support for URI template syntax.
UriTemplate is to manipulate parameters using ByName and ByPosition.
[WebGet] – supports HTTP GET method
WebOperationContext provides easy access to Web specifics (e.g., headers, status codes)
[WebInvoke] supports other HTTP methods; POST is default method


http://blogs.msdn.com/endpoint/archive/2008/08/22/rest-in-wcf-part-ix-controlling-the-uri.aspx


http://weblogs.asp.net/jgalloway/archive/2007/05/02/mix07-wcf-adding-system-uritemplate-webget-and-webinvoke.aspx


Corresponding to previous version’s URL concept the available resources are in


http://msdn.microsoft.com/en-us/library/ms972974.aspx


http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx


http://www.simple-talk.com/dotnet/asp.net/a-complete-url-rewriting-solution-for-asp.net-2.0/


 

under: 9532, 9533, 9534, 9535, 9536