Sharepoint Migration: Migrate the content to Microsoft Sharepoint

PCVITA Express Migrator for Sharepoint is next generation migration product for Sharepoint Server as part of Sharepoint Migration. It equally fits into Migration 2.0 generation of migration products. The products supports migration of file system content such as Microsoft Word, Microsoft Excel, Microsoft Powerpoint, Adobe Acrobat PDF and various other types of document to Microsoft Sharepoint Server 2007 and Microsoft Sharepoint Server 2010 as part of Sharepoint Migration.

With the high adoption rate of Microsoft Sharepoint Server among enterprises which are small, medium and large in size. It is becoming very difficult for System Administrator to quickly migrate the existing organisation common internal documents related to finance, administartion ,HR, Research and Development and other related documents to quickly migrate them to Microsoft Sharepoint Server.

PCVITA Express Migrator For Sharepoint acts as a smart bridge which is easy to use, effective and efficient to move their existing file system content to Sharepoint as part of Sharepoint Migration.

PCVITA Express Migrator for Sharepoint also supports migrating content which is residing in Exchange Server  Public folder to Sharepoint as part of sharepoint migration strategy. Many organisation are using Public Folder to keep their common document and share across the organisation. These can now be easily migrated to Sharepoint as part of the Sharepoint Migration. This is great in scenario where the Sharepoint Administrator doesn’t need two products to perform the Sharepoint Migration.

PCVITA Express Migrator for Sharepoint comes with the following features

  • Support for adding files and folders.
  • Support for associating meta information with the files.
  • Select the destination document library on target sharepoint server.
  • Create a new document library.
  • Apply filters on the content getting migrated.
  • Report on the migration.

Check more at http://www.pcvita.com/file-system-to-sharepoint.html

VS 2010 & .NET Framework 4.0 Presentation

Slideshare PResentation about VS 2010 & .NET Framework 4.0

Presentation on WCF

Nice presentation on WCF

ASP.NET website scalability experience

Last six months have been great for me when I was exposed to the great world of scalability of my product. I will try to summarize some of my findings regarding scalability and then may take some of those stuff in detail in coming days/weeks/months.

  1. Before we start anything related to scalability for the website measure the performance of the pages with a single user on a idle bandwidth above 500 KB/s.
  2. To measure the response time of pages do the following
    1. Install tool like HTTPWatch on your machine. The basic version is free and available on http://www.httpwatch.com.
    2. Set the expiry content on the virtual directory to large number of days i.e. 3 or 5 or 10 (this can changed based on your particular need).
    3. Set the Application Pool(IIS 6.0) property such shutdown worker process if idle for 20 minutes and restart after 1740 minutes. (Switch off this setting).
    4. Now traverse through the selected interactions that you would like to measure once. This will warm up the browser cache.
    5. Now measure the response time using the HTTPWatch.
    6. If the response time of the page are below 3 seconds then it is right case for scalability otherwise first tune the pages to bring the response time below 3 seconds.
  3. One of the first thing that you should target to improve the scalability is to start with the database layer.
    1. Check how many queries are getting fired per interaction.
    2. Is there any redundant data being fetched.
    3. If yes then can we cache the data to lesser down database resource usage.
    4. Can we differentiate between Read and Write operations on database.
    5. If yes then can we have separate connection string for both of them.
    6. This is useful if you want to have separate database for Read and Write. (Synchronization can be an issue, will propose my proposal in later posts).
  4. Moving to the website having aspx pages,
    1. Are you using Session variables?
    2. If yes then use ASP.NET State Service for storing the session variables.
    3. Do you store the data in files?
    4. If yes then can they be stored on shared location.
    5. Do you generate content dynamic?
    6. If yes then can they move to shared location.
    7. Now use the VS 2005 Load Test tool to identify the bottleneck for number of users at which the website starts breaking or deteriorating.
  5. Use Windows 2003 Server Network Load Balancing (NLB) component to load balanced your website. Its simple to configure and leverage.
  6. Now again use the VS 2005 to load test tool to measure now at what point the website starts deteriorating.

One of the reason of slow response time is the way we have written the ASPX pages. In my coming post I will share my experience.

Setting ASP.NET State Service on Remote Machine

ASP.NET does allow to set the ASP.NET State Service on a separate machine. This is done through the appropriate setting on the web.config file.

But this is not the only change that we need to do we have set the registry settings on the machine where ASP.NET State Service is running.

