Tuesday, April 26, 2011

How to Restore SQL Server 2008 to SQL Server 2005

This is the only way I found we can downgrade database versions.

Creating Scripts to Move SQL Server 2008 Database to SQL Server 2005
These steps show you how to generate the necessary scripts.
  • Use the scripting wizard in SQL Server 2008 to script data as well as schemas into SQL Server 2005 compatibility mode.
  • Run "Generate SQL Server Scripts" wizard in SQL Server Management Studio (once Object Explorer is connected to the appropriate instance) by right clicking on database and selecting "Tasks –> Generate Scripts."
  • Click "Script all objects in selected database" & then click "Next."
  • Change script options: Specifically, set "Script for Server Version" to "SQL Server 2005" and set "Script Data" to "True". (SQL Server 2000 is also supported.) If you are putting the database on a new instance for the first time, make sure the "Script Database Create" option is set to "True." Click "Next" when you are happy with options.
  • Finish the wizard.
After creating the file with these changes, you can run the script in SQL Server 2005 Management Studio to recreate the database in your development environment. You can now test data against SQL Server 2008 and SQL Server 2005.


Sources :


Sys.WebForms.PageRequestManagerParserErrorException error - ASP.NET Ajax 1.0

Error Message : 
Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near '
<!DOCTYPE html PUB'.

Have you ever got these kind of error when you are doing an Async postback using AJAX.NET .Actually If you’ve seen this error, you’ve probably already spent some time to resolve it. Anyway The solution mentioned below is worked for me. 

1) Make sure this in is your web.config
   <httpModules>
      <add name=”ScriptModule” type=”System.Web.Handlers.ScriptModule, System.Web.Extensions,               Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35?/>
   </httpModules>

2) Add this to the to the Page declaration if you’re experiencing some page refresh bugs
   enableEventValidation=”false”


Source : http://weblogs.asp.net/albertpascual/archive/2008/04/22/how-to-fix-sys-webforms-pagerequestmanagerparsererrorexception-in-ajax-1-0.aspx


If you’ve found alternatives to this problem or our suggested solution isn’t working for you, please feel free to comment below.

Thursday, April 14, 2011

It’s a Matter of Time and Heart Sinhala & Tamil Aluth Avurudu

Aluth Avurudu is perhaps one of the most important days of the year in Sri Lanka, when people all over the country and small communities all across the globe celebrate Sinhala & Tamil New Year. Festivities take place in every small village of the country.

In the fullness of the bak maha, (the month of April, the month of abundance and prosperity), the Prince of Peace Indradeva ( sun god) comes to earth bringing peace and happiness to mankind. Nature responds with abundance – flowers on every bush and vine, trees laden with ripening fruit. Plentiful harvest is the reward of hard work for the human kind. It is no wonder that it is a time of celebration.

This is also the time when the sun moves from the Meena Rashiya (House of Pisces) to the Mesha Rashiya (House of Aries) in the celestial sphere. Time, interpreted according to astrological charts   pertaining to and guiding the destiny of the country, plays an important role. It is the time when Sri Lankans   begin celebrating Aluth Avurudu  (in Sinhala) and Puththandu ( in Tamil). It is a time to honour the common destiny of the diverse people that call Sri Lanka home.

The ending of the old year, and the beginning of the new year, occur several hours apart from one another. This period is referred to as the nona gathe (neutral period). During this time people are encouraged to refrain from material pursuits, and engage solely in religious activities and traditional games.

The emphasis on time using the astrological charts is an interesting phenomenon. There is a proper time for everything- to stop work, to start work, to cook food and to eat food, to bathe, to wash hair and to oil it, to visit family and friends and to play. Interestingly they are the routine, mundane tasks of everyday life.   Delving deeper beyond the superficiality of observing merely another tradition, the emphasis on time is an indicator of the importance placed on punctuality. Embedding it in astrology elevates time to the realms of divinity.

The new year is incomplete without the anointing of head with oil- hisa thel gema. Nanu (medicated  shampoo) and oil are important ingredients according to Ayurveda, the ancient medical practices, of promoting health.

It is clear that customs and rituals associated with the new year are those that promote, health, harmony and well-being. Goodwill, promoted through community activities of sports, religious activities and family time around rituals and customs, is the antidote for stress.  Family as the foundation of community is subtly emphasized in the leadership roles played by the mother and the father and the respect given to the elders and  affection shown to the children in the activities.

In the community the mutual exchanging of traditional food of kevum , kiribath and plantains is an opportunity to share good will and commit to harmonious living. Petty rivalries are forgiven and forgotten in the spirit of aluth avurudu.

The value of paying respect to elders is found underlying all aspects of New Year celebrations. The link between generations are strengthened by ganu denuexchanging of bulath (betal leaf), money and other gifts. Aluth Avurudu indeed is not mere ritual. It is an  enactment of meaningful living.

උදාවූ අලුත් අවුරුද්ද සාමය,සතුට පිරි සුභ අලුත් අවුරුද්දක් වේවා!...

Wednesday, April 6, 2011

'Sys' is undefined - ASP.NET AJAX

When I was using ASP.NET 2.0 along with Ajax Extensions 1.0. I received this error ‘Sys’ is undefined error message every time I used an Ajax control.

Wondering why, I search in internet and hope that I will find one of the solution. After several trial and error finally I can find the solution and it work just fine for me.
Why this error?
This error occurs specifically when you try upgrading your existing ASP.NET 2.0 Applications to AJAX by using the ASP.NET AJAX controls like UpdatePanel, etc., The common cause for this error is that you havent updated the Web.Config file of the application to enable the runtime understand ASP.NET AJAX. Let me explain a little more.

When you install ASP.NET AJAX your Visual Studio 2005 gets the toolbox updated with ASP.NET AJAX Server side controls like ScriptManager, ScriptManagerProxy, UpdatePanel, UpdateProgress etc., You already have your existing ASP.NET 2.0 application pages and you can add ScriptManager, UpdatePanel and other controls from Toolbox to your pages. When you run the page, you would get 'Sys' is undefined javascript error. The reason being that, your web.config of the existing ASP.NET 2.0 application misses certain settings that require to be added to make it understand the ASP.NET AJAX Server side controls like UpdatePanel, UpdateProgress etc.,

How to Solve the error ?
To solve the error we need to modify web.config file.
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
</httpHandlers>