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 222009
 

One of the most important features I look for while choosing a web host is the backup services he provides. Is there any cap on the number of times I can backup my data and content. Because lets face it, it would be next to impossible to recreate all your blogs, your pages, your data in the unfortunate event of a crash. Even if it was remotely possible, you would lose valuable revenue while the site is down.

To prevent all this its best to backup your database and website content regularly.  Though it is possible to create backups from your control panel, its a ardous task to be repetitively doing say every 2-3 days. Thus I searched for a solution which could automate WordPress database backup for me. The answer: WordPress WP-DB-Backup plugin seemed perfect for me. I jotted down the steps i performed.

  • Download the WP-DB-Backup plugin from here.
  • Unzip the file and extract it to your local drive.
  • Go to your Godaddy control panel and click on Content -> File Manager.

FileManager

  • All your folders you have on your account will be present here. Click on the folder where you have installed your WordPress blog which needs to have its database backed up.

blogdir

  • After the folder opens you will see the wp_content folder. Check the box next to it and Click on Permissions. There grant the directory write permissions by unchecking the Inherit box and checking the write box. Click on Ok.

Permissions

  • With your FTP client, copy the extracted WordPress DB backup folder to your wp-content\plugins folder.
  • After that go to your blog dashboad, click on Plugins. Check whether your WordPress data backup is present in the list. The click on Activate.

ActivatePlugin

  • Once the plugin is active, the option Backup can be seen in the Tools Section of your Dashboard. Click on it to open the DB Backup options screen.

ToolOptions

  • Here choose the appropriate options on how you want the backup to be done, scroll down to the frequency and click on schedule backup. This will setup a cron job to do the backup automatically on the scheduled time.

There you go, no more data loss hassles. An easy way to keep track of your backups.

P.S. If you don’t receive a mail after you schedule the backup, there might be a problem with your email settings in your host.

Oct 182009
 

Favicons are the tiny icons that appear on your browser tabs when we open a website. Most modern browsers (IE/ Firefox/chrome) support favicons. Older versions of Internet explorer insisted on having an icon format file, but nowadays any image format goes. In case if favicons still seem mumbo jumbo to you, see the below screenshot for favicons from popular sites.

What are Favicons?

What are Favicons?

Most mainstream sites use favicons. Its a good exercise in branding your website and getting youo logo through to visitors even when the site’s tab in  not active in the browser. So how do you go about installing (don’t know if thats the word?) a favicon for your website? Since I have written articles for DotNetNuke and WordPress, I will provide instructions for both.

Before installing the favicon, we need to create one. Its fairly simple, Just create any 16 x 16 pixel image and save it as favicon.ico. You can also use the numerous online generators, or use MSPaint to create your own one.

For installing in DotNetNuke, use a FTP client like FileZilla with the username and password provided to you by the web host and copy your favicon.ico to the root directory. This changes the favicon for all the portals in your website. But what if you want different favicons for each portal? In that case go to the  DotNetNuke Root\Portal folder. Inside this you would have different folders called 0,1… n for each of your portals. copy the favicon.ico file to these folders for customizing the favicon for each portal. Pretty simple huh!!

Changing the icon for WordPress is slightly different. Here you have to go to your themes directory. Located in the WordPress_root\wp-content\Themes\<your_theme_name>\ would be a file called header.php.  Just below the head tag, place the following tag

<link rel=”shortcut icon” href=”favicon.ico” />

It would look like

favicons_WP

Once you are done with this copy the favicon.ico file to the root directory for your blog. Yes its the root, not the themes folder where you added the link.

Thats it. you should see your favicon in your browser!!

Oct 182009
 

I have tried two major blogging applications in the past, Google’s blogger and WordPress. Though Blogger is quite good, WordPress takes the cake, its highly customizable, been written on PHP and MySql. Its basically free and open source. In short – My Dream software.

So when I wanted to start a blog on my new website, I didn’t look any farther from WordPress. And WordPress installation is so simple, I was almost disappointed that it got over so quickly.

Here are the steps i used to install WordPress to a separate subdomain in the step. Let me know if you face any issues.

  • First Create a subdomain in your website.  You can do this by going to Settings -> Domain management in your hosting control panel. Then click on add subdomain and enter the name for your subdomain. In my case, it was blog.
Add Subdomains

Add Subdomains

Addsubdomains

  • Create a new mysql database for WordPress. Click on Databases -> MySql. Click on Add Database and give the details it asks for. My Advice would be to create a strong username and password. i.e. with different capitalizations, numbers and special characters. This would make your database more secure. Once you create your website, you would see the status as Pending Setup. It takes 15-20 minutes for the database to be setup for it to become usable.

AddDatabasecreateDatabase

  • Download the latest non-beta release of WordPress here. Unzip it to a local folder using WinZip or any other compression utility.
  • In the WordPress directory, there would be a file called wp-config-sample.php. This would be your config file which would contain the your database details. Rename it to wp-config.php and open it in any text editor. There you need to fill in the details of your db username, password and host. Leave the collate and charset settings as it is.

config-details

  • Also in the config file, there is a section called Authentication Unique keys. These are the keys that are used to encryt the information stored in cookies for better security. To get strong keys, use the Online Generator. Copy paste the generated keys in the below section.

AuthKeys

  • The username and password are what you just entered for your new mysql database that you created. To access the host name. Go to Databases -> MySql. Check whether the database you just created has the status setup now. If so, get the username and password by clicking on the Details button.

db-details

  • Once all the details are entered copy all the files in the website folder. I use a FTP client like FileZilla. If you want to install this to the root directory, then copy the files to the website root. Else copy it to the root.
  • After all the files are copied, enter http://example.com/wp-admin/install.php if you installed it to the root. Else, if its installed in a subfolder, enter http://example.com/blog/wp-admin/install.php where blog is the name of your subfolder. Enter the few details it asks.

640px-install-step5640px-install-step6

There you go. All Set!!! Happy Blogging.

There you go. All Set!!! Happy Blogging.

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.