How to know the physical path of executing .Net assembly

In some cases you may come to a point where you want to know the physical path on your hard drive for the current assembly.. For example you might want to know the physical path of an Configuration XML file, which you already know that this file should be located on the same folder as the your assemblies. The following pecice of code show how u can know the path of your executing assembly

string executingAssemblyPath = “”;

FileInfo file = new FileInfo(System.Reflection.Assembly.GetExecutingAssembly().Location);

executingAssemblyPath = file.DirectoryName;

Develop .Net 1.1 Web Application on windows Vista (IIS 7)

To develop Web application using .Net 1.1 and Visual Studio 2003 on Vista OS (IIS 7), follow the below steps:

  •   First of all you have to install Visual Studio 2003. this will install .Net 1.1 also

  •   Install all service packs for .Net framwork 1.1.

  •   Open the IIS Manager and navigate to the server root. (Not a website root, above that – the machine name.) and double click on "ISAPI and CGI restrictions."

  •   Add the v1.1 aspnet_isapi.dll to "Allowed" restrictions

                  (it’ll be at %WinDir%\Microsoft.NET\Framework\v1.1.4322\aspnet_isapi.dll)

  •   Navigate to the website root in IIS manager and double-click "ISAPI Filters."

  •   Add the ASP.NET 1.1 ISAPI filter from %WinDir%\Microsoft.NET\Framework\v1.1.4322\aspnet_filter.dll

  •   Go to the website root again in IIS manager and loo at "Advanced Settings."

  •   Ensure the website is using an ASP.NET 1.1 Application Pool (Vista created one for me when I installed .NET 1.1 – you may need to create one yourself.)

    Done.. Now you can develop and debug .Net 1.1 Web Applications on Vista OS and IIS 7.0