We need to do change the the following key

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\aspnet_state\Parameters

and change the value of AllowRemoteConnection to 1 instead of 0.

.NET Custom Settings

We normally tend to lazy and use the .NET Configuration AppSettings element for defining our own custom configuration keys. Though this does solve the purpose but sometime we need MORE. We may need our own tags like <myTag> to be used in the configuration file. .NET provides a standard mechansim to achieve this. Lets assume we want the following in our .config file

<MySettings>

    <Setting Name=”” Value=”” IsValid=”” />

</MySettings>

There are 5 things to be done

  1. Define a class that inherits from ConfigurationElement, this represent the element node i.e. <MySetting> for the above mentioned XML.
  2. Define a class that inherits from ConfigurationElementCollection, this represents the collection node that contain the element node i.e. <MySettings> for the above mentioned XML.
  3. Define a class that inherits from ConfigurationSection, this represent the master class through which the section is accessed.
  4. Add entry in the <configSections> of the config file.
  5. Use System.Configuration.ConfigurationManager.GetSection method to access the section defined in the code.

Now let’s drill with the code

Inherit from ConfigurationElement

public class MySetting : ConfigurationElement
    {
                
        [ConfigurationProperty(“Name”, IsRequired = true)]
        public String Name
        {
            get
            {
                return (string)this[“Name”];
            }
            set
            {
                this[“Name”] = value;
            }
        }

      
        [ConfigurationProperty(“Value”)]
        public String Value
        {
            get
            {
                return (string)this[“Value”];
            }
            set
            {
                this[“Value”] = value;
            }
        }

        [ConfigurationProperty(“IsValid”)]
        public bool IsValid
        {
            get
            {
                return (bool)this[“IsValid”];
            }
            set
            {
                this[“IsValid”] = value;
            }
        }
    }

Inherit from ConfigurationElementCollection

public class MySettings : ConfigurationElementCollection
    {
        protected override ConfigurationElement CreateNewElement()
        {
            return new MySetting();
        }
        protected override object GetElementKey(ConfigurationElement element)
        {
            return ((MySetting)element).Name;
        }
        public override ConfigurationElementCollectionType CollectionType
        {
            get { return ConfigurationElementCollectionType.BasicMap; }
        }
        protected override string ElementName
        {
            get { return “MySetting”; }
        }
        public MySetting this[int index]
        {
            get{ return (MySetting)BaseGet(index); }
            set
            {
                if (BaseGet(index) != null)
                    BaseRemoveAt(index);
                BaseAdd(index, value);
            }
        }
        new public MySetting this[string Name]
        {
            get { return (MySetting)BaseGet(Name); }
        }
        public bool ContainsKey(string key)
        {
            bool result = false;
            object[] keys = BaseGetAllKeys();
            foreach (object obj in keys)
            {
                if ((string)obj == key)
                {
                    result = true;
                    break;
                }
            }
            return result;
        }
    }

Inherit from ConfigurationSection

public class MySection:ConfigurationSection
    {
       [ConfigurationProperty(“MySettings”,IsDefaultCollection=true)]
        public MySettings MySetting
        {
            get
            {
                return (MySettings)base[“MySettings”];
            }
        }
    }

 

Entry in App.Config/Web.Config

<configuration>
  <configSections>
    <section name=”MySettings” type=”DebasishPramanik.Configuration.MySection,
      CustomSettings”/>
  </configSections>
  <MySettings>
    <MySetting Name=”BlogID” Value=”12345″ IsValid=”true”/>
  </MySettings>
</configuration>

 

Use in Application

 

DebasishPramanik.Configuration.MySection section = (DebasishPramanik.Configuration.MySection)System.Configuration.ConfigurationManager.GetSection("MySettings");
            
foreach (DebasishPramanik.Configuration.Setting setting in section.MySettings)
 {
     Console.WriteLine(setting.Name);
}

 

 

    Remove Cookie in ASP.NET

    I was working on the Cookies using the HTTPCookie class in ASP.NET. Though it is simple to add cookie and use them in the program but I really struggle to remove the cookies. I tried initially

    1. Get the reference to the cookie.
    2. Use the Response.Cookies.Remove method to remove the cookie.

    I expected the API to behave as per the name i.e. delete the cookie but to my utter shock it didn’t work. After long search I found the solution. The key was to make the cookie expire instead of removing it from the collection

    Response.Cookies[“MY_COOKIE”].Expires = DateTime.Now;

    This works perfectly for me.