IIS7 - Get / Set Property Calls - Are you having problems?

Got a problem you cannot solve? Try here.
neillans
Posts: 536
Joined: Sat Nov 04, 2006 6:21 am
Location: Scottish Borders, UK
Contact:

IIS7 - Get / Set Property Calls - Are you having problems?

Postby neillans » Sat Jun 19, 2010 3:37 pm

This is a quick public call to all IA9 R2 users who are using working with IIS7 from within their scripts. Specifically those using the Get / Set Property Calls that are exposed through the scripting interface.

Are you have any problems? Does it all work fine for you? What sort of things are you using them for? What could we do to improve things?

Either way, we are looking for some samples of how you are using the calls so that we can investigate some further improvements.
Andy Neillans

adi
Posts: 57
Joined: Mon Mar 22, 2010 8:28 am

Re: IIS7 - Get / Set Property Calls - Are you having problem

Postby adi » Mon Jun 21, 2010 8:01 am

Hello,

1. "Get IIS Properties" is used by me mostly to get some paths. Example: getting the physical path of a given web site / virtual directory.
My first thought was to use the "Get Folder Location -> WWW->WWWRoot" but it works correctly only on IIS5 where there can be maximum one website in the system. On IIS6/7 more websites are supported and the above command always refers to the first one (I guess that it's the one with id=1).

My second thought was to use the Get IIS Property. And it works fine on IIS6.

Code: Select all

   Get IIS Folder Property "Path" into variable WEBSITE_ROOT_PATH from site #$IIS_WEBSITE_INDEX$/


On IIS7/7.5 it doesn't work for me (already reported in a different thread).

2. "Set IIS Properties" is used by me to set some the properties of a given web site / virtual directory that are not available in the "Create IIS Site" "Create Virtual Folder". Example:
- enabling/disabling SSL

I was also using it to set the name of the newly created application (it's blank by default):

Code: Select all

 Set IIS Folder Property "AppFriendlyName" to $SOME_NAME$ in site # $IIS_WEBSITE_INDEX$/$IIS_FOLDER$


Unfortunately this property has no equivalent in IIS7.

The IIS7 introduced a lot of changes to the configuration concept. It would be good to have the new commands that use the new configuration API. For example: how to tell where the setting should be stored? In IIS7 you can choose multiple destinations (ApplicationHost.config, web.config, others).


Best regards,
adi

neillans
Posts: 536
Joined: Sat Nov 04, 2006 6:21 am
Location: Scottish Borders, UK
Contact:

Re: IIS7 - Get / Set Property Calls - Are you having problem

Postby neillans » Mon Jun 21, 2010 1:14 pm

Hi adi,

With regards to Set, can you confirm that it works as expected for you under IIS7?
Andy Neillans

adi
Posts: 57
Joined: Mon Mar 22, 2010 8:28 am

Re: IIS7 - Get / Set Property Calls - Are you having problem

Postby adi » Thu Jun 24, 2010 3:52 am

Hello,

I have performed a test of "Set IIS Property".
What I'm trying to do is to set the SSL certificate for a given virtual directory.

Code: Select all

Set Variable MD_ACCESS_SSL to 8
Get IIS Folder Property "AccessSSLFlags" into variable SSL_FLAGS from site #1/TestFolder
MessageBox: Information, Current SSL Flags: $SSL_FLAGS$$NEWLINE$Setting the new flags to: $MD_ACCESS_SSL$
Set IIS Folder Property "AccessSSLFlags" to $MD_ACCESS_SSL$ in site # 1/TestFolder
Get IIS Folder Property "AccessSSLFlags" into variable SSL_FLAGS from site #1/TestFolder
MessageBox: Result, Current SSL Flags: $SSL_FLAGS$$NEWLINE$
Terminate Installation


where:
  • TestFolder - is a valid virtual directory
  • The server is configured correctly to handle SSL
The cove above works perfectly on IIS5.1 and IIS6.

Results on Windows 2008 R2 EN/DE are identical. One of the system has the IIS Metabase Compatibility enabled, the other one not.
1. Step 1 - configuration of the test system
step1.png
Step1 - configuration of the test system
step1.png (45.09 KiB) Viewed 12814 times


2. Step 2 - the first message box. As you can see the "Get IIS Property" didn't work.
step2.png
Step2 - indicates problems with reading IIS properties
step2.png (4.34 KiB) Viewed 12814 times


3. Step 3 - the second message box. Surprisingly is appears that the "Get IIS Property" worked... Everything should be fine...
step3.png
The result of "Set IIS Property"
step3.png (3.56 KiB) Viewed 12814 times


4. Step 4 - it didn't work...
(attachment in the next post)

adi
Posts: 57
Joined: Mon Mar 22, 2010 8:28 am

Re: IIS7 - Get / Set Property Calls - Are you having problem

Postby adi » Thu Jun 24, 2010 3:53 am

step4.png
Step4 - it didn't work
step4.png (46.59 KiB) Viewed 12814 times


So I must say that the "Set IIS Property" is not working correctly on IIS7/7.5.

Best regards,
adi


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 54 guests