Tuesday, November 16, 2010

When ASP.NET Application Restart?

The list of situations

  1. Adding, modifying, or deleting the application's Web.config file.
    • This is very important situation here, if we are add any new section or modify existing section i web configuration file, the IIS will treat as change and then lead to restart the ASP.NET Application. And more important when Application restart all the sessions and other states will lost. so make sure before update anything in web config file, all the transaction has been completed.
  2. Adding, modifying, or deleting assemblies from the application's Bin folder.
  3. Adding, modifying, or deleting localization resources from the App_GlobalResources or App_LocalResources folders.
  4. Adding, modifying, or deleting the application's Global.asax file.
  5. Adding, modifying, or deleting source code files in the App_Code directory.
    • This is very important situation here, if we are add any new section or modify existing section i web configuration file, the IIS will treat as change and then lead to restart the ASP.NET Application. And more important when Application restart all the sessions and other states will lost. so make sure before update anything in web config file, all the transaction has been completed.
  6. Adding, modifying, or deleting Web service references in the App_WebReferences directory.
This is very smal tip, but most useful, who are working production asp.net application.

Data Access Layer Class In C#

In this article, I would show to you how to create a Data Access Layer Class in C#. The data access layer always important when we are work with database and presentation layer. This class should contains all the methods which can be used to get data from database (using Stored Procedures) and also to insert and update data in database.

Data Access Layer Class contains the methods which return different objects like Data set, SqlDataReader, Integer etc at the end of the method. Data Access Layer Class also contains methods for adding.Parameter to SQL Command with different parameters and contains the method to set the parameter value.

Here is the sample code for create the Data Access Layer Class in C#.

Monday, November 15, 2010

Difference between Web Service and WCF Service

  • Web services can be hosted in IIS as well as outside of the IIS. While WCF service can be hosted in IIS, Windows activation service,Self Hosting,WAS and on lots of proctols like Named Pipe,TCP etc.Here lots of people disagree how we can host the web service outside of the IIS but Here is the article for that.http://msdn.microsoft.com/en-us/library/aa529311.aspx.
  • In Web Services Web Service attribute will added  on the top of class. In WCF there will be a Service Contract attributes will be there. Same way Web Method attribute are added in top of method of Web service while in WCF Service Operation Contract will added on the top method.
  • In Web service System.XML.Serialization is supported while in the WCF Service System.RunTime.Serialization is supported.
  • WCF Services can be multithreaded via ServiceBehavior class while web service can not be.
  • WCF Services supports different type of bindings like BasicHttpBinding, WSHttpBinding, WSDualHttpBinding etc.while Web services only used soap or xml for this.
  • Web services are compiled into a class library assembly. A file called the service file is provided that has the extension .asmx and contains an @ WebService directive that identifies the class that contains the code for the service and the assembly in which it is located while in WCF.WCF services can readily be hosted within IIS 5.1 or 6.0, the Windows Process Activation Service (WAS) that is provided as part of IIS 7.0, and within any .NET application. To host a service in IIS 5.1 or 6.0, the service must use HTTP as the communications transport protocol.

Monday, October 25, 2010

Share Point moving items between lists

There is a very necessary thing for the Share Point developer is to move the List Item to another List. This is happening almost in every issue. So there are some simple steps for Share Point Moving Items from one List to another List.
  1. Open your Share Point site and make sure you’re logged in at least as a Site Collection Administrator (not that you cannot do this operation with other permissions.) 
  2. Before Developer precede also make sure that publishing is enabled for the Site Collection Features and Site Features. 
  3. Navigate yourself to the Site Settings and then to Manage Content and Structure.
  4. Select the List where you have the list item and then hover over the list item you want to move.
  5. Drop down the menu and select Copy/Move.
  6. It should open a dialogue box displaying a site tree structure again.
  7. Select the List you would like to the copy/move the item to and the operation would be executed.
  8. Now Open the destination List and you would see your List item listed there.
So now you can easily handle this massive work so simply when any developer want to do the "Share Point Moving items from one List to another List".

Friday, October 22, 2010

Share Point 2010 Change Favicon Icon


To change the favicon icon in SharePoint 2010 is much easier with SharePoint 2010. SharePoint 2010 is much easier and customizable. SharePoint 2010 is latest version of Microsoft SharePoint. With SharePoint 2010 the SharePoint Designer 2010 attached which is simpler to work with and allows the SharePoint developer to change just about anything they wish to change. While customization is easier than ever, it has also changed significantly from SharePoint 2007. The addition of new SharePoint controls allows the user to change settings more easily than before. The favicon, the icon that represents the website, is an important part of any page. Specifically in SharePoint 2010, if this icon is left unchanged it leaves the default bright orange icon.

To maintain the branding of your webpage in your favicon, follow these steps.
  1. Upload your favicon file to your images library.
  2. Publish and Approve your icon through the SharePoint Publishing Workflows
  3. Open your master page in SharePoint Designer 2010.
  4. Find the tag in the HTML header.
  5. Change the "IconUrl" tag to the relative URL of your favicon.
  6. Save and check-in your master page.
  7. Publish and approve your master page through the SharePoint Publishing Workflows.