
5.19.2003
ASP 1.1 - It Works! (transition from 1.0 blues)
Whew - at long last, my script mappings are back to ok, and things seem a-ok. What I found:
My script mappings, as shown best using ...\inetpub\adminscripts\adsutil.vbs enum w3svc were all hosed up. There were many more entries in there than should have been, all repeated 3 or 4 times. Looks like the mappings for .aspx, etc. were pointing to 1.0 framework at the top of the list, then about 3 repeated sections of mappings for 1.1 framework after that. I'm guessing that the IIS engine reads the "list" at runtime and stops at the first match -- so would always get the 1.0 settings.
The Symptom: When opening or creating a web project using the 7.1 IDE, I would get a message saying my web server is still at .NET 1.0, should we set the project for 1.0 compliance? This is something to do with it sucking in the 1.0 DLLs from the script mappings.
The IIS GUI was hosed up as well - probably due to the same repeating nature of the list. Even when I change the mapping for a particular file extension in the GUI, it wouldn't "stick". Probably would add to the end of the list. (Probably similar to what the aspnet_regiis.exe tool was doing [see below] )
Finally - decided to use the raw adsutil.vbs script to view the raw data in the IIS metabase. Useful tool - can get/set all properties, some of which aren't available in the IIS GUI. Problem is, for the LIST datatype, which ScriptMaps is, you can only pass up to 10 items. The script map as is with .NET 1.0 is 30 items.
So....wrote my own specialized version of the adsutil.vbs that only does ScriptMaps property for a given IIS node. Reads the entries from a file, stores them in an array, then hands that array to IIS via the IIsObject.put "ScriptMaps", listObject syntax.
Don't forget to IIsObject.SetInfo afterwards to save the info. (if you don't then all subsequent access to that property is locked and you'll get some error like "can't write to that path at this time" -- have to restart iis to lose the dangling lock)
-------
After all this pain getting IIS script mappings repaired to point to the 1.1 Framework, here is some reference info for future use.
Using the Metabase Reference Pages
Also - found from searching groups, that BE CAREFUL editing the script maps. If you leave out a given extension, IIS will assume that is a plain text file and offer it back to the client untouched.
ex: remove .asp extension from the script mappings, then hit an asp page on your server. the file, with all server code in plain sight, will be returned to the caller!!
My script mappings, as shown best using ...\inetpub\adminscripts\adsutil.vbs enum w3svc were all hosed up. There were many more entries in there than should have been, all repeated 3 or 4 times. Looks like the mappings for .aspx, etc. were pointing to 1.0 framework at the top of the list, then about 3 repeated sections of mappings for 1.1 framework after that. I'm guessing that the IIS engine reads the "list" at runtime and stops at the first match -- so would always get the 1.0 settings.
The Symptom: When opening or creating a web project using the 7.1 IDE, I would get a message saying my web server is still at .NET 1.0, should we set the project for 1.0 compliance? This is something to do with it sucking in the 1.0 DLLs from the script mappings.
The IIS GUI was hosed up as well - probably due to the same repeating nature of the list. Even when I change the mapping for a particular file extension in the GUI, it wouldn't "stick". Probably would add to the end of the list. (Probably similar to what the aspnet_regiis.exe tool was doing [see below] )
Finally - decided to use the raw adsutil.vbs script to view the raw data in the IIS metabase. Useful tool - can get/set all properties, some of which aren't available in the IIS GUI. Problem is, for the LIST datatype, which ScriptMaps is, you can only pass up to 10 items. The script map as is with .NET 1.0 is 30 items.
So....wrote my own specialized version of the adsutil.vbs that only does ScriptMaps property for a given IIS node. Reads the entries from a file, stores them in an array, then hands that array to IIS via the IIsObject.put "ScriptMaps", listObject syntax.
Don't forget to IIsObject.SetInfo afterwards to save the info. (if you don't then all subsequent access to that property is locked and you'll get some error like "can't write to that path at this time" -- have to restart iis to lose the dangling lock)
-------
After all this pain getting IIS script mappings repaired to point to the 1.1 Framework, here is some reference info for future use.
Using the Metabase Reference Pages
Also - found from searching groups, that BE CAREFUL editing the script maps. If you leave out a given extension, IIS will assume that is a plain text file and offer it back to the client untouched.
ex: remove .asp extension from the script mappings, then hit an asp page on your server. the file, with all server code in plain sight, will be returned to the caller!!