It's Alive!!!!!

by Lord Zoltan 5. February 2008 21:52

Awesome - I've finally got the damn thing working on my 1and1 hosting area.  It's all a bit of a weird one to be honest - in that you basically can't have different domains pointing to subfolders and have it work properly...

For anybody else that's having trouble getting an Asp.Net site working on the 1and1 MS Business Package, here's the best way:

  1. Create a subfolder in your web space in which your precompiled site will go
  2. Make sure you point your domain (in the 1and1 domains tab) to the root of your web space (yes I know, it's a bit bonkers)
  3. Create your application (basically the same as your asp.net application in IIS) on this subfolder.  Any code in there that uses '~/path' notation will start at the subfolder (very useful if you're using BlogEngine.Net like me - as it means you don't have to change the root of the site!)
  4. (Optional if your site uses an App_Data folder to store data, like BlogEngine.Net) - Make sure you give write access to the Network Service and IUSR_x user.
  5. Finally - and this is probably one of the most important bits...  It seems that 1and1 sites aren't setup to use default.aspx as a default page...  Curses!  Their suggestion is this (taken straight from an email that I received from their support team).  I'm pasting the content of the email - which also mentions what I say in point 2 above:

For the second query, you can create a redirection script for that one.

Modify this redirection script to where you want to direct the visitors of your website. Create this script as default.asp and make sure to put it in the root of your webspace.

Ensure all your domains are pointing to the root (/.) and you are redirecting them to different folders using a default.asp script.

<%EnableSessionState=False
host = Request.ServerVariables("HTTP_HOST")
if host = "test.com" or host = "
www.test.com" then
response.redirect("
http://domain1.com/domain1/index.aspx")
elseif host = "tranquilhome.com" or host = "
www.tranquilhome.com" then
response.redirect("
http://domain2.com/domain2/index.aspx")
else
response.redirect("
http://domain1.com/error.htm")
end if
%>

lordzoltan.org, for example, contains a default.asp file that catches "lordzoltan.org" or www.lordzoltan.org and redirects it to blog/default.aspx.

It's not a perfect solution - but then I'm not paying a vast sum for my hosting so I can't complain!  When I want to do proper hosting, after all, I will probably purchase a virtual server!

Cheers all

Currently rated 5.0 by 4 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

Technical

Comments

Comments are closed

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen