INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Newbie Question

Newbie Question

(OP)
Hello, I have extensive experience building Classic ASP websites and uploading them to a Server via FTP.

I am now looking to host my own website on my newly purchased machine (Windows Server 2012).

I know how to host a normal static website. You install Web Deploy, create the website in IIS, point it to the folder on your machine and point the domain name to your server via DNS.

I am now attempting something a bit more advanced and need some advice.


I have created a Web Application project in Visual Studio. You may have come across the project before...
Wingtip Toys Wingtip Toys Tutorial.

So I have basically followed that tutorial and built a functional shopping cart website on my machine. I can test the website via localhost.

I am now trying to understand the process of deploying that asp.net website to my public domain.

I believe that you can use Microsoft Azure to deploy your .net application to the web, but do you still need to have the website created in IIS before hand? Also I understand that the website needs to be 'compiled' as opposed to the traditional FTP method.

Any advice on this last step (deploying a visual studio website application to a public domain via azure) would be most appreciated.

Thanks
Antony





RE: Newbie Question

It's hard to answer your question, as I don't know the exact setup you have. I don't have much experience deploying Azure websites, because we use cloud service projects to deploy. I simply right click and and choose Publish. This of course is simple after the profile is set up.

You need to know a few things to help you research. Is it a website, or web application project? I know you said it was a project, but double check to be sure. There is a lot of documentation out there to help.
Keep us posted, and I will try to help as you go along

RE: Newbie Question

(OP)
Ok so here's my next question.

I have followed the tutorial and successfully built their sample website.

The website was created completely within Visual Studio (project file).

The website is connected to a database, it allows users to login and register and comes with a shopping cart.

In Visual Studio when I hit F5 the fully functional website is presented to me in my browser (localhost).

Am I able to 'Publish' this fully functional website to a public domain name directly from Visual Studio?

If I am able to do this, do I still need to have my website set up in IIS using the traditional 'create website' method?

RE: Newbie Question

Again, I don't know what your set up is. Is it in Azure, an Azure VM, or are you using a hosting company like GoDaddy?
So each one of these will affect how you deploy your website.

RE: Newbie Question

(OP)
I am using a 3rd party company (UK FAST).
I basically have a virtual server with them.

The nameservers for my domain name point to UK FAST.
The DNS records for my domain name point to my virtual server IP address.

Everything is ready for me to host the website on this virtual server.

RE: Newbie Question

(OP)
At the moment I do not have Azure installed. I do however have IIS installed and Visual Studio and the website I have created within Visual studio works perfectly on my virtual server's browser as localhost.

RE: Newbie Question

Well, you don't technically "install" Azure, you just connect to it through different M.S. accounts.
So you have your local website working, now you can deploy to where ever you need. Let's say you are going to use a hosting company, you now copy your code over with what ever tools they allow. It may be FTP or something else.
In this case, to answer your question, yes, you now have to set the site up in IIS. Now, the here is the catch. Depending on the hosting company, they may or may not give you access to do it, they may have to do it for you, so you would have to give them all the setup info they need. But in the end, for this type of set up, IIS will now need to be configured with an application pool and domain name etc. in order to run the site.

RE: Newbie Question

(OP)
Sorry if I wasn't being clear. I have FULL access to this virtual server. I connect via Remote Desktop Connection. I am freely able to install/uninstall IIS, have full access to File Explorer and Server Manager.

I can basically do anything as if it were my own server.

So... if I can set up my domain name in IIS (a test .html file) and my website points to that folder, how easy is it to publish the visual studio website to the domain name?

RE: Newbie Question

If you have full access to the server and can RDC to it, then just copy and paste your files to the folder you are pointing to.
It couldn't be easier than that, since you have full access

RE: Newbie Question

(OP)
Well that's handy!

I was hoping that was the case :)

So I can just copy the entire contents of my Visual Studio 'Project' folder and paste it into the root of my website.

Simple as that is it?

RE: Newbie Question

(OP)
I basically copied the entire contents of my project folder into the root folder of my webspace (including the default.aspx file) and when I viewed the page I received page not found.

Not as simple as I thought it seems.

RE: Newbie Question

You'll have to go into IIS and figure out what the problem is. Hard for me to help you with that.
Make sure you have all the files in the root of the folder and not in a subfolder that would throw off the path

Make sure you have default.aspx set as a default page.

Make sure your folder is set up as an application just as you did on your local machine

RE: Newbie Question

(OP)
Hello again. OK so the problem I was facing was that I did not have the .net module installed and therefore the server was giving me 404 errors when I tried to use a default.asp or default.aspx as the default page.

I have now resolved this problem and can successfully view a .asp page as the homepage on my domain.

So, I just want to clarify one more time.

If I copy the entire contents of my Visual Studio project (which includes a default.aspx file, .cs files, XML files etc) into the root folder of my website, the website should work exactly as it does when I press F5 within Visual Studio itself?

Is this what you're saying? It's as easy as that?

RE: Newbie Question

(OP)
Ok so as mentioned I have installed the .net module.

There is now an aspnet_client directory in my root directory.

I can see the default.asp page but when I try to create a default.aspx page I receive 403 forbidden access.

Both page names are listed in my default document list.

Anybody know why this is happening?

RE: Newbie Question

(OP)
OK, I'M GETTING SOMEWHERE!

I'm basically following this tutorial:

http://www.asp.net/web-forms/overview/getting-star...

I create the Project.
I publish the Project using 'File System' and the files are copied to my root folder.

The default.aspx file is set as the start page and when I load my domain name I am able to see the start page.

The problem I am having is that when I try to connect the website to a database it stops working.

My problem arises on this page:
http://www.asp.net/web-forms/overview/getting-star...

If you scroll down to three quarters of the page you'll see a heading: Adding a Data Control to Display Navigation Data

THIS IS WHERE THINGS ARE GOING WRONG!

The page works fine when previewing in Visual Studio (localhost) but when I Publish I get a 500 error on the website.

I figured I may have to grant IUSR permissions to read from the database file or directory but:

a) I thought Visual Basic would do this for me
b) I don't know where the database is held because there does not seem to be an App Data directory in the root folder after Visual Basic publishes the project.

Somebody help me!


RE: Newbie Question

(OP)
Ok so I have basically right clicked the database in visual studio and selected 'include in project'.

I then gave IUSR permissions to 'Read' from the App_Data folder which holds the database.

Still cannot get it working. Website just freezes and gives runtime error.

:(

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close