Options for Testing and Running ASP.NET Web Pages


Your ASP.NET Web pages won t be very interesting unless you can run them on a Web server. And even if you can run them on your local computer, you ll probably want other people to get to them, too. In this section, I ll describe some of your options for testing and running your Web pages.

Working with ISPs

You probably already have an Internet service provider (ISP), and your ISP might provide you with a place to keep personal Web pages. However, you can t run ASP.NET Web pages on just any Web server the Web server has to be running IIS and it has to support ASP.NET.

It s always worth investigating whether or not your ISP can host ASP.NET pages. Take a look at your ISP s information site or send an e-mail message to its support staff and ask whether your ISP supports ASP.NET applications. Unfortunately, although most big ISPs such as MSN, AOL, and AT&T allow you to maintain personal Web sites, they don t support any of the components you need for creating applications with ASP.NET. It s not anything personal they have against ASP.NET most of the big ISPs don t support any form of Web programming. So if you normally use MSN or a similar provider for your Internet access, you probably can t create an ASP.NET application and then put it on your personal Web space; instead, you ll have to investigate other options.

Finding an ASP.NET-Friendly Hosting Site

A practical option for running your Web pages is to find a hosting site that does support ASP.NET. You could then either make the site your full-time ISP or use that hosting site for just your ASP.NET work while maintaining your current ISP.

You can find a list of hosting sites that support ASP.NET by going to the Microsoft ASP.NET site (http://www.asp.net/) and clicking the Resources tab. Some of the sites are free, but most are not. Some sites might even allow you to host your own domain name on their server. You ll need to contact the individual host sites for specific information. Be sure to find out about data access, too. Some hosting sites provide access to Microsoft SQL Server, usually for an extra fee. You ll work with data quite a bit in this book, so it ll be very helpful to have access to SQL Server on your hosting site.

Hosting the Site Yourself

As mentioned earlier in the chapter, if the version of Windows that you re running on your computer is Windows 2000, Windows XP Professional, or Windows .NET Server 2003, you can run IIS on your computer. In that case, you can host a site yourself, and people can browse directly to your computer to run your Web pages.

One option for hosting the site yourself is to get your own domain name and specify your local computer as the host site. You can learn more about this option by consulting Building a Community Information Network: A Guidebook (Library of Michigan Foundation, 1999). Even if you don t have your own registered domain, people can access your site using your computer s Internet Protocol (IP) address (the unique identifier for your network card). For example, if your computer s IP address is 10.231.40.54, people can connect to your computer using a URL such as http://10.231.40.54/yourapplication. Realistically, this option is practical only if you have a broadband connection such as DSL or cable. If you have dial-up access, you re probably better off finding an ASP.NET- friendly hosting site. One thing to be aware of is whether or not your computer has a dynamic IP, meaning that your ISP assigns you a different IP each time you establish a connection to it. You ll need to investigate with your ISP as to whether the IP address you get is dynamic. If your ISP assigns you a dynamic IP address, you can subscribe to a dynamic DNS service that gives you a fixed name and then ensures that the name always maps to whatever IP address your ISP has assigned you. To find a dynamic DNS service, search the Web using the term dynamic DNS and then read what each service vendor has to offer.

In general, hosting the site yourself is simple because you don t need to copy your Web pages or data to a hosting site. However, you have to concern yourself with Web administration issues such as security. Web administration is definitely not for casual users.

start sidebar
Hosting and Security

I hate to bring up such an unpleasant topic so early, but an unfortunate fact of life when working with Web pages is security. If you re not intending to host your own site and are developing and testing on a stand-alone computer, you might not be open to hacker attacks directly. Even so, you need to think about the day when your Web page does get published to a Web site and exposed to the world. To be more direct: you must understand the security issues associated with Web sites, IIS, and ASP.NET.

As mentioned, if you intend to host a site yourself, you ll need IIS, which means that you ll be taking on the responsibilities of a Web site administrator. Among your most important responsibilities will be that of keeping your IIS-based site secure.

This book doesn t really have the scope to discuss the many interesting issues associated with running IIS. However, here s a general list of high-level security issues that you ll need to think about if you re using IIS to host a site on your computer:

  • Firewall  Don t even dream of hosting a Web site without a firewall, which is software that sits between your computer and the Internet and polices the requests coming in to your computer. In fact, you shouldn t even be connecting to the Internet without a firewall. You ll need to configure the firewall to allow HTTP access to your site. Many people like using a router, which is a device that joins multiple networks together and offers a number of advantages, including a built-in hardware firewall.

  • Lockdown  In terms of computer security, a lockdown is the process of disabling any process that isn t essential to running your computer. The lockdown helps reduce your vulnerability by shutting off processes that hackers might try to leverage to get into your computer (and often, processes that you didn t even know were running). Microsoft has a lockdown tool specifically for IIS. I have included instructions on downloading and running the lockdown tool in Appendix A.

  • Patches  Microsoft publishes periodic updates to Windows, IIS, and other software (including the Microsoft .NET Framework) as it learns about and fixes security vulnerabilities. As a Web site administrator, you need to stay current with these patches know about them, understand what they fix, and above all, install them as soon as you can. The Microsoft Security site (http://www.microsoft.com/security/) lists up-to-the-minute news about security issues and includes links to patches.

Keeping your Web site secure is very important, so I ll be talking about it at various points throughout the book. In addition, Appendix A is devoted entirely to security issues, and I ll be referring to it throughout the book as well.

end sidebar



Microsoft ASP. NET Web Matrix Starter Kit
Microsoft ASP.NET Web Matrix Starter Kit (Bpg-Other)
ISBN: 0735618569
EAN: 2147483647
Year: 2003
Pages: 169
Authors: Mike Pope
BUY ON AMAZON

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net