How to skip Virtual Directories in Web Deploy Command line? - iis

I use web deploy command line batch files to sync Staging and Production servers.
Production server has some virtual directories that are being shared between nodes (on Shared Drive).
I would like to skip virtual directory bindings from being synced ?
Can anyone help me with a switch that does it efficiently!
I appreciate your help.
EXAMPLE.
Virtual Directory Images on Development server is binded to a share drive on LOCAL NAS.
where as on Production it is binded to a shared drive (Different Location).
when i sync production environment with development the binding of virtual directory Changes to LOCAL NAS.
I would like to stop virtual directory binding synchronization.
PLEASE HELP.

I think you can use the -skip parameters (although, I have never applied them to Virtul Directories as I usually sync specific web apps, not entire web servers). E.g.
-skip:objectname='filePath',absolutepath='logs\\.*\\someNameToExclude\.txt'
See the manual on TechNet:
-skip:skipAction=<action>,objectName=<objectName>,keyAttribute=<key>,absolutePath=<absolutePath>,attributes.<attributeName>=<attributeValue>,xPath=<xpathExpression>
Special Shortcuts
-skip:ApplicationPool=<applicationPoolName>
-skip:Directory=<directoryPath>
-skip:File=<filePath>
-skip:WebApplication=<webApplicationName>
-skip:WebSite=<webSitelName>

Related

Simulate a fake directory in Linux

I have a web app in my local environment that needs to upload some files to a path like /images/app/customer. That path does exist on the production server but obviously doesn't on my machine.
Is there a way to "simulate" the existence of that directory on my environment?
I'll answer my own question after one year of experiments. It turned out that the best and clean way is to create the directory in a sandboxed environment like Docker or any other virtual machine out there.

Possible to use Virtual Path to an external disk on Plesk Managed Windows server?

After getting a helpful answer from this post I want to store media on a separate harddrive on the windows server. Is it possible to make those files available via http?
I soon discovered that Plesk does not allow me to create a virtual path that points to a location outside of my website root. I want the virtual path to point to a folder on D: (an extra disk, not the same as the website root directory)
Only two possible solutions I could think of, although I can't find them any where.
1) Maybe plesk has an advanced configuration file that prevents it from overwriting certain things in IIS when it runs its maintenance jobs or updates, specifically the Virtual Path I created directly in IIS outside of plesk.
2) Maybe there is a third party component available that offers this functionality, setting virtual paths outside of web root or the config file I just mentioned in #1.
Any other solutions are also welcome.
cd "%plesk_vhosts%\"domain.tld\httpdocs
mklink /J point c:\outOfSpace
Now provide permissions to "psacln" group to c:\outOfSpace and that's it.
Also you can create "point" not in httpdocs but in web space root and than from Plesk create Virtual Folder inside /httpdocs with needed access permissions.
There is issue that your custom permissions may lost after Plesk upgrade, this KB article describe how your can avoid it kb.sp.parallels.com/111194

How to package synced folder in vagrant box

What I want and achieved so far:
I want to create a custom vagrant box including a configuration and an application to reuse it in different client or serve environments.
Specifically I managed to create vagrant box, based on Ubuntu (precise/64), that has node.js installed, and package it on my dev machine with
vagrant package my-box --output filename.box
I am able to copy the filename.box to a remote server and vagrant up the box there. Node.js is installed within the vagrant box as expected.
The problem is, that I am not able to package the files in the synced folder vagrant. After starting the box on the remote server, the synced folder is empty
Therefore the application I developed on the local machine is not included in the box.
I tried to find a solution or any information about this behavior, but apart from this unanswered Post i couldn't find anything on the net.
My questions:
How can i preserve the files in the synced folder and package them in the filename.box for reuse in the server environment.
Is this even possible? Is the behavior I see a bug or is Vagrant not meant to package the files also?
I didn't do any configuration for the synced folders so far. Is it possible to package files from a different synced folder than the regular /vagrant?
If this is not possible at all, what are best practices for deployment or reusage of vagrant environments including applications?
1-3) No. This is not possible and not intended to work in the way you expect it to work.
Think of VirtualBox's shared folder as a mounted volume on a remote machine. It's not part of the file system of your virtual machine. The actual data is saved on the host machine, not the virtual one.
4) If you want to add data into your box, just copy your data over to the vm before you pack it. No need to use shared folders.
You cannot package a synced folder but what you are desiring is absolutely possible.
The easiest way to accomplish this is to put the data in some other directory in the box (thus ensuring it gets packaged with the box). And during the Vagrant box's provisioning, move or copy the data to the synced directory.
Once the box is up and running, the synced directory will have the files you want in it.

Path Not Found error when opening VB6 project from a shared folder on Virtual PC 2007 (XP sp3)

I currently work on a small software team that primarily maintains legacy software. I am trying to set up a Virtual PC that we can use to do this maintenance. Specifically, I would like to be able to debug and run VB6 web apps from a folder on the host PC. My constraints are as follows:
The Virtual PC will not be registered on the domain.
The server that hosts our Subversion repository does not run the subversion service so the only way to interact with the repository is through "file:\\", which requires domain authentication.
It is not possible to debug/run VB6 web apps that are located on mapped network drives, because IIS requires that the VirtualPC be on the same domain as the network drive
I would like to avoid having to copy the folder from the host pc to the VirtualPC and then copying it back in order to have the latest revision from Subversion
So, I am trying to use VirtualPC's shared folder feature to share the host machine's Subversion directory and open the project in VB6 on the VirtualPC. Problem is that Visual Basic throws the error: "Path not found: '\\C:\\Subversion\Path\Project.vbp'" when I try to open it. Folder C:\Subversion on the host machine is mapped to G: on the VirtualPC. If anyone can help me resolve this error or find some other way to accomplish this, I would be deeply grateful.
Oh, both host and virtual OS is Windows XP sp3. Using VB 6.0, IIS v5.1.
I can manipulate files in the shared directory freely from the VirtualPC ie. copy, paste, delete, etc.
VBP and VBG files are text files. Look inside them and see whether C:\Subversion or C:\Subversion appear anywhere, perhaps for a subproject in a project group. If they do, change it to use relative paths rather than absolute paths.

IIS Config file in virtual directory

I have multiple websites that all have the same code, but different app settings.
I want to place my app settings in a separate configuration file that is located in a virtual directory. This will allow me to have a single copy of all of the code shared across all of the sites with a different virtual directory for each site.
Unfortunately, when I try to configure this, IIS doesn't process the config file when it is in a virtual directory.
If you have a solution to this, I would appreciate your help.
Maybe using the machine.config file on your web server would be a suitable alternative? Otherwise you could create a web.config file in a global folder somewhere and open it using the WebConfigurationManager.OpenMappedWebConfiguration() method.
It's not possible to use a virtual directory (or even files outside of the current website; only the current folder, or a sub-folder).
One possible way to share setting across projects would be to do it at build-time - either by coping it in, or using a Linked File in VS to have it copied to the folder on publish.
If you really need this functionality on the server, you could try (though I can't say how well it would work) a Junction.

Resources