1

I'm trying to set up TFS Release management to deploy to an IIS server that is set up for shared configuration. However, when the deploy is actually run, I get the following error:

##[debug]System.Exception: Filename: \\?\UNC\storage\webfarm\config\applicationHost.config
Error: Cannot write configuration file due to insufficient permissions
##[error]Filename: \\?\UNC\storage\webfarm\config\applicationHost.config
##[error]Error: Cannot write configuration file due to insufficient permissions

The user that is used to run the DSC script has modify permissions on applicationhost.config. Is this a red herring error, or are we missing something?

Update: I've tested this with moving the shared config to a windows server share just to be sure it wasn't a SAN issues, however, caused a different error:

Cannot commit configuration changes because the file has changed on disk

I've encountered this issue before if other scripts are trying to do things at the same time, but I've cut the config down to the bare minium of just creating the application.

The only time I'm able to get it to work is by breaking the shared config and going back to local. This isn't ideal because we run in a farm configuration.

kettch
  • 287
  • 1
  • 3
  • 11

1 Answers1

0

DSC runs in the local system context. If you want to perform a certain task in the context of a user, use RunAs. This blog explains the same. http://nanalakshmanan.com/blog/Understanding-RunAs/

Chris Buechler
  • 2,998
  • 14
  • 18