Quick start: Hosting your ASP.NET Website in IIS

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi this is Michael Kennedy and I'm going to talk to you about hosting your website when it's built on the Microsoft stack you have many choices on how you can host your site you can go to a commercial hoster and just by hosting they'll set everything up for you and typically you publish through FTP or something like that that's one way a more common way maybe would be to host it yourself within your own data center maybe you're a large corporates corporation you run your own servers you can host it there another really popular and growing trend is to host your site in Microsoft Azure and we'll see how to do that later in this particular video we're going to talk about how do you set up your own hosting on your own servers so there's two steps we're going to host our website in is let's check out a few things before we actually get there so you can see that we can run our website and here's a cheesy little wacky web world website and you'll see that we can host it here it seems to be running in a server and that's true in the development mode so if we go down here you can see this is is Express this is fine for development but it won't do for production hosting okay it just doesn't have all the capabilities and things you need this is for testing and development it's not a production web server what you need is is so in order to install is you have to go and add those features to Windows typically they're not installed by default on Windows 8 one which I have here you can go to turn Windows Features on and off and you'll see Internet Information Services or is as we call it for short and we want the application server features for asp.net and you probably want the web management tools is management console so you can actually work with the thing now if you do this on Windows server typically you do a slightly different way to install this you go and add roles to your server so you need to add two roles you need to add the application server and the web server for is so either way you get installed once you have it up you'll be able to run is so we come over here and just type is for Internet information service manager and open this up so imagine this is a remote machine we could Remote Desktop 2 or something like that we'd like to create a new website this is in our own data center right so we can say add website super easy we give it a name this is just a friendly name it could be anything you like but let's pretend we're going to host our wacky wacky web world site from wacky web WorldCom or something like that okay so we'll come over here and we'll say this will just be wacky web WorldCom something like that let me copy that we'll need in a few places then we need to pick the application pool you can see it's going to create one this is basically the process that your site runs in and over here in the physical path we can put it somewhere I typically like to put this on to a second drive I wouldn't really choose the CD drive and maybe drive D we'll call this WWE over here and within there I'd probably create something along the name of the site because you might have many sites hosted on your server this is easy to do as you'll see in just a second so what you'll do is you'll go map from your domain your domain host people that control your domain name you'll go to your DNS settings and map them to this server whatever its IP address is and then the server will see the inbound request in the URL for a particular host and it will differentiate between different server different websites using that so we'll just put this here alright so now we can come over here and talk to our site I've already mapped that domain to this local machine so I can go to wacky web worldcom and it runs for a second and says error you can't list this directory that's because we haven't published our site so if we want to publish our site we have a couple of options we can come over here and right click and say publish this is great where we can just copy these files but we'll end up with extra stuff the CS files and various other compilation artifacts that really don't belong there so what I'm going to do is I'm going to say I want to publish this website and for now we're just going to use a local custom one here this will just be a local publish or whatever you're going to call it and this is just going to be published to the file system all right so maybe this is a network share or something in our world I put this over here on D wway key web world so we'll just put it there say next we want to publish release you typically don't want to publish a debug build and we could say clean out that area if you wish so that if we remove a file it's also later removed from the server and so now we can just hit publish you'll see down here it's going to do a copy copied over to here let's just try that like again refresh and give it a moment to wake up hello wacky web world wacky web world comm is online and our site is published so there's really nothing different about if doing this locally or to a network share that some server is exposing if you're going to push this some more farther out you very well may use the different hosting option I'm sorry different publishing option here go we might want to create a new custom profile call it whatever and pick web deploy but we need to set web deploy up on the server it's super easy to do but it's something you have to download and install don't have that setup and do it locally it's kind of silly to show you that way in another video when we talk about asier I'll show you how to use web deploy to publish to Azure alright so that's how you set up is take your website and publish to it you can either just copy the files sometimes that's FTP really the best way is to use web deploy because it kind of does the web config compilation transformations and all that kind of stuff that you need done and it drops it right where it needs to be you can even tell it after it's done going to open up a particular page like this one to make sure your site's working when it's published thanks bye you
Info
Channel: Michael Kennedy
Views: 625,118
Rating: undefined out of 5
Keywords: Microsoft IIS (Software), Website (Industry), Active Server Pages (Software), ASP.NET (Programming Language), Hypertext Transfer Protocol (Internet Protocol), Microsoft Visual Studio (Software), Screencast
Id: IwbKquNBNgQ
Channel Id: undefined
Length: 6min 19sec (379 seconds)
Published: Tue Jul 08 2014
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.