Avatar of cass27

asked on 

Deploying first asp.net 2,0 site

I am working with Visual web developer and also a host called 1and1. i am having a great difficulty uploading my site to the web. i was told by 1and1 i need to direct it to the root folder of the server and then redirect it using an EnableSessionStateScript. See below:

<%EnableSessionState = False

host = Request.ServerVariables("HTTP_HOST")

if host = "test.com" or host = "www.test.com" then


end if

Which i have filled in the best I can. but it does not seem to rectify any problems. At the moment i am getting very confused as 1and1 are giving me varying ideas about how an asp.net 2.0 app should be uploaded. i have been told (a) you have to use a html index page. then i was told you dont have to use a html index page but the default page cannot have a capital letter D. Is any of this true?? The helpline seems to be clutching at straws as i am.
My website is www.alphatest.co.uk. please help me with this as it is sending me mad. the error message i am getting is:

Server Error in '/' Application.

The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

Requested URL: /Default.aspx

I can forward web congig set up etc if nec.

Visual Basic ClassicWeb ApplicationsVisual Basic.NET

Avatar of undefined
Last Comment
Avatar of Autoeforms

not sure about 1and1
first you need to be sure that iis on the server is set to run asp 2.0
next you should be able to dump your working directory structure in as it stands
you don't need index.htm.
it can run in a sub folder as long as the permissions are set right.

i used to be at godaddy util i ran into major problems.

i am now at hostmysite. tech support is great
they answer the phone and have a clue.
better yet they can help you monitor your site to insure it is running at its best.

if your problems and frustation continue give em a try.
good luck

Avatar of Ajay Sharma
Ajay Sharma
Flag of India image

hey just put ur BIN folder to the root of application (in the HTTPDOCS).
Then put all ur .ASPX files in root of application (in the HTTPDOCS).
dont put the .VB and .resx files
Avatar of cass27


Sorry ajay. i am very new to scripts. I dont appear to have a bin. i created the app on Visual web developer. can i just creat a bin folder? What exactly is a bin folder? And to sound really green what do you mean by my HTTPDocs? Where are they?
Avatar of Autoeforms

the bin folder is where the compiled code goes
if you look in your web site on the local machine you will find one there
probablly with a dll with your project name.
put the contents of this on your remote web site.
the aspx files go in the root folder right above the bin folder

Avatar of cass27


sorry to sound really dumb but i realy dont have a bin folder. i have web config, I have app data but ther e is no sign of a bin folder. So...Can i create one myself and if so. what do you mean by compiled code.? is this files I should but in there myself or does the process do it automatically. Also, do i need a bin fil locally and remotely?

Avatar of Autoeforms

do you compile your application
Avatar of Autoeforms

And for the record I don't believe there are any dumb questions.
What is totally obvious to one person could be totally foreign to another
Avatar of cass27


thank you for that. Well this is really foriegn. I wrote the code in the aspx files and i created the data base in sql express in Visual web developer if that is what you mean by compilng. does this help?
Avatar of Tanglin05


You can simply create a bin folder in your application if it does not already have one. In your Solution Explorer, you should be able to right click, select "Add ASP.NET Folder...", and choose "Bin". There is nothing special about this folder other than it is where ASP.NET looks for compiled code when you run your application. That said, I don't think the Bin folder has anything to do with your issue.

Let's start from scratch.

1and1 has probably provided you with an FTP account to upload files to your hosted space. When you log-in to your FTP account, upload all of the contents in your web application to the root of your FTP space. That will make all of the files available at the root of your application, such as:


If you upload you entire web site folder to your host, then your files would be located here:


You would also need to make "FolderName" a web application in IIS, but I'm not sure 1and1 gives you that kind of control. I've only used DiscountASP.NET in the past for shared hosting, and they do give you that control. (Aside, if you get too frustrated with 1and1, I can't recommend DiscountASP.NET highly enough for hosting .NET websites.)

As a simple test (.NET stuff aside), try uploading a basic HTML page to the root of your application and see if you can reach it in your web browser. If that test works, we'll have at least established that we know where to upload files. From there we can make sure the .Net stuff works.

Let me know how it goes.

Avatar of cass27


Hi Todd,

Taking your advice bit by bit. I went into Solution explorer and put a bin in the site. I did not put any files in it. It did not change anything. Still i now know where the bin folder is!

Yes, I do have a 1and1 account.
Now. Uploading. 1and1's helpline has been confusing me. I often get advice from 2 different technicians that contradict each other. for instance, at one time I was told to point the site at the root and then with the aid of an EnableSessionState script (I am still in the early months of learning VB) redirect to where the folder is containing the files.
This did not work though it did load the index file i put it in. (I put the Enable SessionScript in the index file). I have also been told that a site can only read default with a lower case d! (they are lower case at the moment.). I spoke to a second worker and they told me to point at the folder. I never got a chance to try the default with the EnableSessionState. I am not sure how i would write it anyway as it is encompassesed by <% which do not go in a aspx file.
I dont want to sound dim but when you mention test.html (do you mean my index html? What if there is no html, only a Default aspx?).
I have made a folder in IIs. the same name as the folder on the local computer and the remote server. This is also a virtual folder
Throughout my great frustrations i have also seen an error page that talks about a Run Time error.
Well. that just about covers it. I use Visual web developer which apparently makes virtual folders for you.
I feel like going to another host but i have a feeling i am just going to get fobbed off by people who dont really know what to do.
Anyway what do you think.
Avatar of Tanglin05


I think you'd enjoy DiscountASP.NET if you are serious about changing hosts. They specialize in ASP.NET hosting unlike 1and1, which offers many different services.

But that said, we can still try to get your 1and1 service going. First off, forget about all of the "Enable SessionScript" stuff you've been told. I've been developing .NET websites for years and I even find that advice confusing! Let's try this course of action:

1. Delete all of the files you've uploaded to 1and1. We want a fresh start.
2. Upload a simple default.aspx page to the root of your web hosting account.
--a. By simple, I mean just a "Hello World" page to get started. No data access. No coded. etc.
3. Navigate your web browser to www.alphatest.co.uk/default.aspx
4. You should see your basic Hello World page. If you don't we have more problems to diagnose.

If you get that far, then we can upload the rest of your site to your hosting account and conduct additional tests. Let me know how it goes.

Avatar of cass27


Bad news . I sent up a default page. copied files to the virtual folder in IIs, (do i need to do this?) and uploaded to the old folder. (I gave the web site the same name.) Same error message.
Could this be permissions in IIs? Or something to do with the web config which i have to admit i dont unmderstand enough.
The idea of going to discount asp.net sounds good but Im very wary. Helplines in the past have been little use. If I cn just find where Im going wrong here, Im sailing.
your time is appreciated
Avatar of A8Z

I think 1and1.com only supports ASP.net 2.0/.NET if you have the $20/month 1&1 MS Developer package.  Double check that you have this.

If you do not have this account, I think you will actually be running on linux with Resin as an asp server.

For windows, the case of default.aspx or Default.aspx does not matter.  Put the text you have in a file named default.aspx.  Also, I think you have some work to do on that script.  For example, you are missing the closing "%>" on the first line containing EnableSessionState.
Avatar of Tanglin05


I still think you're trying to do too much at one time. We need to establish the basics work before we copy all of your files 1and1. That said, I'd still suggest you delete everything from your 1and1 hosting account and -only- upload a single "default.aspx" page to the root of your web account with some "Hello World" text. Try to navigate to this simple default page and see if it displays properly. If it does, we've determined that .NET is running and you know how to access your site's pages. We can do more once that works.

Also, in regards to DiscountASP.NET, I don't think you need to worry about their support. I've always had great response times from their help desk in the past and their ASP.NET hosting is really second to none (in the shared hosting category). I actually use 1and1 for hosted Exchange service, but when I had shared hosting I used DiscountASP.NET (for web and SQL Server hosting).

Either way, let's get the basics nailed down.

Avatar of cass27


It works! I just pointed the whole thing at the root and it works.....well almost.
For some reason i get the error page(my error page for users if something is wrong) even though it is adding a name to the newsletter database. Work that one out. I'll copy the code if you like. The main thing is-it is at least up and running even if not full steam.
Avatar of Tanglin05

Blurred text
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Visual Basic Classic
Visual Basic Classic

Visual Basic is Microsoft’s event-driven programming language and integrated development environment (IDE) for its Component Object Model (COM) programming model. It is relatively easy to learn and use because of its graphical development features and BASIC heritage. It has been replaced with VB.NET, and is very similar to VBA (Visual Basic for Applications), the programming language for the Microsoft Office product line.

Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews


IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo