This project is read-only.

Connecting ii6 website remotely

Jun 24, 2010 at 1:59 AM

Hello, I am trying to use this code to connect to ii6 from my computer,
but it keeps giving the error: COMException: Access is denied.
Can anyone help me with this please?

My computer and ii6 server are in the same local network.
I use the adminstrator account on iis6 server to connect.

<MSBuild.ExtensionPack.Web.Iis6Website TaskAction="CheckExists" Name="MyWebSite" MachineName="MyMachine" UserName="admin" UserPassword="mypassword" > <Output PropertyName="SiteExists" TaskParameter="Exists"/> </MSBuild.ExtensionPack.Web.Iis6Website> <Message Text="Website Exists: $(SiteExists)"/>

Jun 24, 2010 at 12:40 PM

Do you have a firewall installed? Do you have IIS installed on the calling computer? Can you check this post

Jun 24, 2010 at 1:32 PM
Edited Jun 25, 2010 at 1:19 AM


I checked the post you mentioned and tried different DCOM settings,
but I haven't got any good luck so far. 

Here is the new script I tried



            <Output PropertyName="SiteExists" TaskParameter="Exists"/>
 <Message Text="Website Exists: $(SiteExists)"/


Case 1: log in local pc with my domain user account
 	run the script
	error: COMException: Access is denied
Caee 2: log in local pc with domain administrator account
	run the script
	No error, everything is ok.

	local pc --
		windows 7 32bit professional.
		firewall is on.
		iis7 is enabled.
	        ii6 management compatibility is enabled.
        iis6 server --
		Windows server 2003 sp2
                ii6 is installed

	Both machines are the same domain 

I just need a break now, hope I can find the missing part when I come back.


Jun 25, 2010 at 6:18 AM

I just added my domain account to domain admin group, then the script works fun.

If you have any better solutions, please post it here.