Error creating assembly manifest: Error signing assembly - Unknown error (8013141c)

Today I faced an issue while compiling the project with VS 2010. First I thought it was due to invalid snk file. But I confirmed it, that was not the problem. Later I found it was a permission issue. The solution is very simple, to resolve this error; open the...


How to change the startup page on a WP7 application

Sometimes you may need to change the startup page of Windows Phone application. By default it will be pointing to MainPage.xaml. You can modify the WMAppManifest.xml to change the default page. In the WMAppManifest.xml you will find the following.(You can get the WMAppManifest.xml by expanding the properties node in the...


Time ago function for C#

Here is a small C# snippet which will return a date time value in a readable way as facebook,twitter, stackoverflow and most of the forum sites, like 1 day ago,1 min ago etc. If you’re building a website, then the jQuery plugin Timeago is a pretty sweet way to do...


Programmatically list the local instances of SQL Server

Long back I wrote a post about Enumerating Instances of SQL Server using C. But this code snippet will not list your sql server instances installed on your system. Here is the code snippet using Windows registry which will list all the local instances of sql server. var baseKey =...


How to share cookie between HttpWebRequest and WebView

This is post is about another hybrid application scenario. I had to implement this in one of our projects, the problem was like this, unlike other hybrid applications, this project had a native login screen, which will authenticate the user against a REST API service and once the authentication is...


How to convert JSON to XML and vice versa in C#

Json.NET supports converting JSON to XML and vice versa using the XmlNodeConverter. The JsonConvert has two helper methods for converting between JSON and XML. The first is SerializeXmlNode(). This method takes an XmlNode and serializes it to JSON text. string xml = @"<catalog><book id=""bk101"">" + "<author>Gambardella, Matthew</author>" + "<title>XML Developer's...


How to detect IPhone / IPad through JavaScript

Here is code snippet which helps to identity IPhone or IPad through JavaScript. if ((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPad/i))) { //IPhone or IPad } And here is the C# snippet for user agent checking. if (Request.UserAgent.IndexOf("iPhone", StringComparison.CurrentCultureIgnoreCase) >= 0 || Request.UserAgent.IndexOf("iPad", StringComparison.CurrentCultureIgnoreCase) >= 0) { //IPhone / IPad } Happy Programming :)...