Thursday, June 16, 2005
The Code Project - Understanding The COM Single-Threaded Apartment Part 1 - COM/DCOM/COM
The Code Project - Understanding The COM Single-Threaded Apartment Part 1 - COM/DCOM/COM : " there is sometimes even the need to fire the events of these objects from more than one thread. This two-part article is aimed at "
very good article on COM STA
very good article on COM STA
Monday, June 13, 2005
Dynamically creating Applications using System.CodeDom
Dynamically creating Applications using System.CodeDom: "The System.CodeDom namespace in .net allows the users to dynamically compile and create assemblies. This concept is used by ASP.NET internally. The article provides an insight on how to create assemblies dynamically."
Microsoft Application Blocks .NET
Open Source Software in C#
NUnitAsp Tutorial
Sunday, June 12, 2005
how to run IIS 5.0 on XP Home (and then ASP.NET)
thanks to http://www.webthang.co.uk/Tuts/tuts_server/iis_xph/pippo_xp.asp
Most of the hacks posted leave out a key module: IISsuba.dll
General HOWTO for setting up and running IIS in Windows XP Home Edition using Win 2000 Pro.
by Randall Smith PMI – PMP,
- adapted from Richard Sandoz - Certified Java Programmer
1) Locate and edit the file C:\WINDOWS\INF\SYSOC.INF
2) Find a line which should look like this (should be in section called [Components]):
iis=iis.dll,OcEntry,iis.inf,hide,7
3) Change it to this (the iis cab/folder in the i386 xp home folder appears to be nothing):
iis=iis2.dll,OcEntry,iis2.inf,,7
à (If you try to delete this line, some sort of ms caching thing will keep sticking back “iis.dll”. Another strategy of quickly renaming and making hidden dir called iis.dll seems to thwart the caching, but the effort is not worth it, so using iis2.dll is good enough)
4) Copy iis.dl_ , iis.in_ and IISsuba.dl_ from \i386 directory of Win2k Pro cd to a work-directory of your hard drive (e.g. c:\temp\). From the Run dialog type (note the outputs for the first two modules are renamed versions):
EXPAND c:\temp\IIS.DL_ c:\temp\IIS2.DLL
EXPAND c:\temp\IIS.IN_ c:\temp\IIS2.INF
EXPAND c:\temp\IISsuba.dl_ c:\temp\IISsuba.dll
5) Copy IIS2.DLL to c:\Windows\System32\Setup.
Copy IIS2.INF to c:\Windows\INF
Copy IISsuba.dll to c:\Windows\System32
6) Open the Control Panel. Select the “Add Windows Programs”. IIS and its options should now appear. If it does not, check the SYSOC.INF file and confirm the “hide” keyword was removed during the edit.
7) When you close the dialog, it will prompt you for necessary files from both the WinXP CD and the Win2000 CD. In one case, it may ask for the WinXP Pro CD, but it will accept the WinXP Home CD.
8) You can get to your Internet Services Manager (IIS control) from Control Panel's Administrative Tools.
9) Test the program by creating “hello world” from http://localhost .
10) install asp.net by running C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe -i
- folder - v1.1.4322 corresponds to ASP.NET 1.1
modify it as appropriate.
Most of the hacks posted leave out a key module: IISsuba.dll
General HOWTO for setting up and running IIS in Windows XP Home Edition using Win 2000 Pro.
by Randall Smith PMI – PMP,
- adapted from Richard Sandoz - Certified Java Programmer
1) Locate and edit the file C:\WINDOWS\INF\SYSOC.INF
2) Find a line which should look like this (should be in section called [Components]):
iis=iis.dll,OcEntry,iis.inf,hide,7
3) Change it to this (the iis cab/folder in the i386 xp home folder appears to be nothing):
iis=iis2.dll,OcEntry,iis2.inf,,7
à (If you try to delete this line, some sort of ms caching thing will keep sticking back “iis.dll”. Another strategy of quickly renaming and making hidden dir called iis.dll seems to thwart the caching, but the effort is not worth it, so using iis2.dll is good enough)
4) Copy iis.dl_ , iis.in_ and IISsuba.dl_ from \i386 directory of Win2k Pro cd to a work-directory of your hard drive (e.g. c:\temp\). From the Run dialog type (note the outputs for the first two modules are renamed versions):
EXPAND c:\temp\IIS.DL_ c:\temp\IIS2.DLL
EXPAND c:\temp\IIS.IN_ c:\temp\IIS2.INF
EXPAND c:\temp\IISsuba.dl_ c:\temp\IISsuba.dll
5) Copy IIS2.DLL to c:\Windows\System32\Setup.
Copy IIS2.INF to c:\Windows\INF
Copy IISsuba.dll to c:\Windows\System32
6) Open the Control Panel. Select the “Add Windows Programs”. IIS and its options should now appear. If it does not, check the SYSOC.INF file and confirm the “hide” keyword was removed during the edit.
7) When you close the dialog, it will prompt you for necessary files from both the WinXP CD and the Win2000 CD. In one case, it may ask for the WinXP Pro CD, but it will accept the WinXP Home CD.
8) You can get to your Internet Services Manager (IIS control) from Control Panel's Administrative Tools.
9) Test the program by creating “hello world” from http://localhost .
10) install asp.net by running C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe -i
- folder - v1.1.4322 corresponds to ASP.NET 1.1
modify it as appropriate.
Thursday, June 09, 2005
CodeTranslator: Free Code Translation From VB.NET <-> C#
pretty good online translator
CodeTranslator: Free Code Translation From VB.NET <-> C#
the site also has steps to customize Visual Studio to have your own Project Template
http://www.carlosag.net/Articles/createVSTemplate.aspx
CodeTranslator: Free Code Translation From VB.NET <-> C#
the site also has steps to customize Visual Studio to have your own Project Template
http://www.carlosag.net/Articles/createVSTemplate.aspx
asp.net execution
asp.net application can be configured for an ASP.NET version (also called side-by-side execution).
go to ASP.NET application properties in IIS manager to understand current script map for an application,
Directory->Configuration->ApplicationConfiguration->Mappings tab.
go to correct .NET framework folder and run Aspnet_regiis.exe to update the script map for an ASP.NET application.
Aspnet_regiis.exe -s W3SVC/1/ROOT/SampleApp1
---
if you want an application built with one version of the .NET Framework to execute on one or more different versions of the .NET Framework, then you must use an appropriate configuration file MyApp.exe.config
The following example redirects an application built with the .NET Framework version 1.0 to execute on version 1.1.
In the following example, the .NET Framework version 1.1 is preferred, but if that version is not available version 1.0 is used.
go to ASP.NET application properties in IIS manager to understand current script map for an application,
Directory->Configuration->ApplicationConfiguration->Mappings tab.
go to correct .NET framework folder and run Aspnet_regiis.exe to update the script map for an ASP.NET application.
Aspnet_regiis.exe -s W3SVC/1/ROOT/SampleApp1
---
if you want an application built with one version of the .NET Framework to execute on one or more different versions of the .NET Framework, then you must use an appropriate configuration file MyApp.exe.config
The following example redirects an application built with the .NET Framework version 1.0 to execute on version 1.1.
In the following example, the .NET Framework version 1.1 is preferred, but if that version is not available version 1.0 is used.
IIS 6.0 isolation mode
iis 6.0 differs from the previous versions in the three key areas:
application isolation, HTTP request handling, and the XML metabase
iis 6.0 comes with two modes process isolation mode and application pool mode
simple comparison is depicted here...

