Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to host a website on the Internet using Visual Web Developer

I just started working with ASP.NET from last two weeks and I created a website on Visual web developer.
I'm trying to put my website on the net.I tried to find it through google but it's very confusing and incomplete.
Please can anybody tell me how to use IIS to host a web server on my PC. If you think I need to learn more before doing this please suggest some online material to help me out.

like image 995
Naresh Avatar asked Mar 03 '26 14:03

Naresh


2 Answers

The basic point to add your site on iis, on a server is.

  • DNS, setup the domain name on your server.
  • Create a pool (if not exist) for the new site.
  • Create a new site on iis, and apply to it the pool.
  • Make sure that all directories and files have the correct permission that are connected to the pool running account.

Usually all this steps make automatically by provider, and provider gives yous an ftp account, and a web page to manage them. Using the ftp account you upload your files to the server, and using the web page you can manage some details about the run.

Now all that in general have too many details, but if you know the basic steps and google them I believe that you can go to the next step.

About dns

I use the BIND dns server to manage my dns on the server. Dns by him self is a full person job, is not that easy, but some tools do all that automatic like PLESK.

About pool

The pool can run many site together, or only one, can have many threads, or only one. Can setup to run on asp.net ver 2 or ver 4. This is all depends from you and your setup. The pool is very important to make your application run smooth. Start with one thread and add more threads only if you have design your site to run on more threads with synchronization. Check the limits of the pool that recycle your app, because if you add too little memory as limit to recycle then your app can recycle all the time and not run smooth. Use the process explorer to find the amount of memory your pool need when you run it for some time, and then setup this limits.

About permission

The asp.net site that you upload it running by the pool that assign to it. Now the pool let say that is run under the user name:ASPPOOL. The next think is that all your files and directories on your site must have permission to be read by the ASPPOOL. Extra permission can add to the database files, to have access to read/write.

All together

Provides usually use a manager program like PLESK to automate all that steps.

If you with to run it locally on IIS5.1

In this case only you can see the site. So you avoid the dns, but you can add your site name on c:\WINDOWS\system32\drivers\etc\hosts file for better debugging. Also you can avoid the difficult permissions. And the pool on iis 5.1 is run only under one thread.

Hope this help.

like image 78
Aristos Avatar answered Mar 06 '26 02:03

Aristos


I think you're missing the point here. Visual Web Developer is an IDE and not a web server. While VWD does include Cassini, which is a cut-down development version of IIS for local development only. If you want to host a site that is accessible to the wider world via the internet then you need to host it on a hosting server that is connected to the internet.

Of course you could run IIS locally on your own machine and host it there, but you would require your own internet connection to have either static IP address or use a service such as DynDNS to map a domain name to a dynamic IP address. Also you would be opening your own machine and network open to potential issues, as you would be widening your attack surface area.

I would strongly suggest that you look into a simple hosting account and get it working on there. It would be a much simpler option for you if you're unsure of what you're doing.

like image 43
Ira Rainey Avatar answered Mar 06 '26 04:03

Ira Rainey