MINI SUPPORTERS:

 

 

Creating a Simple ASP.NET Application - Page 4
       by kirupa  |  30 July 2006

Already, you are on the last page. You typed in some code, drew a label component, and setup your project in the previous pages. In this, the last page, you will test your application in the browser and learn how to publish it online.

  1. Now, let's Build the solution - the name for a project and its related files. Go to Build | Build Solution or press F6. Your Build should pass without producing any errors or warnings:

[ your Error List panel ]

  1. Let's test out this program in the browser, which is, after all, the intended vehicle of delivery for an ASP.NET application. Go to Debug | Start Without Debugging or press Ctrl + F5. After a few moments, your browser will load with the hello, world text displayed as shown in the image below:

[ hello, world displayed in the browser ]

Well, it might seem like you are done. After all, you can see hello, world in the browser. The problem is, that others won't be able to see it, for the ASP.NET Web Server that is running right now to display your application will turn itself off the moment you exit out of Visual Studio or Visual Web Developer. We need a more permanent solution.

Publishing your Application
There are two ways you can have make your application viewable by others. You can either use a 3rd party server with .NET support, or you can install IIS and .NET locally on your computer. Instructions on how to setup IIS with .NET can be found in this tutorial.

I will explain how to publish to a 3rd party server, for that would be the easier to explain in this tutorial without deviating into the issues associated with configuring your local IIS server to run your applications.

Note

The server you are publishing to must be capable of running .NET 2.0 applications.

So, with your project open, go to Build | Publish Web Site.

[ publish your web site via the Build menu's Publish Web Site item ]

The Publish Web Site window will appear. In the Target Location field, enter the location you wish to Publish your application to:

[ enter a location where you will be publishing your web site to ]

Press OK after you have entered your target location. You might be prompted for your server username and password if you are using a remote server like I am. A few moments later, your application can now be previewed online at the location you specified.

My published example can be seen at the following link: http://www.kirupafx.com/HelloWorld/Default.aspx

When you view the HTML source to the above link in your browser, you will see that everything is in HTML. The data you entered in the code-behind file in C# such as the name of your label, etc. is not displayed.

Need Help?

If you have questions, need some assistance on this topic, or just want to chat - please drop by our friendly forums and post your question. There are a lot of knowledgeable and witty people who would be happy to help you out. Plus, we have a large collection of smileys you can use

Share

Did you enjoy reading this and found it useful? If so, please share it with your friends:

If you didn't like it, I always like to hear how I can do better next time. Please feel free to contact me directly at kirupa[at]kirupa.com.

Cheers!

Kirupa Chinnathambi
about | facebook | twitter


 

1 | 2 | 3 | 4

SUPPORTERS:

cloud storage
cloud storage
kirupa.com's fast and reliable hosting provided by Media Temple. Creative web apps. Make your own free flash banners and photo slideshows.
HTML5 CSS3 Mobile Gallery for iPhone, iPad Flash effects. Art without coding.
Flipping Book - page flip flash component. Flash-Gallery.com - Get your flash photo gallery (flash component or swf gallery
X-Platform Application Development for Flash Free Flash Components Download - XML Templates, Players and Galleries.

two computer monitors

US Direct

Learn how to advertise on kirupa.com  
 
SHARE:



MINI SUPPORTERS: