Reputation: 6681
im trying to use the iis7 web task in the extension pack. I cant successful use the task(with my god level admin access), but my issue is that i cant use it with the user that must run it (service user).
<Target Name="CheckForSite">
<Message Text="Site: $(Site)" />
<Message Text="Application: $(Application)" />
<Message Text="Server: $(Server)" />
<Message Text="PhysicalPath: $(PhysicalPath)"/>
<!-- Check if the site exists -->
<MSBuild.ExtensionPack.Web.Iis7Website TaskAction="CheckExists"
Name="$(Site)"
MachineName="$(Server)"
>
<Output TaskParameter="Exists" PropertyName="SiteExists"/>
</MSBuild.ExtensionPack.Web.Iis7Website>
<Message Text="Site Exists: $(SiteExists)" Condition="$(SiteExists)"/>
<Message Text="Site does not exist: $(SiteExists)" Condition="(!$(SiteExists))"/>
I get the error: error : UnauthorizedAccessException: Retrieving the COM class factory for remote component with CLSID {2B72133B-3F5B-4602-8952-803546CE3344} from machine failed due to the following error: 80070005
Upvotes: 2
Views: 1285
Reputation: 6193
It is access denied exception. Try to add Username="username" UserPassword="password" properties into the MSBuild.ExtensionPack.Web.Iis7Website task. User should be admin on the target machine.
In my case I had a problem with domain communication. My server is in the different domain as my user's domain. It was fixed by our infrastructure team. I found this issue in the event log. Check event logs first for any related issues.
Upvotes: 1