Archive for the ‘Uncategorized’ Category

ASP.NET 5 Preview runtime

November 27, 2014 Leave a comment

ASP.NET 5 includes the following features:

1) New flexible and cross-platform runtime
2) New modular HTTP request pipeline
3) Cloud-ready environment configuration
4) Unified programming model that combines MVC, Web API, and Web Pages
5) Ability to see changes without re-building the project
6) Side-by-side versioning of the .NET Framework
7) Ability to self-host or host on IIS
8) New tools in Visual Studio 2015
9) Open source in GitHub


Here are some helpful links to get you started with ASP.NET 5 Preview:


For more information ASP.NET 5 Overview

Categories: Uncategorized

Getting Started – Git

November 6, 2014 Leave a comment

Categories: Uncategorized

ADO.NET best practices – Reading data from data reader

June 26, 2014 Leave a comment

Nice extract that i found, as a developer who wanted to implement some standards in there code  need to read, if you are expert in it just recap it. 🙂

{love to code?}

I have seen many people using DataReader incorrectly. In this post, I will try to explain some good practices that can be followed when reading from a data reader. Consider the following problematic code,

How many problems can you figure out from the above code? There are many problems with this code,

View original post 500 more words

Categories: Uncategorized

Steps to create Virtual Directory in IIS 7.0

April 3, 2014 Leave a comment

You created the web application which is out side of inetpub folder, you don’t want to place your application under Inetpub/wwwRoot folder, insted you want to refer current web application as application path. You can do by using Virtual path. For one web application you can create any number of virtual directory.

While you are accessing the web application in IIS which is out side of Inetpub/wwwRoot folder you need to do some configuration in that first step is creating virtual directory. Let see how to create Virtual directory in IIS

Steps to create Virtual Directory
1) Open the IIS and expand the Sites tree structure.
2) Select the site under which you are going to create the virtual directory
3) Right click on it
4) select’ Add Virtual Directory
5) In the Add Virtual Directory popup Enter your ‘Alias‘ name for your web application
6) Select the actual location of your web application in ‘Physical Path
7) Click on ‘Connect as..‘ button
8) In the ‘Connect As’ popup if you need to authenticate your web application using specific user then select the ‘Specific User‘ option and enter the user
9) Else you need to authenticate all application users select ‘Application User‘ option. (Recomended)
10) Click on Ok button

Now you will find New virtual directory will created under the selected Website with the ‘Alias’ name. To make it accessable permission to the application folder you need to Edit the permission for the folder.

*) Click on the ‘Edit Permissions‘ on the Action Panel
*) Select the ‘Security‘ tab from the Pop up
*) Under the Group or Username section click on ‘Edit…‘ Button
*) In the New popup again click on ‘Add‘ button.
*) Select the Group or Users to home you are going to assign permission. Make sure you added ‘IIS_IUSRS‘ and ‘IUSR’ and it have minimum read permision.
*) click ‘Ok’ button on all the popups

Also make sure you enabled ‘Anonymous Authentication‘ under IIS Section of ‘Feature View

Categories: Uncategorized

Access HttpContext.Current from WCF

June 21, 2013 Leave a comment

Wcf doesnt have an HttpContext. if you want to store data in a user session all you need to do is set teh InstanceContextMode of the service class to Session, then use a channel that supports sessions such as wsHttpBinding. What this causes is a new instnace of teh service to be created per session. By default a new instance of the service is created with each and every call. So if a new instance of the service is created per session, then that means that all of the local varaibles in the service are implicitly per session. So you can just store the values there.

You can get access to HttpContext.Current by enabling AspNetCompatibility, preferably via configuration:

<serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>

You can even enforce AspNetCompatibility by decorating your service class with an additional attribute
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]

Categories: Uncategorized

WCF Timeout Even Exceptions

April 28, 2010 Leave a comment

There are four types of time out in WCF all are configurable in web/app config file.

1. OpenTimeOut- Connection open time out

2. CloseTimeout- connection close time out

3. SendTimeout- data/request send time out

4. ReceiveTimeout- data / response receive time out

You can configure this for the <bindings> in web config

 You have to check which time out you are facing and set appropriet value in the setting

      <binding name = “Example” sendTimeout = “00:05:00″/>

Categories: Uncategorized

Insert a new record to Sharepoint List

January 22, 2010 Leave a comment

string _strBatch="<Batch OnError="Continue"> "+
                 "<Method ID="1" Cmd="New">"+ 
                 "<Field Name="Title">Abcdef</Field> "+
                 "<Field Name="Project_x0020_code">999050</Field>"+ 
                 "<Field Name="Status">Open</Field>     "+

Lists listService = new List123.Lists();


XmlDocument xmlDoc = new System.Xml.XmlDocument(); 

XmlElement elBatch = xmlDoc.CreateElement(“Batch”);


“OnError”, “Continue”);


“ListVersion”, “1”);

elBatch.InnerXml = _strBatch;


XmlNode ndReturn = listService.UpdateListItems(_ListName, elBatch);

Categories: Uncategorized
%d bloggers like this: