0

I'm trying to repoint an IIS application at a different directory on disk.

The iis_app chef resource does not appear to support such an action. I know how to do it in Powershell but the IIS cookbook leverages appcmd. So I've reverted to appcmd and still can't get the command to work:

appcmd set app /app.name: contoso / marketing /[path='/'].physicalPath:c:\ application
Matt
  • 68,711
  • 7
  • 155
  • 158
  • Are you having problems with the `appcmd` itself or just running it via the chef recipe? What errors are you receiving? – Matt Jan 20 '15 at 20:04

1 Answers1

0

Thanks Matt for your interest - i have solve this issue as follows: In essence i was asking 2 questions:

  1. How do you use appcmd to point an application at another place on disk.
  2. How do i use the Chef iis cookbook resources to do likewise

Answers

  1. The correct appcmd is

> appcmd.exe set vdir "contoso/marketing/" -physicalPath:c:\application

  1. It turned out that there was a bug in the iis cookbook when i used this resource to do the same as the appcmd above

is_vdir "contoso/" do path 'marketing/' physical_path "c:\application" action :config end

This bug was fixed in in the iis community cookbook(iis 3.0.12) : https://github.com/EasyAsABC123/iis/tree/hotfix-issue_with_helper and works as intended.