Windows Server

  • How to fix ASP.NET 3.5 websites not running on Windows Server 2012

    ASP.NET 3.5 websites not running on a newly setup Windows Server 2008

    I had an issue the other day where a new Windows Server 2012 installation was not running my older ASP.NET 3.5 web sites. Everytime I would try to navigate to a .net 3.5 website I would see a '404: page not found' error message.

    If I manually typed in a path containing a '.html' file this would load without any issues for me but '.aspx' files would not load. I noticed that the Mapping Handler was missing settings for older asp.net code - everything was asp.net 4.0. This explained why .html files were ok but .aspx files were returning a 404. The server just didn't know what to do with .aspx files for older .net sites.

    I opened the Add Roles and Features Wizard (go to Control Panel, Turn Windows features on or off) and drilled into the IIS web server to ensure that asp.net 3.5 was installed but noticed that only ASP.NET 4.0 was installed on the server. To fix this I simply had to tick the checkbox for .Net Extensibility 3.5 and ASP.NET 3.5. You can find these checkboxes by drilling into the following tree menu:

    • Web Server (IIS) (installed)

      • Web Server (Installed)

        • Application Development (Installed)

          • .Net Extensibility 3.5
          • ASP.NET 3.5

    If you get asked about restarting the server you can leave that checkbox unchecked as this install won't require a server reboot. Remember to restart IIS or recycle the app pool and website before you try and browse to your .net 3.5 website for the new settings to take effect.

  • How to convert a .htaccess file for use in your Web.Config file on Windows Server

    How to convert a htaccess file for use on Windows Server

    If you're running a Windows Server and you have to run PHP websites on it chances are that you will be asked to apply rules from a .htaccess file to one of the websites on your server. Windows Server does not use .htaccess files. These usually come from Apache servers. However, Windows Servers use a similar file called the Web.Config file located at the root of all your websites hosted on your Windows Server.

    You'll be glad to know that there is a converter built into IIS 7 that will convert any .htaccess rules into the format required for the Web.Config file. To convert your .htaccess file simply follow these instructions:

  • Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine

    I was working recently on an import script that would allow the end user upload an excel file, read it and import the data. Everything worked great on my own computer but when I ran the project on our Windows Server 2003 the project would fail when attempting to open the .xlsx file. The error returned to me was:

    Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine

    Obviously the server was missing the component required to read in a xlsx excel file. To solve this issue you need to download the 2007 Office System Driver: Data Connectivity Components onto your server. No server restart is required to install this tool and once it is installed everything will work as expected and your .net project will be allowed open and read .xlsx files.

  • How to create a symlink or symbolic link on Windows Server 2008 to help share folders

    A symlink or symbolic link can be easily created in Widows Server 2008 to share a common folders or files amongst projects. Lets assume you have a folder in domain1.com called CSS and you want to share this folder with domain2.com. You could just upload the CSS folder into domain2.com but then you need to FTP and update the CSS folder in 2 places. If both sites are using the exact same CSS this could cause you issues over time as you might forget to roll out updates from one site to another.

  • How to install PHPMyAdmin on Windows Server 2008

    At present if you install Wordpress as part of the Web Platform Installer it does not install PHPMyAdmin for you. Luckily this install is very easy to do.

    Head over to http://www.phpmyadmin.net and download the latest installer to your server.

    Once downloaded unzip the contents of the file and rename the folder to 'phpmyadmin'.

    Copy this folder to your website containing Wordpress or php.

    Open the file config.sample.inc.php into wordpad (notepad puts it all on one line) and enter in a new Blowfish_secret. It can be anything random like a password.

Updates

Follow me online at TwitterFacebook or Flickr. If you want to get in touch with me try emailing me.

Latest Tweets