Geeks With Blogs
Developers Friendly
Any application we built, will not be completely error free. Application will throw an exception at one or other point. Its a good practice to handle such exception in a way that it wont expose any critical information that would invite hackers. When an error occurred in application if its not handled properly, it will show up many critical information ......

Through this post I am trying to demonstrate how to write a custom service in AngularJS. Why custom Service? - Reusability Services are used to perform specific operation Or to write piece of code that doesn't fit in Directive or model. Say for example we have to call an API and capture data what we receive from API and perform some operation on that ......

When we are building any intranet web application, it is always better go with windows authentication in order to authenticate user against AD(Active Directory). With windows authentication enabled its very easy to authenticate and authorize user. To enable Windows Authentication in Asp.Net web application below changes need to be done: Set authentication ......

Hi,Providing sample powershell script to start and stop Application Pool of an application hosted in IIS.* Save the below script in a file called as IISCmds.ps1#Start To Start Application Pool Function fnStartApplicationPool([str... { import-module WebAdministration if((Get-WebAppPoolState $appPoolName).Value -ne 'Started') { Start-WebAppPool ......

Hi,Through this post i am trying to demonstrate how to access remote server and create web applications on any given server using PowerShell script from .NET application. Which involves passing values as parameters and executing ps1 script and accessing result set returned from ps1 script.The same can be achieved using .Net class "ServerManager" class, ......

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... ......

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, ......

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 ......

Here i have tried to give a simple example of how to read XML file using LINQ query.Ex: Below is the sample structure of XML file. Say file name would be EMailTemplates.xmlIn order to get the value of <ResetPassword> node using LINQ, we can write something like below,With the above LINQ query "element" will have value something like below,<ResetPassword> ......

Below are the list of SqlDbType and equivalent CLR type, which will be mostly used while passing parameter to Stored Proc. SqlDbType CLR Type SqlDbType.Binary SqlDbType.Image SqlDbType.Timestamp SqlDbType.VarBinary typeof(byte[]) SqlDbType.Char SqlDbType.NChar SqlDbType.NText SqlDbType.NVarChar SqlDbType.Text SqlDbType.VarChar SqlDbType.Xml typeof(string) ......

Copyright © Manjunath K | Powered by: GeeksWithBlogs.net