Advertisement

I made a test website on my computer. How do you publish it?

Started by December 18, 2016 08:03 PM
14 comments, last by hplus0603 7 years, 11 months ago

Following a tutorial til the end I now want to learn how to publish my website. I have the code I just need a host(I think, please don't get mad).

Generally, publishing an ASP.NET application involves deploying to an IIS server. If you haven’t already, you should practice by installing IIS on your machine, setting up an application pool, and creating a website from your project’s output directory.

If you want to publish on a public server, then you must first secure a domain name and a web server running Windows Server, configure the name server to point to your new web server, and then, use RDP to remote into your new web server and configure IIS from there.
Advertisement

As fastcall wrote, you need a webserver to host your site, and optionally a domain name. There are several ways of getting one of those - either a service that lets you host just a website, or getting/renting your own machine and installing webserver software on it.

It's going to be easiest for you to just use a.service. This is probably as good as any; it lets you try for free for a few days while you figure it out, and after that it's $1 / month. http://asphostportal.com/ASPNET-Core-1-0-Hosting.aspx

If you're feeling more adventurous, you can use a cloud provider that gives you a complete machine of your own, that you then put an operating system and webserver software on. Since your tutorial was for aspnet core, which runs on both Windows and Linux, you can use either of those operating systems. I'm hosting the web infrastructure for my game on linux boxes from these guys, which is cheap and stable and I wholeheartedly recommend. They'll sell you a full virtual machine with Linux for €3/month. https://www.scaleway.com/

If you want a domain name for your site, you'll have to buy a domain, and configure it to point to your webserver. There are countless places to buy and manage domains; google is one of those.

Generally, publishing an ASP.NET application involves deploying to an IIS server. If you haven’t already, you should practice by installing IIS on your machine, setting up an application pool, and creating a website from your project’s output directory.

If you want to publish on a public server, then you must first secure a domain name and a web server running Windows Server, configure the name server to point to your new web server, and then, use RDP to remote into your new web server and configure IIS from there.

Generally, publishing an ASP.NET application involves deploying to an IIS server. If you haven’t already, you should practice by installing IIS on your machine, setting up an application pool, and creating a website from your project’s output directory.

If you want to publish on a public server, then you must first secure a domain name and a web server running Windows Server, configure the name server to point to your new web server, and then, use RDP to remote into your new web server and configure IIS from there.

Okay, this self contained practice with a IIS server seems ideal. I tried installing IIS from the Microsoft website but when I run the installer it gives me the option to repair and remove IIS not install it. I looked else where and found this then that but I hit a road bump because I can't install something called "Server Manager" to use Add Roles and Features.

If you installed Visual Studio, you probably installed IIS Express (or whatever it's called now) as well. Repair/Remove are usually the options you get when you have something installed already.
Note that the "actual publicly facing server" version of IIS comes with the Windows Server operating system.
The "Express" version that comes with Visual Studio is quite limited in how much load / how many users it can support.
You may need to pay higher fees for larger sets of users served. This is how Microsoft makes money.
(Also, if your website also uses Microsoft SQL Server, that, too, may require licensing fees.)

Once you have it running on a server, you will need to make the server available to the general Internet.
This means you need a static IP, and a domain name that maps to that IP.
One way of getting a server on the public internet that can run this is to lease one from Amazon:
https://aws.amazon.com/windows/products/ec2/

Another is to lease one from Microsoft:
https://azure.microsoft.com/en-us/services/virtual-machines/

You will also need to register and pay for the domain name in question.
Many people use GoDaddy for this; I tend to avoid GoDaddy; Amazon, Google, and many others will sell you reliably domain name services.

Note that using IIS and ASP.NET for web sites is a "minority" technology choice. Most independent developers choose Linux as the server platform, and develop the site in HTML/JavaScript, and the servers in JavaScript or PHP or Python or whatever. Thus, you will find many more tutorials, advice, and low-cost options in that ecosystem than on the Microsoft side.
Also, there is lots of low-cost, high-quality hosting available, such as
Amazon Lightsail: https://amazonlightsail.com/features/
Linode: https://www.linode.com/linodes
enum Bool { True, False, FileNotFound };
Advertisement

Note that the "actual publicly facing server" version of IIS comes with the Windows Server operating system.
The "Express" version that comes with Visual Studio is quite limited in how much load / how many users it can support.
You may need to pay higher fees for larger sets of users served. This is how Microsoft makes money.
(Also, if your website also uses Microsoft SQL Server, that, too, may require licensing fees.)

Once you have it running on a server, you will need to make the server available to the general Internet.
This means you need a static IP, and a domain name that maps to that IP.
One way of getting a server on the public internet that can run this is to lease one from Amazon:
https://aws.amazon.com/windows/products/ec2/

Another is to lease one from Microsoft:
https://azure.microsoft.com/en-us/services/virtual-machines/

You will also need to register and pay for the domain name in question.
Many people use GoDaddy for this; I tend to avoid GoDaddy; Amazon, Google, and many others will sell you reliably domain name services.

Note that using IIS and ASP.NET for web sites is a "minority" technology choice. Most independent developers choose Linux as the server platform, and develop the site in HTML/JavaScript, and the servers in JavaScript or PHP or Python or whatever. Thus, you will find many more tutorials, advice, and low-cost options in that ecosystem than on the Microsoft side.
Also, there is lots of low-cost, high-quality hosting available, such as
Amazon Lightsail: https://amazonlightsail.com/features/
Linode: https://www.linode.com/linodes

This is only an experiment, I'm not expecting high traffic although the mention of minority technology does worry me. I'll followed this tutorial through and I'm not sure if my site uses Microsoft SQL Server but I do want a host and I really don't want Microsoft SQL. Would you happen to know how I can check?

As fastcall wrote, you need a webserver to host your site, and optionally a domain name. There are several ways of getting one of those - either a service that lets you host just a website, or getting/renting your own machine and installing webserver software on it.

It's going to be easiest for you to just use a.service. This is probably as good as any; it lets you try for free for a few days while you figure it out, and after that it's $1 / month. http://asphostportal.com/ASPNET-Core-1-0-Hosting.aspx

If you're feeling more adventurous, you can use a cloud provider that gives you a complete machine of your own, that you then put an operating system and webserver software on. Since your tutorial was for aspnet core, which runs on both Windows and Linux, you can use either of those operating systems. I'm hosting the web infrastructure for my game on linux boxes from these guys, which is cheap and stable and I wholeheartedly recommend. They'll sell you a full virtual machine with Linux for €3/month. https://www.scaleway.com/

If you want a domain name for your site, you'll have to buy a domain, and configure it to point to your webserver. There are countless places to buy and manage domains; google is one of those.

I'm having a few problems deploying My ASP.NET core application to IIS. My version of windows 10 isn't good enough as it seems. I'm going to look into deploying this application into IIS but my situation seems grim.

The tutorial I follow

Right, this is the draw-back of Microsoft technologies. They cost money to get started!
Linux has managed to become a contender because the up-front cost is zero.
(Also, a lot of people feel the ongoing costs are lower, too -- but that's more of a case-by-case thing.)
Yes, if you followed the tutorial you initially linked to, then the storage for your movies lives in a SQL Server database. The "express" version may be enough for small sites.
The Visual Studio ASP.NET integration is very nice, though; much slicker than most tools for the Linux side which are very text-editor-based.

Did you try the "Host in the Cloud" checkbox? I think you can use a free trial Azure account to try that out.
enum Bool { True, False, FileNotFound };

Right, this is the draw-back of Microsoft technologies. They cost money to get started!
Linux has managed to become a contender because the up-front cost is zero.
(Also, a lot of people feel the ongoing costs are lower, too -- but that's more of a case-by-case thing.)
Yes, if you followed the tutorial you initially linked to, then the storage for your movies lives in a SQL Server database. The "express" version may be enough for small sites.
The Visual Studio ASP.NET integration is very nice, though; much slicker than most tools for the Linux side which are very text-editor-based.

Did you try the "Host in the Cloud" checkbox? I think you can use a free trial Azure account to try that out.

So you're saying the tutorial I followed does uses Microsoft SQL Server? (If it doesn't)I think I'll try my luck with deploying to IIS first. I researched Azure and that seems to use Microsoft SQL server.

On the fourth page of that tutorial, it tells you that you're working with the database:
https://docs.microsoft.com/en-us/aspnet/core/tutorials/first-mvc-app/adding-model
enum Bool { True, False, FileNotFound };

This topic is closed to new replies.

Advertisement