Click here to Skip to main content
5,786,882 members and growing! (19,129 online)
Email Password   helpLost your password?
Web Development » ASP.NET » Utilities     Beginner License: The Code Project Open License (CPOL)

Light IIS (Run Asp.net without IIS)

By mohsen ahmadian

A way to run asp.net without IIS and any server component
Javascript, CSS, HTML, C# 2.0, C#Windows, WinXP, ASP.NET

Posted: 26 Feb 2008
Updated: 26 Feb 2008
Views: 8,658
Bookmarked: 20 times
Note: This is an unedited reader contribution
Announcements
Loading...



Search    
Advanced Search
Sitemap
11 votes for this Article.
Popularity: 3.00 Rating: 2.88 out of 5
4 votes, 40.0%
1
1 vote, 10.0%
2
0 votes, 0.0%
3
0 votes, 0.0%
4
5 votes, 50.0%
5
Note: This is an unedited contribution. If this article is inappropriate, needs attention or copies someone else's work without reference then please Report This Article

Introduction

I was reading an article about future software like web applications, and then I thought how to run a web application in client without internet connection and no Server component installation.

If you see all ASP.net Applications there are very user-friendly and you can use Ajax in asp.net applications and more components. On the other hand it was shown in a research many people were interested applications like internet forms and web browsers applications.

User-friendly rules forced you to flow users with all ideas and interests, if you would like your software be lovely.

I was thinking about above subject when I saw the Microsoft Visual Studio 2005 and its solution to run asp.net without IIS. Microsoft has an API for this work although this API is not published by .NET 2.0 but it's free because when you download free Web Developer Express from Microsoft site; setup of this program install this API. Called "WebDev.WebHost"

(If you have "Web Developer Express" Or "Microsoft Visual Studio 2005" you can find this API from %system root%\assembly\GAC_32\WebDev.WebHost\8.0.0.0__b03f5f7f11d50a3a\WebDev.WebHost. dll)

Using of WebDev.WebHost. dll

Use of this API is simple

  1. You must add this dll to your references project
  2. Add Microsoft.VisualStudio.WebHost to your namespaces
  3. Now Create an Instance of Server :
  4. Server s =new Server(port, virtual_path, physical_path);
    • port : a number between 1 to 65353 ( if you have IIS you cant set 80 for this)
    • virtual_path : this path show in address and not real for example if your virtual path is "mypath" and your port is 8080 address of this is : http://localhost:8080/mypath/
    • physical_path : path of folder have your web application, really on your system.
  5. Your IIS install !! now you only must start your server
  6. s.Start(); 
  7. Or Stop your Server
  8. s.Stop();
  9. If you need Url of your server check this property
  10. linkLabel1.Text = s.RootUrl;

Really Use

Well, now maybe you ask this question that what its use ?
  • If you have a program and you need a good help like MSDN, this is a new solution .
  • If you are an Asp.net programmer and need a client application this is a solution
  • If you are an Asp.net programmer and need to show your application to your customer without installing on a real host, this is a solution.
  • If you are a student and need to show your web application to your master.
  • If you wrote a client application and you want to connect it to your web service ,this is a way to test this
  • And more

Really not Use

Well, so far we learned that how to use this API, now we are going to tell you that when you don’t use it

  • When a big Web Application (big means important data not in size of pages)
  • When your transactions is important
  • When you write real program (your publish is commercial)
  • When you have more than one user

New idea and future

In the next years you don’t have any client application on your system for example you can see Office Live in Microsoft site , this solution solves any problem of copyright , support ,Up-Date, user-friendly , usability and so on.

But when I see these years and fast progress of hardware's cant find the answer of this question : " Although I'll have a Core2Quad or better CPU , more than 6 gigabyte RAM installed , more than 500 gigabyte hard disk drive , blue ray disk drive or better and windows vista or better ,but I don’t have any program on my system. what should I do?".

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

mohsen ahmadian


I am mohsen ahmadian
I live in kermanshah(city of iran)
I Love Codeproject and C++,java,C#
Location: Iran, Islamic Republic Of Iran, Islamic Republic Of

Other popular ASP.NET articles:

Article Top
Sign Up to vote for this article
You must Sign In to use this message board.
FAQ FAQ Noise ToleranceSearch Search Messages 
 Layout  Per page   
 Msgs 1 to 4 of 4 (Total in Forum: 4) (Refresh)FirstPrevNext
Generalthank YoumemberMember 359643911:56 8 Apr '08  
GeneralJust get the Cassini sourcemembercwilliam20:13 26 Feb '08  
QuestionNo IIS licensing?memberjimatjude16:19 26 Feb '08  
AnswerRe: No IIS licensing?membermohsen ahmadian9:57 27 Feb '08  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 26 Feb 2008
Editor:
Copyright 2008 by mohsen ahmadian
Everything else Copyright © CodeProject, 1999-2009
Web18 | Advertise on the Code Project