Sunday, May 1, 2011

Website not working without www in parallel plesk.

Recently our website www.syneity.com came across a minor glitch. We could access our website with www but not without it.

image image
url : www.syneity.com url : syneity.com

To fix this i explored through the parallel plesk dashboard and got the solution.

  1. Visited the Domains link on the left navigation bar.
  2. Selected the checkbox against syneity.com and the clicked the modify button
  3. In the resulting page, scrolled down towards Preferences
  4. Then selected the check box against switch on for www prefix
  5. image

 

 

And bingo syneity could be accessed using both the links..

Friday, April 22, 2011

Pivot to Convert Rows into Columns

 

pivot-sql-server


I need to convert the table as show in the figure above to the one on the right hand side. Using Sql servers Pivot we can easily get this done. Please see the script below:

Thursday, April 7, 2011

Get all descendants of a parent using CTE

 

Declare @TblLocations Table(Id Int, Name Varchar(50), ParentId Int)
Insert into @TblLocations(Id, Name, ParentId)
Values(1, 'India', Null)
Insert into @TblLocations(Id, Name, ParentId)
Values(2, 'Kerala', 1)
Insert into @TblLocations(Id, Name, ParentId)
Values(3, 'Tamil Nadu', 1)
Insert into @TblLocations(Id, Name, ParentId)
Values(4, 'Kochi', 2)
Insert into @TblLocations(Id, Name, ParentId)
Values(5, 'Chennai', 3)


;With Locations As
(
Select * From @TblLocations
Where ParentId = 3
Union All

Select Child.* from @TblLocations Child Inner join Locations Parent on Child.ParentId = Parent.Id
)
Select * from Locations

Friday, March 25, 2011

Create a simple Restful WCF Service in Azure

Our target:

We will be creating a WCF Service in azure which will have rest based urls. The functionality of this wcf service along with rest based urls are:

Functionality Rest based URL HTTP Verb
View all Movies movies/now-playing GET

Coding the WCF Service:

Wednesday, March 23, 2011

Learning Windows Azure

I will be learning windows azure in the next few days and I will be documenting the same in this blog.

I will be learning Azure by building a sample application. The application requirement:

“The application will allow users to register / login using facebook /google/ live Ids. Registered users will be able to view movies, They will also be able to add movies, for each added movie they will get a credit. The users will be able to view the credit balance.”

Sunday, March 6, 2011

Configuring dotnetpanel for google apps email

I recently had to configure google apps email for dotnetpanel, the following link was helpful for me in that regard. Special thanks to Shai Ben-Naphtali

Link:

http://blog.arvixe.com/dnp-dotnetpanel-setup-google-apps-mx-cname-and-spf-records/