views:

251

answers:

4

I am trying to create command line command to do this. I already deploy website using aspnet_compiler to local drive.

Now I am trying to copy these files to remote machine IIS:

is it possible to use aspnet_compiler to directly deploy on remote IIS something like this

aspnet_compiler -v /Website1 -p c:\Projects\WebSite -f test.lala.com:"c:\Inetpub\wwwroot\Website1"

I know this command is wrong but I was wondering if someone knows how to do this using aspnet_compiler or just to tell me how to copy all of those files to remote machines c:\Inetpub\wwwroot\Website1

A: 

If you have local network access, why not just map the remote "c:\Inetpub\wwwroot\Website1" folder locally, and deploy to this share?

Jason Watts
thats one of the solutions I had in mind but I wanted to see if it can be done the way I asked for it. And I am not sure how to map to that folder and then access it.
grobartn
i did modification of your idea and wrote small batch script to map compile an publish and deletes the network mappingthanks
grobartn
A: 

I've done this before. Microsoft has command-line utilities for this, such as the Migration Tool. In some cases, the utility only needs to be on the source server. In some versions of IIS, it must be installed on both the remote and the local server. You may need to update your host headers once you're done, especially if they use IP for the host instead of localhost.

Brian
+1  A: 

The command you are looking for is called "xcopy". You use the commandline to generate the deployment files on your local, then use xcopy to move the files to the remote machine.

Syntax here.

Jonathan
Wouldn't you still need to map a shared folder even while using xcopy?
Jason Watts
XCopy is what I meant when I said "deploy" fwiw
Jason Watts
Xcopy won't migrate anything but the files themselves. Microsoft's migration tool includes other stuff like settings.
Brian
A: 

Well, if you're deploying locally or if you have WebDAV enabled, you can deploy using a UNC:

aspnet_compiler -v /Website1 -p c:\Projects\WebSite -f \\test.lala.com\Website1

With intranet deployment, have your web admin set up a share on your web site and use \\ <server>\WebSite1 as your target.

With WebDAV, you have to configure your site for publishing. Mitch Tulloch has a nice article about it, or you can search TechNet.

Christopher_G_Lewis