<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Omar AL Zabir blog on ASP.NET Ajax and .NET 3.5 : MVC</title><link>http://msmvps.com/blogs/omar/archive/tags/MVC/default.aspx</link><description>Tags: MVC</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>Create ASP.NET MVC Controllers under Namespace and specific URL</title><link>http://msmvps.com/blogs/omar/archive/2008/10/04/create-asp-net-mvc-controllers-under-namespace-and-specific-url.aspx</link><pubDate>Sat, 04 Oct 2008 08:06:21 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1649692</guid><dc:creator>omar</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/omar/rsscomments.aspx?PostID=1649692</wfw:commentRss><comments>http://msmvps.com/blogs/omar/archive/2008/10/04/create-asp-net-mvc-controllers-under-namespace-and-specific-url.aspx#comments</comments><description>&lt;p&gt;When you have a lot of controllers, you need to organize them under Namespaces. Also, it is better to put controllers under subfolders in order to organize them properly and have some meaningful URL for them like &lt;u&gt;/Admin/User&lt;/u&gt; where &lt;u&gt;Admin&lt;/u&gt; is the subfolder and &lt;u&gt;User&lt;/u&gt; is the controller. For example, you might have a lot of controllers that are APIs exposed by your web app, not regular pages. So, you might want to put them under &lt;u&gt;/API/&lt;/u&gt; folder. You also want to make sure no one can access those controllers from the root url. For example, no one must call &lt;u&gt;/User/GetUserList&lt;/u&gt; instead they must call &lt;u&gt;/API/User/GetUserList&lt;/u&gt;&lt;/p&gt; &lt;p&gt;ASP.NET MVC default routing and Controller Factory is very greedy, it ignores the subfolders inside the &amp;quot;Controllers&amp;quot; folder. There&amp;#39;s a &lt;u&gt;DefaultControllerFactory&lt;/u&gt; class in ASP.NET MVC which traverses all controllers under the &amp;quot;Controller&amp;quot; folder and creates a cache using just the class name as the key. So, it ignores any namespace or any subfolder where you have put the controller. So, I created a derivative of the default controller factory and created a new factory that checks if the requested controller belongs to any specific namespace and whether that controller must be inside a specific subfolder. You can map &lt;u&gt;/Admin&lt;/u&gt; folder to respond to all controllers that are under then &lt;u&gt;YourWebApp.Admin&lt;/u&gt; namespace. Similarly, you can map &lt;u&gt;/API&lt;/u&gt; folder to respond to all controllers that are under the &lt;u&gt;YourWebApp.API&lt;/u&gt; namespace. None of these controllers can be accessed outside the specified URL. Here&amp;#39;s the factory that does it:&lt;/p&gt; &lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/omar.Cre.NETMVCControllersunderNamespaceandsp_5F00_C141/image_5F00_2.png"&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="410" alt="ProtectedNamespaceController Factory that replaces DefaultControllerFactory" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/omar.Cre.NETMVCControllersunderNamespaceandsp_5F00_C141/image_5F00_thumb.png" width="724" border="0" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;This controller checks the namespace of the controller being returned by ASP.NET MVC&amp;#39;s default implementation and ensures the requested URL is the right url where controllers from the namespace can be accessed. So, this means if the controller matches &lt;u&gt;MvcWebAPI.API.UserController&lt;/u&gt;, it ensures the URL being requested must be &lt;u&gt;/MvcWebAPI/API/User&lt;/u&gt;. It will return null if the URL was something else like &lt;u&gt;/MvcWebAPI/User&lt;/u&gt; or &lt;u&gt;/MvcWebAPI/SomeotherFolder/User&lt;/u&gt;.&lt;/p&gt; &lt;p&gt;Here&amp;#39;s how you use it form &lt;u&gt;Global.asax&lt;/u&gt;:&lt;/p&gt; &lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/omar.Cre.NETMVCControllersunderNamespaceandsp_5F00_C141/image_5F00_6.png"&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="241" alt="Using ProtectedNamespaceControllerFactory from Global.asax" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/omar.Cre.NETMVCControllersunderNamespaceandsp_5F00_C141/image_5F00_thumb_5F00_2.png" width="556" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;You create a mapping for a Namespace and the subfolder it must belong to. Then you register the new Controller Factory as the default controller factory.&lt;/p&gt; &lt;p&gt;Now the second catch is, the default Route for the &lt;u&gt;{controller}/{action}/{id}&lt;/u&gt; won&amp;#39;t work for you. You need to create a specific router that starts with the subfolder name. For example, &lt;u&gt;API/{controller}/{action}&lt;/u&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/omar.Cre.NETMVCControllersunderNamespaceandsp_5F00_C141/image_5F00_10.png"&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="111" alt="Creating a new route for the Controllers under the /API folder" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/omar.Cre.NETMVCControllersunderNamespaceandsp_5F00_C141/image_5F00_thumb_5F00_4.png" width="513" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;Here&amp;#39; two things to notice:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;The use of &lt;u&gt;PathStartWith&lt;/u&gt; routing constraint, which I will explain soon  &lt;li&gt;The last parameter which tells the route to include the API namespace for this route. Otherwise it can&amp;#39;t find the controllers in the API namespace&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;So, the &lt;u&gt;PathStartsWith&lt;/u&gt; routing constraint ensures this route gets hit only when the requested URL is under the &lt;u&gt;/API/&lt;/u&gt; folder. For any other URL, it returns false and thus the routing handler skips this route.&lt;/p&gt; &lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/omar.Cre.NETMVCControllersunderNamespaceandsp_5F00_C141/image_5F00_12.png"&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="239" alt="image" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/omar.Cre.NETMVCControllersunderNamespaceandsp_5F00_C141/image_5F00_thumb_5F00_5.png" width="761" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;It just does a comparison on the &lt;u&gt;AbsolutePath&lt;/u&gt; of the current request URL to ensure the URL starts with the specified match. &lt;/p&gt; &lt;p&gt;Similarly, we need to tell the Default route to ignore all paths with &lt;u&gt;/API&lt;/u&gt;. Here&amp;#39;s how to do it:&lt;/p&gt; &lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/omar.Cre.NETMVCControllersunderNamespaceandsp_5F00_C141/image_5F00_14.png"&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="110" alt="image" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/omar.Cre.NETMVCControllersunderNamespaceandsp_5F00_C141/image_5F00_thumb_5F00_6.png" width="540" border="0" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;That&amp;#39;s it. Enjoy the full code from:&lt;/p&gt; &lt;p&gt;&lt;a title="http://code.msdn.microsoft.com/MvcWebAPI" href="http://code.msdn.microsoft.com/MvcWebAPI"&gt;http://code.msdn.microsoft.com/MvcWebAPI&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Read my previous post on creating Web API using ASP.NET MVC that can consume and expose Json and Xml:&lt;/p&gt; &lt;p&gt;&lt;a title="http://msmvps.com/blogs/omar/archive/2008/10/03/create-rest-api-using-asp-net-mvc-that-speaks-both-json-and-plain-xml.aspx" href="http://msmvps.com/blogs/omar/archive/2008/10/03/create-rest-api-using-asp-net-mvc-that-speaks-both-json-and-plain-xml.aspx"&gt;Create REST API using ASP.NET MVC that speaks both Json and plain Xml&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Note: incase you already read it, I have published new code that you should download.&lt;/p&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fmsmvps.com%2fblogs%2fomar%2fdefault.aspx"&gt;&lt;img alt="kick it on DotNetKicks.com" src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fmsmvps.com%2fblogs%2fomar%2fdefault.aspx" border="0" /&gt;&lt;/a&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1649692" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/omar/archive/tags/asp.net/default.aspx">asp.net</category><category domain="http://msmvps.com/blogs/omar/archive/tags/MVC/default.aspx">MVC</category></item><item><title>Create REST API using ASP.NET MVC that speaks both Json and plain Xml</title><link>http://msmvps.com/blogs/omar/archive/2008/10/03/create-rest-api-using-asp-net-mvc-that-speaks-both-json-and-plain-xml.aspx</link><pubDate>Fri, 03 Oct 2008 16:05:51 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1649607</guid><dc:creator>omar</dc:creator><slash:comments>19</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/omar/rsscomments.aspx?PostID=1649607</wfw:commentRss><comments>http://msmvps.com/blogs/omar/archive/2008/10/03/create-rest-api-using-asp-net-mvc-that-speaks-both-json-and-plain-xml.aspx#comments</comments><description>&lt;p&gt;ASP.NET MVC Controllers can directly return objects and collections, without rendering a view, which makes it quite appealing for creating REST like API. The nice extensionless Url provided by MVC makes it handy to build REST services, which means you can create APIs with smart Url like &amp;quot;something.com/API/User/GetUserList&amp;quot;&lt;/p&gt; &lt;p&gt;There are some challenges to solve in order to expose REST API:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Based on who is calling your API, you need to be able to speak both Json and plain old Xml (POX). If the call comes from an AJAX front-end, you need to return objects serialized as Json. If it&amp;#39;s coming from some other client, say a PHP website, you need to return plain Xml.  &lt;li&gt;Similarly you need to be able to understand REST, Json and plain Xml calls. Someone can hit you using REST url, someone can post a Json payload or someone can post Xml payload.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;I have created an &lt;u&gt;ObjectResult&lt;/u&gt; class which takes an object and generates Xml or Json output automatically looking at the &lt;u&gt;Content-Type&lt;/u&gt; header of &lt;u&gt;HttpRequest&lt;/u&gt;. AJAX calls send &lt;u&gt;Content-Type=application/json&lt;/u&gt;. So, it generates Json as response in that case, but when Content-Type is something else, it does simple Xml Serialzation. &lt;/p&gt; &lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/omar.CreateJSONandXMLWebAPIusingASP.NETMVC_5F00_F635/image_5F00_2.png"&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="471" alt="image" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/omar.CreateJSONandXMLWebAPIusingASP.NETMVC_5F00_F635/image_5F00_thumb.png" width="670" border="0" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Here&amp;#39;s the &lt;u&gt;ObjectResult&lt;/u&gt; that you can use from Controllers to return objects and it takes care of proper serialization method. Above shows the Json serialization, which is quite simple. &lt;u&gt;XmlSerialization&lt;/u&gt; is a bit complex though:&lt;/p&gt; &lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/omar.CreateJSONandXMLWebAPIusingASP.NETMVC_5F00_F635/image_5F00_4.png"&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="409" alt="image" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/omar.CreateJSONandXMLWebAPIusingASP.NETMVC_5F00_F635/image_5F00_thumb_5F00_1.png" width="592" border="0" /&gt;&lt;/a&gt; Things to note here:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;You have to force UTF8 encoding. Otherwise it produces UTF16 output.  &lt;li&gt;XML Declaration is skipped because that&amp;#39;s not quite necessary. Wastes bandwidth. If you need it, turn it on.  &lt;li&gt;I have turned on indenting for better readability. You can turn it off to save bandwidth.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Some of you might be boiling inside looking at my obscure coding style. I love this style! I am spoiled by jQuery. I wish there was a cQuery. I actually started writing one, but it never saw day light just like my hundred other open source attempts.&lt;/p&gt; &lt;p&gt;Now back to Object Serialization, we got the serialization done. Now you can return objects from Controller easily:&lt;/p&gt; &lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/omar.CreateJSONandXMLWebAPIusingASP.NETMVC_5F00_F635/image_5F00_6.png"&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="481" alt="image" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/omar.CreateJSONandXMLWebAPIusingASP.NETMVC_5F00_F635/image_5F00_thumb_5F00_2.png" width="537" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;You can use the test web project to call these methods and see the result:&lt;/p&gt; &lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/omar.CreateJSONandXMLWebAPIusingASP.NETMVC_5F00_F635/image_5F00_8.png"&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="472" alt="image" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/omar.CreateJSONandXMLWebAPIusingASP.NETMVC_5F00_F635/image_5F00_thumb_5F00_3.png" width="531" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;So far you have seen simple object and list serialization. A best practice is to return a common result object that has some status, message and then the real payload. It&amp;#39;s handy when you only need to return some error but no object or list. I use a common Result object that has three properties - &lt;u&gt;ErrorCode&lt;/u&gt; (0 by default means success), &lt;u&gt;Message&lt;/u&gt; (a string data type) and &lt;u&gt;Data&lt;/u&gt; which is the real object.&lt;/p&gt; &lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/omar.CreateJSONandXMLWebAPIusingASP.NETMVC_5F00_F635/image_5F00_10.png"&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="239" alt="image" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/omar.CreateJSONandXMLWebAPIusingASP.NETMVC_5F00_F635/image_5F00_thumb_5F00_4.png" width="463" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;When you want to return only a result with error message, you can do this:&lt;/p&gt; &lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/omar.CreateJSONandXMLWebAPIusingASP.NETMVC_5F00_F635/image_5F00_12.png"&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="86" alt="image" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/omar.CreateJSONandXMLWebAPIusingASP.NETMVC_5F00_F635/image_5F00_thumb_5F00_5.png" width="585" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;This produces a result like this:&lt;/p&gt; &lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/omar.CreateJSONandXMLWebAPIusingASP.NETMVC_5F00_F635/image_5F00_14.png"&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="97" alt="image" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/omar.CreateJSONandXMLWebAPIusingASP.NETMVC_5F00_F635/image_5F00_thumb_5F00_6.png" width="445" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;No payload here. So, the return format is always consistent. Those who are consuming service can write a common Xml or Json parsing code to consume both success and failure response. Those who are building API for their website, I humbly request you to return consistent response for both success and failure. It makes our life so easier. &lt;/p&gt; &lt;p&gt;So, far we have only returned objects and lists. Now we need to accept Json and Xml payload, delivered via HTTP POST. Sometimes your client might want to upload a collection of objects in one shot for batch processing. So, they can upload objects using either Json or Xml format. There&amp;#39;s no native support in ASP.NET MVC to automatically parse posted Json or Xml and automatically map to Action parameters. So, I wrote a filter that does it.&lt;/p&gt; &lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/omar.CreateJSONandXMLWebAPIusingASP.NETMVC_5F00_F635/image_5F00_18.png"&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="491" alt="image" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/omar.CreateJSONandXMLWebAPIusingASP.NETMVC_5F00_F635/image_5F00_thumb_5F00_8.png" width="578" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;This filter intercepts calls going to Action methods and checks whether client has posted Xml or Json. Based on what has been posted, it uses &lt;u&gt;DataContractJsonSerializer&lt;/u&gt; or simple &lt;u&gt;XmlSerializer&lt;/u&gt; to convert the payload to objects or collections.&lt;/p&gt; &lt;p&gt;You use this attribute on Action methods like this:&lt;/p&gt; &lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/omar.CreateJSONandXMLWebAPIusingASP.NETMVC_5F00_F635/image_5F00_20.png"&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="98" alt="image" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/omar.CreateJSONandXMLWebAPIusingASP.NETMVC_5F00_F635/image_5F00_thumb_5F00_9.png" width="385" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;The attribute expects a parameter name where it stores the deserialized object/collection. It also expects a root type that it needs to pass to the deserializer. If you are expecting a single object, specify &lt;u&gt;typeof(SingeObject)&lt;/u&gt;. If you are expecting a list of objects, specify an array of that object like &lt;u&gt;typeof(SingleObject[])&lt;/u&gt;&lt;/p&gt; &lt;p&gt;You can test the project live at this URL:&lt;/p&gt; &lt;p&gt;&lt;a href="http://labs.dropthings.com/MvcWebAPI"&gt;http://labs.dropthings.com/MvcWebAPI&lt;/a&gt;&lt;/p&gt; &lt;p&gt;The code is also available at:&lt;/p&gt; &lt;p&gt;&lt;a href="http://code.msdn.microsoft.com/MvcWebAPI"&gt;http://code.msdn.microsoft.com/MvcWebAPI&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Enjoy!&lt;/p&gt; &lt;p&gt;------------&lt;/p&gt; &lt;p&gt;Here&amp;#39;s an Eid gift for my believer brothers. Check out this amazing site &lt;a href="http://www.quranexplorer.com/"&gt;www.quranexplorer.com/&lt;/a&gt;. You will get online recitation, translation - verse by verse. The recitation of Mishari Rashid is something you have to listen to to believe. Try these two recitations to see what I mean:&lt;/p&gt; &lt;p&gt;&lt;a title="Quran Bookmark  Oct 3  Sura 97 - Verse 1" href="http://www.quranexplorer.com/Quran/?Sura=97&amp;amp;FromVerse=1&amp;amp;ToVerse=5&amp;amp;Reciter=Mishari-Rashid&amp;amp;Translation=Eng-Pickthal-Audio&amp;amp;Zoom=5&amp;amp;TajweedRules=0"&gt;Sura 97 - Verse 1&lt;/a&gt;&lt;br /&gt;&lt;a title="Quran Bookmark  Oct 3  Sura 114 - Verse 1" href="http://www.quranexplorer.com/Quran/?Sura=114&amp;amp;FromVerse=1&amp;amp;ToVerse=6&amp;amp;Reciter=Mishari-Rashid&amp;amp;Translation=Eng-Pickthal-Audio&amp;amp;Zoom=5&amp;amp;TajweedRules=0"&gt;Sura 114 - Verse 1&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Press the &amp;quot;Play&amp;quot; icon at bottom left (hard to find).&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fmsmvps.com%2fblogs%2fomar%2farchive%2f2008%2f10%2f03%2fcreate-rest-api-using-asp-net-mvc-that-speaks-both-json-and-plain-xml.aspx"&gt;&lt;img alt="kick it on DotNetKicks.com" src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fmsmvps.com%2fblogs%2fomar%2farchive%2f2008%2f10%2f03%2fcreate-rest-api-using-asp-net-mvc-that-speaks-both-json-and-plain-xml.aspx" border="0" /&gt;&lt;/a&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1649607" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/omar/archive/tags/asp.net/default.aspx">asp.net</category><category domain="http://msmvps.com/blogs/omar/archive/tags/ajax/default.aspx">ajax</category><category domain="http://msmvps.com/blogs/omar/archive/tags/MVC/default.aspx">MVC</category></item></channel></rss>