Tuesday, February 21, 2006 5:28 AM
Visual Studio 2005 introduced a new model for developing ASP.NET Applications without requiring an IIS on the development machine. (In fact it has been for some time with WebMatrix, Cassini Webserver etc., but this is the full fledged Visual Studio Product that has come out with this feature).
When we create an ASP.NET application using Visual Studio 2005 and try to run the application, we can momentarily notice the small Icon that comes in the Right bottom corner of the system. It is actually the built-in webserver used for running ASP.NET Applications locally.
Though the usage of this is limited to local system, it can be very useful for development scenarios where you dont need to have IIS installed for developing web applications.
Having said that, the link between IIS Virtual directory and your web application is cut off and you can create the application even in your file system folder (not the conventional c:\inetpub\wwwroot) and get ASP.NET Web applications Run / Debugged in your machine.
If we would like to use the IE Webcontrols which we have been quite familiar with, working in the ASP.NET 1.x versions, we need to customize a little bit to get them working. The webctrl_client folder which contains the scripts and images for the IE Webcontrols to render had to be present in the c:\inetpub\wwwroot folder in traditional ASP.NET 1.x applications.
Here, the folder needs to be part of the root directory of your application. Say, we have an application in c:\MyWebsites\MyTestApplication. Then the webctrl_client folders needs to be inside the MyTestApplication folder.
Secondly, we need to specify this setting in the web.config, as follows:-
<configSections>
<section name="MicrosoftWebControls" type="System.Configuration.NameValueSectionHandler,System,Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</configSections>
<MicrosoftWebControls>
<add key="CommonFiles" value="/MyTestApplication/webctrl_client/1_0/"/>
</MicrosoftWebControls>
The above settings go within the <configuration> </configuration> section of the web.config.
Please note that this setting is not required, if we create a virtual directory in the IIS for our application and the webctrl_client folder is already a part of c:\inetpub\wwwroot folder.
This is required only if we use the Visual Studio's built-in web server which uses localhost:PortNumber for running locally and debugging.
Also, its worth to note that there are better equivalent controls in ASP.NET 2.0 for the IE Webcontrols such as the ASP.NET 2.0 TreeView, MultiView controls which have better performance than the IE Webcontrols.
In fact, for TreeView, its better to use the ASP.NET 2.0 TreeView control rather than the IE Webcontrols TreeView.
The Tabstrip is the only thing for which you may want to continue with the IE Webcontrols where you can specify AutoPostBack="false" and thereby, avoid postback when hopping between the Tabs.
Cheers and Happy Programming !!!