This project is read-only.

Deleting virtual dirs/Upgrading

Jun 11, 2008 at 3:06 AM
I have noticed when i deleted my virtual directories from iis 7 to upgrade the version of ESB the Setup_FirstTime.cmd script doesn't recreate them. I had to manually add the ESB virtual directory, convert it to an application and then it automatically created the other ones.

Is there a specific way to delete/upgrade and ESB.NET installation
Jun 11, 2008 at 1:56 PM
Edited Jun 11, 2008 at 4:42 PM
No need to run SetupFirstTime.cmd.
You can just run SetupInstance.cmd.
Make sure you specify an Instance Name.
eg:           SetupInstance Source
               SetupInstance Default
               SetupInstance 6_1_21_0

That should do the trick.

Below is more info / FYI.

It seems there's something wrong with the script interacting with IIS7. It works first time through, but as you said, when you delete the entities out of IIS and re-run the script, it does not work properly. Not sure what's doing wrong there atm.
As an aside, the 1 bad "feature" :) introduced with IIS 7 is that when you delete a virtual directory from the IIS Manager, you must also clean up the Application Pool references to it.
Once an IIS Application is removed (with all its children), the Actual Application pool is sort of left in limbo.

To Clean up, do something like this:
(TODO is a step that needs to be done manually)...

"%windir%\system32\inetsrv\appcmd" list app /"Default Web Site" > IIS_Apps_Temp.txt
FOR /F "eol=; tokens=1,2,3* delims=(" %i in (IIS_Apps_Temp.txt) do @echo %i >> IIS_Apps.txt

REM TODO - Manually edit Apps to delete. Leave in the ones to be deleted...remove everything else...
REM TODO - Once done, Rename the "IIS_Apps.txt" file to IIS_Apps_To_Delete.txt
REM TODO - Remove the leading "APP " from the IIS_Apps_To_Delete.txt file.

REM for /F "eol=; tokens=1,2,3* delims=" %i in (IIS_Apps_To_Delete.txt) do @echo %i
for /F "eol=; tokens=1,2,3* delims=" %i in (IIS_Apps_To_Delete.txt) do %windir%\system32\inetsrv\appcmd delete app %i

REM TODO - Using IIS Manager, Delete ESB related AppPools.

Even though I did this, I still found spurious entries in the IIS Metabase.
Doing a:

"%windir%\system32\inetsrv\appcmd" list config > IISConfig.xml
Showed up spurious AppPool entries, even after the AppPools were deleted.


    <key path="LM/W3SVC">
      <property id="2073" dataType="MultiSZ" userType="0" attributes="Inherit" value="E:\Windows\Microsoft.NET\Framework\v1.1.4322\aspnet_isapi.dll
" />
    <key path="LM/W3SVC/FILTERS/ASP.NET_2.0.50727.0">
      <property id="2045" dataType="String" userType="1" attributes="None" value="ASP.NET Cookieless Session Filter" />
    <key path="LM/W3SVC/APPPOOLS/Source_ESBServiceAppPool">
      <property id="6013" dataType="DWord" userType="2" attributes="Inherit" value="1" />
    <key path="LM/W3SVC/APPPOOLS/Source_ESBManagementAppPool">
      <property id="6013" dataType="DWord" userType="2" attributes="Inherit" value="1" />
    <key path="LM/W3SVC/INFO">
      <property id="4012" dataType="String" userType="1" attributes="Inherit" value="NCSA Common Log File Format,Microsoft IIS Log File Format,W3C Extended Log File Format,ODBC Logging" />
      <property id="2120" dataType="MultiSZ" userType="1" attributes="None" value="400,0,,,0
" />
    <key path="LM/W3SVC/1/ROOT/MSMQ">
      <property id="2102" dataType="String" userType="100" attributes="Inherit" value="MSMQ" />
    <key path="LM/W3SVC/1/ROOT/aspnet_client">
      <property id="1002" dataType="String" userType="1" attributes="None" value="IIsWebDirectory" />


Jun 12, 2008 at 5:21 AM
Another issue i came across was that the users didn't automatically create because the supplied passwords didn't pass our security policy. Maybe you should ask the user when running the script to enter a password to avoid this issue
Jun 12, 2008 at 2:39 PM
Thanks mate.
I'll put it on the list for the next build.