purpose of life is joy

NAVIGATION - SEARCH

How to : remove .SVC extension from WCF service URL

By default, WCF service URL runs with .svc extension. sometimes, I felt that .svc extension is not useful when we reference or share the service URL to application or public. There is a very simple way I found to remove this extension and run as very plain URL with out any major coding. Normally, URL looks like below http://domainname/WCFServiceName.svc/MethodName?parameter We need to change the above URL to below one. Looks simple and neat right? http://domainname/WCFServiceName/MethodName?parameter Simple solution is to implement it at web.config level using URL re-writing which is very very simple. Other methods like writing custom URL Re writing module, configure at server level are little complex than compared to web.config changes.We have to apply changes under system.webserver as below below WCFServiceName names alone we need to change according to your service name. try now with removing with .svc URL. Share your feedback!!! <system.webServer> <modules runAllManagedModulesForAllRequests="true"/> <rewrite> <rules> <rule name="WCFServiceName" stopProcessing="true"> <match url="^WCFServiceName/(.*)$"/> <action type="Rewrite" url="WCFServiceName.svc/{R:1}" /> </rule> </rules> </rewrite> </system.webServer>

How to : edit an exisiting blog post in Widows Live Writer thru blogengine.net?

With the Windows Live Writer (WLW) you can create or open local draft version of a post. but Windows Live writer don't have a feature of editing the existing posted blogs. But I found one plugin which is very useful to edit the existing blog. When I search for the edit an existing blog post in google, I came across with the below nice plugin. Download the below plugin and install it on your machine. http://aovestdipaperino.com/pages/wlw-post-download-plugin-instructions.aspx Syntax to open an existing blog post is wlw://www.yourdomain.com/?postid=[postid]. Here http should be replaced with wlw. when you hit above link with your domain information and post id, existing post will open in Windows Live Writer. Edit existing post thru BlogEngine blog Under the PostView.ascx user control, add below code where ever you would like to show the "Edit in WLW" link.   <asp:LoginView runat="server" ID="LoginView1"><LoggedInTemplate> <a href="<%=Utils.AbsoluteWebRoot.ToString().Replace("http","wlw") + "?postid=" + Post.Id%>" rel="bookmark">Edit in WLW</a> </LoggedInTemplate></asp:LoginView>  

Fix : Asp.Net AJAX Control Toolkit error - Sys.Extended is undefined

When we use the AJAX Control Toolkit ModalPopupExtender, sometimes we may get below error Sys.Extended is undefined$create(Sys.Extended.UI.ModalPopupBehavior, {"BackgroundCssClass":... After few hours of investigation, I realized that keyword I’m using it for scriptmanager.If you are using .net 4.0 framework, then change it from <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></asp:ToolkitScriptManager> To <asp:scriptmanager  ID="ToolkitScriptManager1" runat="server"></asp:scriptmanager > And vice-versa for 3.5 and below version.

Tricks : Convert HTML Text to Image in ASP.NET

Normally, We can easily convert text into image thru .net system.drawing namespace and their methods. but converting the HTML to Image in asp.net is bit a tricky one. Why it is so tricky? Good question. right? Trickiness is lying in-terms of output. The outcome of the image exactly should matches whatever you see that in your browser. I.e. WYSIWYG. [More]

How to : Use conditional WHERE clause using CASE statement in MS SQL Query

Adding case statement in where clause sometime we may not get the exact output we required. some solution suggested to add or condition instead of using case statement which again not giving desired results. but one solution I have found using case statement in where clause in reverse way. [More]

How to : fix SQL timeout error from ASP.NET (Parameter Sniffing)?

Recently, I have faced an issue while developing an application using MS SQL 2008 and ASP.NET. I have created a SP which is running fine in from SQL Server Management Studio. But, When I execute it thru the asp.net application, it is timing out. i tried debugging and doing R&D. but in vein. later on i found the reason in the web saying parameter sniffing. Parameter sniffing? Oh yes. this is new to me. what is this by the way? [More]

How to : bold an item in a dropdown using CSS in HTML?

I was trying to find a solution to bold an item in drop-down. I tried using <b> markup from the code itself. but nothing working. finally, after come across with the some webpages, i found this solution. but this will work only with the Firefox not IE :( [More]
Protected by Copyscape Web Plagiarism Check
DMCA.com