Nov 142009
 

I just enabled WordPress Permalinks in my blog. The links look much better than the ugly querystring URLs before.

To do this, Just click on Permalinks in the WordPress Settings in your dashboard. And choose the format you want your links in.
permalinks

It might take a while for the redirection to kick in so wait for 5-10 minutes. In my case it was instant though. And in case you were wondering what happens to the URLs already indexed by the search engines, they work as well!!!

Nov 072009
 

Silverlight is Microsoft’s answer to Adobe Flash, used to display multimedia, animation and graphics in Internet applications. Its a subset of Windows Presentation Foundation and uses a vector graphics rendering engine to deliver much better graphics than conventional web images.

With each release Microsoft is working on bringing Silverlight and WPF closer to each other. Prism is one such implementation which allows applications to be written without knowing the end platform in mind. In this blog I will explain how to write a simple application and XCOPY deploy it to a shared web hosting provider, in my case godaddy.

First open up Visual Studio. For this walkthrough I have used Visual Web Developer 2008 which is a free software and can be downloaded here. You would also need the Silverlight SDK consisting of the runtime environment and the toolkit, all of which can be downloaded at the Silverlight page.

First open up Visual Web Developer. Click on File -> New Project. If the tools were installed correctly, you should see a new Project type Silverlight Application in the list.

newProject

The next screen asks if you want to host your silverlight application in an ASP.NET website. This is really optional since Silverlight is independant from ASP.NET. It can be hosted on your HTML, PHP, JSP application with equal ease. The only thing needed is the .XAP file.

newApp

The solution is created and if you look at it there, are two projects. One is the Silverlight project with App.xaml and MainPage.xaml. Another project is the ASP.NET website which is the host for the Silverlight application. The xap file is contained in the ClientBin folder.

Solution_Exporer

In the godaddy Hosting manager, click on IIS management and create a virual directory which is setup as an application.

IISSettings

Now lets see the project. Click on MainPage.xaml to see the markup for the MainPage. Copy this markup between the grid element. Unfortunately the HTML tags aren’t working properly when I copy paste them to the blog. Hence posting the screenshot.

postMarkup

Then you need to modify the web.config and set the custom errors mode = off. Then using a FTP client copy all the host website files into the virtual directory that you created. And thats it. Your first sample silverlight website.

Oct 242009
 

I had written a post a few days back on how to backup your wordpress MySql database. A key feature of backing up the database was the ability to send your zipped db backups to your email as per schedule. Saving them to server could be a security hazard. But to send it to your email, the SMTP settings must be configured on the server.

An easy way to do this would be to install the wordpress email plugin WP Mail SMTP. Below are the instructions:-

  • Download the WordPress Mail SMTP plugin’s version from here.
  • Unzip it to your local drive and copy it to the WordPress ( wp-content\plugins) directory using FileZilla or any other FTP client.
  • Go to the admin page of your WordPress blog by giving the blog address/wp-admin/. Click on Plugins-> Installed
  • You should see the WP-Email-SMTP in the list. Click on Activate. Once done, you should see a new category Email in your dashboard Settings.

Plugins

  • Now that the plugin is ready, we need to configure our email settings on the godaddy server. I ll create a new email id for my WordPress blog here.
  • On your GoDaddy account home page, click on Email -> My Email Account. In the page that opens, choose what kind of email account you want to create and click on the Manage Account next to the plan. The Godaddy Email Control panel should open in a seperate tab. Click on the Add button to create a new email id.

email_controlpanel

add_email

  • Once you come back to your dashboard, Click on Settings -> Email.

Dashboard

  • In the page that opens enter the following details:
  1. From Email: The id which you created in the steps before this.
  2. From Name: Choose a good name!!!
  3. Mailer: Send All WordPress mails via SMTP.
  4. SMTP Host: Enter relay-hosting.secureserver.net .  Dont give the one that Godaddy gives you. It wont work.
  5. SMTP Port : 25
  6. No encryption and No authentication:

emailSettings

  • Now try sending a test mail. If it works, you should see the below screen. And you should get the test mail too!!!!

TestMail

Oct 172009
 

One of the first things that I did after creating a shared hosting account with GoDaddy was to look for a good content management system. After pestering loads of people at work meticulous research, I settled on DotNetNuke. After downloading it, it seemed pretty easy to work with.

Now came the difficult part- getting it to work on a shared website. Having grown accustomed to full administrative rights with IIS and the local system, it seems strange when working with shared hosting providers, to tweak the application installation according to their security. On Visual Studio Ctrl+F5 was about the most difficult thing I had done to get an application built and running.

After 2-3 hours of googling, I found that installing DotNetNuke in the root website folder would be too much of a hassle since GoDaddy didn’t provide write permissions to the root directory. Anticipating a lot of work, I directly jumped to the second option – Installing it in a subfolder in the website.

Here the steps I used to install DotNetNuke 5.x to a subfolder. Hope it helps.

  • Create a subfolder in your website. (I named it dnnroot). I did this using FileZilla, the free FTP tool. You can also use the built in FileManager by going to Content -> File Manager in your control panel

Create new directory in root

  • Create a new Sql Server database by going to Databases -> Sql Server. I cant show that since, I have already created my maximum allowed quota of 1 db.  Some people have managed to run DotNetNuke on MySql using a provider. But mostly it will cause issues. Get the connection string by going to the Configuration section.
  • Get Connection String

    Get Connection String

    • Download the install package from the DotNetNuke website.
    • Unzip the package to a folder in your system.
    • There is a file called release.config in the install package. Rename it to web.config and modify the Connection string specified in two places inside the file. Make sure you don’t have two config files in the folder, because this will throw errors.
    • The custom errors need to be turned off in the web.config file.
    Custom Errors need to be set Off
    • After changing the web.config, copy all the files in the DNN directory to the newly created folder in the website. I preferred FileZilla for doing this, but you can use the FileManager as well.
    • Then come the permissions issue. DotNetNuke is apparently a free bird and doesnt like to be held down too much by restrictive permissions imposed by IIS. So there are two permissions settings that you need to tweak to get it work.
    • The first is the file permissions.  DNN needs write access to the folder it resides in. We need to provide this using FileManager application which we used for creating a subfolder for DotNetNuke. Click the permissions button. Uncheck the Inherit checkbox and check the write one.
    Permissions Button

    Permissions Button

    Permission2

    • Last but not the least, you need to tell IIS that what is being installed is an application, for this a simple setting change is needed. Click on Content -> IIS Management. If you dont see the subfolder you created, then create a new directory with the same name as your subfolder. Then click on edit and check the “Set Application Root” option.

    IIS-Settings

    Voila!!! You are all set. DotNetNuke 5.x has been successfully installed in your website. If you still face any other issues, feel free to comment on this article, I will help you to the best of my knowledge.

    P.S: Though many people prefer to install DNN in website root, its quite complicated to do so. However, if you want your website address to point to your DNN installation. A simple 301 redirect script should do that. Will follow that up in a later blog post.