Click here to Skip to main content
11,796,275 members (77,031 online)
Click here to Skip to main content

Light IIS (Run without IIS)

, 26 Feb 2008 CPOL 60K 4.2K 49
Rate this:
Please Sign up or sign in to vote.
A way to run without IIS and any server component


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 Applications there are very user-friendly and you can use Ajax in 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 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\\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 programmer and need a client application this is a solution
  • If you are an 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?".


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


About the Author

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

You may also be interested in...

Comments and Discussions

QuestionCassiniDev alternative Pin
Lachlan Keown5-Nov-14 10:38
memberLachlan Keown5-Nov-14 10:38 
QuestionHow to start with double click Pin
AjayBaroda3-Mar-13 19:43
groupAjayBaroda3-Mar-13 19:43 
Dear Mohsen,

Thank you very much for this information.

It is really very good and i got the idea but i like to do some modification

Here is my problem can please provide solution for it?

I have full web application with SQL server database

when it run on internet as website it runs fine and it runs fine within visual studio 2010
If i configure IIS it runs fine

But I want that I just copy all web files (full project) and one single file on my windows 7
And i want that if I double click on single file it will start web browser and start and run all web files with sql server database

I hope you understand what i want.

I have many stand alone computer and i don't want to configure each computer with IIS and i don't have Internet connected to each computer.

So i want that i just put all files in one folder and when i double click main file it works
start web browser and open my offline website.

Kindly provide steps for creating such program exe file
Or if you can able to give me source code for it.

You can contact me on my email pndatasystem at yahoo dot com
Thank you very much

QuestionHow to run this demo without visual studio installed Pin
arevijay15-Jan-13 18:58
memberarevijay15-Jan-13 18:58 
Questionhow to run webapplication without iis Pin
mir512-Aug-12 22:23
membermir512-Aug-12 22:23 
AnswerRe: how to run webapplication without iis Pin
mohsen ahmadian1-Sep-12 8:57
membermohsen ahmadian1-Sep-12 8:57 
Questionhai, I am using a 64 bit system Pin
itsvineethpv28-Mar-12 22:38
memberitsvineethpv28-Mar-12 22:38 
QuestionMultiple VD's on the same port Pin
Nayeem Yahoo5-Mar-12 20:07
memberNayeem Yahoo5-Mar-12 20:07 
AnswerRe: Multiple VD's on the same port Pin
mohsen ahmadian1-Sep-12 8:59
membermohsen ahmadian1-Sep-12 8:59 
Generalvery good Pin
ARIA 526-Mar-10 22:49
memberARIA 526-Mar-10 22:49 
AnswerTip to run without Visual studio Pin
mohsen ahmadian8-Sep-09 18:22
membermohsen ahmadian8-Sep-09 18:22 
Generaldoes not work without Visual studio Pin
leoadell16-Jan-09 5:05
memberleoadell16-Jan-09 5:05 
GeneralRe: does not work without Visual studio Pin
vik13ner13-Apr-09 18:06
membervik13ner13-Apr-09 18:06 
GeneralRe: does not work without Visual studio Pin
findmeausername8-Sep-09 16:33
memberfindmeausername8-Sep-09 16:33 
Generalthank You Pin
Member 35964398-Apr-08 10:56
memberMember 35964398-Apr-08 10:56 
GeneralJust get the Cassini source Pin
cwilliam26-Feb-08 19:13
membercwilliam26-Feb-08 19:13 
QuestionNo IIS licensing? Pin
jimatjude26-Feb-08 15:19
memberjimatjude26-Feb-08 15:19 
AnswerRe: No IIS licensing? Pin
mohsen ahmadian27-Feb-08 8:57
membermohsen ahmadian27-Feb-08 8:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.151002.1 | Last Updated 26 Feb 2008
Article Copyright 2008 by mohsen ahmadian
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid