IIS virtual directory creation fails on IIS 7.0 / windows server 2008

435 Views Asked by At

When I tried to create a virtual directory in the remote server using NAnt build script It could not create and shows the error message below:

The webservice at 'remote_machine' does not exist or is not reachable

The OS of remote server is Windows server 2008. Here I have used NAnt 0.92 and natcontrib 0.92.

Any suggestions would be appreciated.

EDiT: It is working for local machine but not for the remote. Any suggestion Please.

the code portion:

<property name="serverName" value="MyServer"/>
<property name="currentDeployName" value="Research"/>      
<property name="deployDir" value="\\${serverName}\wwwroot\${currentDeployName}"/>
<property name="currentDir" value="${deployDir}"/>  
<property name="DeployWebDir" value="${sourceDir}\Deployment\Deployment.Web"/>  
<property name="webrootDir" value="C:\Inetpub\wwwroot"/> 


<deliisdir iisserver="${serverName}" vdirname="${currentDeployName}" />        
<mkdir dir="${deployDir}" />     
<copy todir="${deployDir}" overwrite="true">
  <fileset basedir="${DeployWebDir}">
    <include name="**\*" />
  </fileset>
</copy>   
<mkiisdir iisserver="${serverName}" dirpath="${webrootDir}\${currentDeployName}"
           vdirname="${currentDeployName}"/>
0

There are 0 best solutions below