cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Server
Level 5

In IIS 7 - problem with default documents configuration

I need to set different default documents for two virtual directories pointing to the same physical directory.

In IIS 6 this setting works perfectly.

In IIS 7 InstallShield 2010 sets one default document for all virtual directories pointing to this physical folder.

It is not an option to add more than one default document.

Please comment on this - I need a solution a.s.a.p.

PS I know that this setting could be made via AppCmd.exe but initial suggestion that IS 2010 should support this configuration option with it's improved IIS 7 functionality.
Labels (1)
0 Kudos

(8) Replies
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

Have you tried applying the hotfix provided in KB Q205591? This should resolve issues with virtual directory and application settings not being applied correctly on IIS 7.x machines.
0 Kudos
Server
Level 5

It doesn't solve the issue. Project is re-built with updated IS binaries. Virtual directories still have the same one Default document while different ones defined in the UI.
0 Kudos
TimStVCS
Level 7

Josh, this seems like a significant bug and the date on the KB article is early July of this year. I am wondering what measures Acresso has taken to alert their customers of this since I am just finding out about this now? Fortunately, I have not needed to utilize the IIS View in IS2010 yet, but I think Acresso should have notified the installed customer base of this issue and hotfix don't you?

Tim
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

I am unable to reproduce the behavior you are seeing. If I create a new Basic MSI project with one feature, one component, a website (the default site), and a virtual directory, then change the default document property to contain "Default.asp,test.htm,default.htm,default.cfm", all of these items show up in the IIS manager after building and installing this project. Are you able to reproduce this behavior with similar steps in a sample project, or is this only occurring for one project?

Tim, in regards to notification of hotfixes, these are typically only delivered through KB articles, so the only notification available is the RSS feed for new/updated KBs. The impact of this issue is also limited by a number of factors, such as not affecting IIS 6 and earlier support, migrated projects are not affected, and various other things. This fix will likely be rolled into a service pack that would be provided through an update notification in InstallShield.
0 Kudos
Server
Level 5

I have a project converted from InstallShield 2009.
In my case i have 3 virtual directories inside Default Web Site. First two of them defines Default.aspx as a default document. Third one - other startup page, let's say "start.htm". Two of these virtual directories (one with Default.aspx and one with start.htm) uses SAME physical folder on hdd.
When the product is istalled two directories pointing to one physical folder on hdd only have start.htm as a default document.

Important addition - for testing we use Windows Server 2008 x64.

Is this behavior works ok for you?
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

The behavior you are seeing is due to how IIS 7.x stores certain settings. A setting such as default document is stored in a file named web.config in the physical folder that a virtual directory is associated with. If there is more than one virtual directory associated with the same physical directory, changing the default document setting on either virtual directory in the IIS manager will affect the other virtual directory's default document setting. Note that the IIS 7 functionality provided through InstallShield clears each setting (in this case, system.webServer/defaultDocument) before applying the value specified in the project being installed.
0 Kudos
Server
Level 5

Is it a big deal to utilise applicationHost.Config to write default document configuration in such case? Or add some simple option in IS configuration...

Because currently IS always sets the default document via web.config that overrides applicationHost.Config settings! Even if I don't need it!

Currently I added next custom action in Deferred System context:
\inetsrv\ appcmd.exe set config "Default Web Site/Recruitment" /section:defaultDocument /+files.[@start,value='ExtStart.htm'] /commit:APPHOST
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

We apply settings like default documents in the same manner as the IIS manager. If you create a virtual directory in the IIS manager and change the default document setting on that new virtual directory, the setting will be stored in web.config in the physical location the virtual directory points to.

Attempting to apply a setting in an area that is not allowed will cause IIS to return an error indicating the property cannot be set in the location just attempted.
0 Kudos