This new architecture for IIS 6 is named "worker process isolation mode," because any user-developed application code must now run within a worker process (w3wp.exe) as its host process instead of the dllhost.exe process used by IIS 5. There are several advantages of this new architecture. For example, one worker process can service several applications within a pool, providing isolation between applications running within other pools. One pool can also be serviced by several worker processes in a configuration known as a web garden that increases availability on a single machine the way web farms do using multiple machines.
http handling - it is done by http.sys (kernel mode listener) that resides within tcp/ip stack, listening to http requests and routing them to appropriate worker process.
metabase - iis configuration is now resides in metabase based on XML. allows you to make configuration changes without restarting IIS.
application isolation, HTTP request handling, and the XML metabase
iis 6.0 comes with two modes process isolation mode and application pool mode
simple comparison is depicted here...

This new architecture for IIS 6 is named "worker process isolation mode," because any user-developed application code must now run within a worker process (w3wp.exe) as its host process instead of the dllhost.exe process used by IIS 5. There are several advantages of this new architecture. For example, one worker process can service several applications within a pool, providing isolation between applications running within other pools. One pool can also be serviced by several worker processes in a configuration known as a web garden that increases availability on a single machine the way web farms do using multiple machines.
http handling - it is done by http.sys (kernel mode listener) that resides within tcp/ip stack, listening to http requests and routing them to appropriate worker process.
metabase - iis configuration is now resides in metabase based on XML. allows you to make configuration changes without restarting IIS.
