Geeks With Blogs
Developers Friendly December 2013 Entries
Updating Web.config Programmatically
This post will demonstrate about updating web.config file dynamically. Below is the code snippet.string key = "iSourceID";string value = "This is my New Value!";string path = targetDirectory + "\\Web.config" ;var config = ConfigurationManager.OpenMa... ExeConfigurationFileMap() { ExeConfigFilename = path }, ConfigurationUserLevel.None... element = config.AppSettings.Settings... (element == null){ config.AppSettings.Settings... value);}else{ element.Value = value;}config.Save(Configur... ......

Posted On Tuesday, December 10, 2013 6:38 AM

Hosting WCF Service on IIS8
With this article, i am trying to elaborate the problems i faced while hosting WCF service on a Windows Server and on an IIS8. Hope this helps any one. Step1: Once I setup an application in IIS and try to browse, i got below error. This Error shows up as dependency dll was not available on server machine. Problem 1: Could not load file or assembly 'Microsoft.Web.Infrastructure, Version=, Culture=neutral, PublicKeyToken=31bf3856ad36... or one of its dependencies. The system cannot find the ......

Posted On Sunday, December 8, 2013 12:35 PM

JSON Deserializing With null
When deserializing any JSON string to corresponding Object, if any value contains null, deserialization error occurs. To avoid such error one should use new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore}); Example: MyEntity deserializedObj = (MyEntity)JsonConvert.Deser... typeof(MyEntity), new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore});... ......

Posted On Thursday, December 5, 2013 1:32 AM

Copyright © Manjunath K | Powered by: