Hello

I have compiled a simple 'new user' form and now wish to upload it using FileZilla and view it on my site. As other files occupied the root of the server, I was informed that one way to overcome that issue was for my hosting service to create a 'virtual' folder to accommodate my form. It's a concept I am not familiar with, but my hosting service has now done that.

I am not sure, however, where on the server to upload my project to! I am attaching a screenshot of what my server looks like, and would be grateful for any suggestions.

Thank you.

Your provider should be giving you instructions regarding the path to store your files using an FTP client such as FileZilla.

Why couldn't you store the form on the root or a subfolder?

Hello JorgeM

Oh, OK. I'll ask my hosting service about the path to store the files.

I was told elsewhere that I couldn't use a subfolder for my aspx project, and that if I couldn't store it on the root, I needed to create a virtual directory. To me, it is all 'virtual'!

I could have used the root, but that is the home to all my main pages and images and various scripts, and I didn't want to litter it - that's all. It was just me trying to be 'tidy' and keep things organised in my mind.

Thanks again for your post, Jorge.

So, that's correct, you store your web on the root, but i guess my question is that why dont you simply create the folders you need to be tidy and simply add pages such as the page that has your form to those subfolders?

Not all of your files are required to be on the root directory.

For example..

Root
-bin
-images
-styles
-subfolder
--form.aspx
default.aspx
web.config

If you need to run a seperate, complete new web app, off the root, then yes, you can do so with a virtual directory. YOur provider can create that virtual director, or they may be giving you the ability to do this via the "control/admin panel".

Hello again, Jorge

Oh, I see. So my Register.aspx, aspx.vb, etc can go in a sub-folder while the other files and folders need to go on the root (please see attached screenshot of my project's compiled folder).

Yes, my hosting service has created a virtual directory so that I can run my aspx form off the root, and I have now asked them which folder I should be uploading my project to as it's not too clear to me (I haven't been doing this long).

Thanks again for all your pointers.

Blue

Yes so they provide you a root folder, and this root folder is mapped to a URL. Say, www.domain.com.

Now on this root folder, you can place all of your aspx files on the root folder, or you can create subfolders and keep you files neat and tidy. So for example, say you create a subfolder on the root called "account", now within the account folder you can have files called "profile", "register", "password", "abc", or whatever. If you want to access the page called profile, the URL would be www.domain.com/account/profile.aspx.

The "account" folder doesnt have to be a virtual folder in this example.

Now, say you buy a forum web application. This web application can run on its on, but you want to run it on your existing web application. You can have your provider create the virtual directory, assign its own app-pool and then you can copy the files from this forum web application there.

hope that makes sense...

Hello Jorge

Yes, I think I know what you mean.

I will try the first part of what you suggest where 'account' folder, in your example, doesn't have to be virtual.

In your second part, you mean copy all the compiled files I have on my desktop into the virtual directory on my server so that they run not on their own, but as part of my existing site.

I think that's what you are saying, but I will create subfolders on the root first, as you suggest in the first part of your message, and see if I can get things moving.

Many thanks for all your advice.

I'll post back to let you know how I have got on, if that's OK!

Blue

Sure. Keep in mind that if you have a complete web app, you can upload that into a virtual directory.

But I just wanted to try to help clarify the purpose of the different types of folders.

If you have been given an empty root, just copy your files as they are saved on your local machine to that location. Since you have probably been using relative paths in your code, as long as your directory structure remains intact, your app will continue to work fine.

Hello Jorge

I recompiled my aspx project just to begin afresh, and I have them on my desktop in a folder called myForm (screenshot). I uploaded 'myForm' - the whole folder - as a subfolder of root. I think I have followed your guidelines, haven't I?

(I am trying it this way before I get involved with the virtual folders - my Web hosting service is still dealing with my query from yesterday).

However, if I now go to Click Here, I get a runtime error ('An application error occurred on the server') that asks me to create a <customErrors> tag within a "web.config" file.

However, my Web config file already contains:

<?xml version="1.0"?>
<configuration>
   <system.web>
      <customErrors mode="Off"/>
    </system.web>

Does that indicate to you that the problem is on the server side of things?

Thanks again.

Ok so 1st comment that comes to mind is compiling. There really isnt a reason to compile your website for it to function. There are other reasons for compiling but im not going into that at this time.

assuming that your web application is within hte myform directory, you should be able to copy the contents of this subfolder onto the root of your website.

With regards to errors, if you add the sample xml markup, yes, it should provide you with more details with regard to the error. You can also enable debuging while trying to solve problems. HOwever, your site will run slower and your provider may not care for you running your site in this mode (they may be blocking it actually).

<configuration>
    <compile debug=true/>
</configuration>

If I can make a suggestion...

Why dont you try a simple example. In Visual studio, create a new, blank website and practice uploading this to the provider?

This website should have only a few files... default.aspx and web.config

There is no need to compile. Once you create the website on your local computer, all you have to do is run your FTP program and upload it to the root of the website on the provider's platform. That's it. If you get that basic understanding, you can then practice createing subfolders on your local copy, add more files, then upload again (no compliling needed).

Hello Jorge

Well, yes, my aspx form is within the myform directory, and that directory is a subfolder of root.

Yes, I think it's a very good idea to create a simple example using only default.aspx and web.config. I'll try it.

Thanks again!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.