You are Here: FAQ ->Scripting & Programming->ASP .Net->Article #8


WebHosting Microsoft-Edition This Article is for 1&1 Microsoft Web Hosting Only.


Where to place all the CodeBehind files for a .NET Version 1application?




Please note
Please note that this will only work if your MS Hosting package is running on ASP .net Version 1.
To verify the version that you MS Hosting package is running please run this script

If your running ASP .net Version 2 please see this FAQ Where to place all the CodeBehind files for a .NET Version ?


There are two possibilities:

1. 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.htm")

elseif host = "tranquilhome.com" or host = "www.tranquilhome.com" then
response.redirect("http://domain2.com/domain2/index.htm")

else
response.redirect("http://domain1.com/error.htm")

end if
%>


With this kind of setup, you can place the codebehind files in a "bin" folder. And
the "bin" folder can then be placed in the respective folders the domain is pointing
to.

For example: the codebehind files for domain1.com can be placed in the folder
domain1. (/domain1.com/bin)

Please note
The web.config can go into the respective folders too.


2.Your domain is pointing to a folder from the Control Panel.



All CodeBehind Files for .NET Applications should be placed in "bin" folder.
The "bin" folder should then be placed in the root directory of your server and
also the application directory of your domain.

For example:

You have a domain named domain-name.com and all the files associated with that
domain are in a folder named domain-name
Therefore the path for that folder is: E:\kunden\homepages\XX\dXXXXXXX\domain-name
The path for the root folder is: E:\kunden\homepages\XX\dXXXXXXX\

Now place the bin directory in "domain-name" folder and also the root.

Also, place the web.config file in the root folder and the application
folder.


Print Article
How useful was this article?
(From 5 = Very Useful to 1 = Not Very Useful at all):
1 2 3 4 5