How to Set Deployment Path on Web Projects in Visual Source Safe 6.0 - visual-sourcesafe

I am using Visual Source Safe 6.0
I set Shadow Folder option for one of my PHP project.
Now I want to use the Deploy Feature of VSS. Could anybody please help me with step-by-step tutorial about how to set this ? I have Googled many times but failed to retrieve satisfactory answer. Details are as follows:
VSS project Name: mC
Virtual Root:
I have two web sites where I want to deploy my VSS project from VSS. Details of the Web Sites are as follows:
Server: HostGator
Server UserName: usrname
Server Password: usrpassword
Server URL: mc.com
Folder where to Deploy in my Site: public_html
I tried the followings as the Deployment path but it says Failed to Login
'ftp://usrname:usrpassword#mc.com/usrname/public_html'
'ftp://usrname:usrpassword#mc.com/usrname/public_html/'
'ftp://usrname:usrpassword#mc.com/~/public_html'
'ftp://usrname:usrpassword#mc.com/~/public_html/'
'ftp://usrname#mc.com/usrname/public_html'
'ftp://usrname#mc.com/usrname/public_html/'
'ftp://usrname#mc.com/~/public_html'
'ftp://usrname#mc.com/~/public_html/'
(without the single-quotes)
Could anybody please help me with step-by-step tutorial about how to set the Deployment Path ?
Thanks in Advance.

First of All make sure your usrpassword does not contain any special Characters. Because Special Characters such as comma(,) , at (#) , colon (:) etc. bears a different meaning in this system.
Then use the following structure for file Upload
ftp://usrname:usrpassword#mc.com/public_html
You can use multiple ftp sites by separating them using a comma (,)

Related

Laravel deployment and update on Apache Webserver

I want to get my Larvel project ready for deployment.
I already found some guides in the web, but no one of them could answer me the following question(s):
Which file do I have to upload to the webserver?
I already tried to remove as much folders/files as possible to keep the project-size on my apache webserver as small as possible. But is there any guide which tells me, which folders/files do i exactly need to exchange?
When it comes to an update:
Once deployed, which files do i need to update?
Do I have to upload all the files again or can I exchange only certain ones?
Currently i followed the official laravel guide and uploaded all files to the webserver.

VSSonarExtention - why connect to the server?

Just installed and started using VSSonarExtension, but already have a couple of questions that I am unable to answer myself:
Why does the extension need to connect to the server if it scans local code with local tools, such as FxCop and StyleCop?
After looking through roughly 15 files, I get an error saying that I need a license to scan more than 15 files in one session - isn't the extension open source?
I want to make sure that the rules specified on the server match the rules locally, so that I get the same output with regards to technical debt - how can I achieve it?
Seems like the extension does not use FxCop, according to the logs; moreover, sometimes logs indicate that some code has been skipped because some rules were not present or defined in StyleCop. What does that mean?
Looking forward to your replies, thanks for help.
answers
so it can sync the quality profile in server, you dont want your users to complain the local analysis is different from what they have in server
local files analysis, is provided by external plugin: please contact support their for details
its the default behaviour. therefore ansering question 1
please open a ticket in github with those issues. it can be that you have some differences between server profile and what is installed locally.

How to deploy Camunda BPM to Tomcat in Jelastic

I would like to setup Camunda-BPM in a Tomcat 7 running on Jelastic. I followed the instructions.
The problem now is that Jelastic does not allow to add the file bpm-platform.xml into the catalina-home/conf directory. So when I start the tomcat I get
...
Caused by: org.camunda.bpm.engine.ProcessEngineException: /opt/tomcat/conf/bpm-platform.xml does not exist. This file is necessary for deploying the camunda BPM platform
Can someone please give me a hint where I can place bpm-platform.xml so that the BPM engine starts?
The directory you're looking for is labelled as 'server' in the Jelastic dashboard - but sadly you cannot upload new files to this directory via the dashboard (only edit the existing ones).
However, you can write to this directory via FTP (http://docs.jelastic.com/ftp-ftps-support), so you should be able to add the file that way.
If you are just using a trial account at the moment, you may need to seek assistance from your hosting provider to add the file there for you manually from their side (since trial accounts do not have public IP, so can't use FTP).

how do I use web deploy to deploy multiple sites on localhost with different ports

I have a solution that contains multiple integration test projects and one web application project. each integration project connects to the web application when running the tests. I would like for each test project to access the website with its own database connection. I have been trying to use the web deploy functionality built into visual studio. However I have been unable to figure out what I need to add to either the deployment package that is created and/or the post build event for the test projects to declare the binding port for the website when deployed. For example, I want integration project A to create and access the website located at http://localhost:83 and integration project B to create and access the website located at http://localhost:82. Could someone please explain:
Is there anything I need to do the deployment package ?
What do I need to add to my post-build events for my integration projects when deploying the package, so that the website is created at the correct port when building the project?
Update:
I'm wanting to deploy the same site to two different locations on my machine so that I can run both sets of integration tests at the same time.
Update 2:
I have researched the web deploy tool and it allows you to specify parameters that modify what is deployed when you call it from the command line. However I have found the documentation very confusing. http://technet.microsoft.com/en-us/library/dd568968(WS.10).aspx
Update 3:
I expect these to be two different websites, each pointing to there own database. If possible I would like a single package that can be deployed using msdeploy. Which will then be called in a post build event from each of the integration test projects. I would like to specify the connection string and deployment location from the post build script of the integration project.
you can try with webdev.server included in visual studio. VisualStudio use this for start a webserver when you debug. With this you can start a webserver in the desire port (if the port is not used currently).
I made a bat file for change some options.
check it.
::Begin of bat file
cd C:\Program Files\Common Files\microsoft shared\DevServer\10.0\
WebDev.WebServer40.exe /port:80 /path:"C:\PATHTOYOURWEBPROJECT" /vpath:"/NAMEOFYOURWEBPROJECT"
::End of bat file
You can acces in: http://localhost:80
I use the webserver40, but if you don't have net.4 or vs2010 you can try to find webserver[ xx version].exe
I hope that this will be helpful, and sorry for my broken english.
First off, you're approaching this the wrong way.
> I would like for each test project to access the website with its
own database connection.
Who is creating the DB connection? Your web site or the test project? For rest of your question to make sense, I presume its the web site (otherwise, Project A and Project B cannot share a connection out of the box).
If your website is making the connection, unless you're caching or having a static connection, there will be a new connection made as each request runs your your site on a new thread. Another simpler alternative is to take a query param and initiate a new connection based on that. If you seed it off the caller, you can also use it for more detailed logging.
Web Deployment projects are meant for deploying to integration servers, so that means you cannot access them by http://localhost... but the full FQDN of the server.
Most importantly, http://localhost:82/myApp and http://localhost:83/myApp are two different sites (unless you redirect from one of them to another one which in itself can cause additional issues) running the same codebase.
Having said that, you would then need to deploy your website twice and then all you need is to change the config/settings entry in Project A and B to point to these to different sites.
Hope this makes sense.
You can define virtual host configuration.
Refer this guide for more information.
http://docs.jboss.org/jbossas/guides/webguide/r2/en/html/ch07.html

How can I get TFS2010 to run MSDEPLOY for me through MSBUILD?

There is an excellent PDC talk available here from Vishal Joshi which describes the new MSDEPLOY features in Visual Studio 2010 - as well as how to deploy an application within TFS. (There's also a great talk from Scott Hanselman but he doesn't go into TFS).
You can use MSBUILD within TFS2010 to call through to MSDEPLOY to deploy your package to IIS. This is done by means of parameters to MSBUILD.
The talk explains some of the command line parameters such as :
/p:DeployOnBuild
/p:DeployTarget=MsDeployPublish
/p:CreatePackageOnPublish=True
/p:MSDeployPublishMethod=InProc
/p:MSDeployServiceURL=localhost
/p:DeployIISAppPath="Default Web Site"
But where is the documentation for this - I can't find any?
I've been spending all day trying to get this to work and can't quite get it right and keep ending up with various errors. If I run the package's cmd file it deploys perfectly. If I run WebDeploy through Visual Studio it also works perfectly.
But I want to get the whole deployment running through msbuild using these arguments and not a separate call to msdeploy or running the package .cmd file. How can I do this?
PS. Yes I do have the Web Deployment Agent Service running. I also have the management service running under IIS. I've tried using both.
Args I'm using :
/p:DeployOnBuild=True
/p:DeployTarget=MsDeployPublish
/p:Configuration=Release
/p:CreatePackageOnPublish=True
/p:DeployIisAppPath=staging.example.com
/p:MsDeployServiceUrl=https://staging.example.com:8172/msdeploy.axd
/p:AllowUntrustedCertificate=True
giving me :
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets (2660): VsMsdeploy failed.(Remote agent (URL https://staging.example.com:8172/msdeploy.axd?site=staging.example.com) could not be contacted. Make sure the remote agent service is installed and started on the target computer.) Error detail: Remote agent (URL https://staging.example.com:8172/msdeploy.axd?site=staging.example.com) could not be contacted. Make sure the remote agent service is installed and started on the target computer. An unsupported response was received. The response header 'MSDeploy.Response' was '' but 'v1' was expected. The remote server returned an error: (401) Unauthorized.
IIS7 + related answer ....
Ok - here's what I ended up doing. More or less, following the post by Simon Weaver in this thread/question.
But when it comes to the MSBuild settings .. most people here are using following setting: /p:MSDeployPublishMethod=RemoteAgent which is NOT RIGHT for IIS7. Using this setting means TFS tries to connect to the url: https://your-server-name/MSDEPLOYAGENTSERVICE But to access that url, the user to authenticate needs to be an Admin. Which is fraked. (And you need to have the Admin-override rule thingy ticked). This url is for IIS6 I think.
Here's the standard error message when you try to connect using RemoteAgent :-
Standard 401 Frak Off u suck RemoteAgent, error
C:\Program Files
(x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets
(3588): Web deployment task
failed.(Remote agent (URL
http://your-web-server/MSDEPLOYAGENTSERVICE)
could not be contacted. Make sure the
remote agent service is installed and
started on the target computer.) Make
sure the site name, user name, and
password are correct. If the issue is
not resolved, please contact your
local or server administrator. Error
details: Remote agent (URL
http://your-web-server/MSDEPLOYAGENTSERVICE)
could not be contacted. Make sure the
remote agent service is installed and
started on the target computer. An
unsupported response was received. The
response header 'MSDeploy.Response'
was 'V1' but 'v1' was expected. The
remote server returned an error: (401)
Unauthorized.
So .. you need to change your MSDeployPublishMethod to this:
/p:MSDeployPublishMethod=WMSVC
The WMSVC stands for Windows Manager Service. It's basically a newer wrapper over the Remote Agent but now allows us to correct provide a user name and password .. where the user does NOT have to be an admin! (joy!) So now you can correct set which users u want to have access to .. per WebSite ..
It also now tries to hit the the url: https://your-web-server:8172/MsDeploy.axd <-- which is EXACTLY what the Visual Studio 2010 Publish window does! (OMG -> PENNY DROPS!! BOOM!)
And here's my final MSBuild settings:
/p:DeployOnBuild=True
/p:DeployTarget=MSDeployPublish
/p:MSDeployPublishMethod=WMSVC
/p:MsDeployServiceUrl=your-server-name
/p:DeployIISAppPath=name-of-the-website-in-iis7
/p:username=AppianMedia\some-domain-user
/p:password=JonSkeet<3<3<3
/p:AllowUntrustedCertificate=True
Notice the username has the domain name in it? Ya need that, there. Also, in my picture, I've allowed our DOMAIN USERS access to the website for managament. As such, my new user account i added (TFSBuildService) has Membership to the Domain Users group ... so that's how it all works.
Now - if u've read all this, have a lolcat (cause they are SOOOOOOOO 2007)....
Here's the steps that finally worked for me.
I wanted to get the working with RemoteAgent, but couldn't get that working no matter what I tried.
You don't have to do exactly like this, but this is how I got it working
Configure WMSVC
Make sure the service is started
Configure an IIS user (click on the TOP MOST SERVERNAME in IIS) and go to 'IIS Manager Users'. I suggest making it different to your windows name.
Make sure the user account for WMSVC (LOCAL SERVICE for me) has write permissions to the IIS directory you're using
In my case I'm using an SSL certificate (even though it is hitting localhost).
Remember these are all arguments to MSBUILD added within the TFS Build definition
/p:DeployOnBuild=True
/p:DeployTarget=MSDeployPublish
/p:MSDeployPublishMethod=WMSVC
/p:MsDeployServiceUrl=https://staging.example.com:8172/msdeploy.axd
/p:username=sweaveriis
/p:password=abcd1234
/p:DeployIisAppPath=staging.example.com/virtual_directory_name
/p:AllowUntrustedCertificate=True
Note: staging.example.com is actually the local box with a hosts file entry pointing to 127.0.0.1. Localhost would probably work here too.
Useful articles:
Troubleshooting MSDeploy issues
More troubleshooting
Unfortunately there is not a lot of info on this at this time. I'll give you some hints at the end of this message though.
About your problem, I've seen this before when I was trying to deploy using MSDeploy and the account that I was running on didn't have the permissions to execute the deployment on the target machine. So you need to take a look at the account that your builds are running under, and see if this account has the rights to deploy to the target machine. If not then you have a few options; grant the build user the rights, or pass the username/password in.
If you want to pass the values in then you will have to define an item named MsDeployDestinationProviderSetting and its metadata will have to contain the necessary values.
So in your project file (or via properties passed in) define something like the following.
<PropertyGroup>
<UserName>USERNAME-HERE</UserName>
<Password>PASSWORD-HERE
</PropertyGroup>
About where can you find documentation, like I said before there is not much out there yet. But since the entire Web Publishing Pipeline is captured in MSBuild targets and tasks you can learn alot on your own if you are familiar with MSBuild. If you take a look at the .csproj(or .vbproj) files for web projects created with Visual Studio 2010 you'll notice a statement like the following:
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
This imports the file located at
%ProgramFiles(x86)%\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets, and this file in turn imports
%ProgramFiles(x86)%\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets
So in order to learn this topic in detail right now you have to inspect those files and learn for yourself.
I'm going to be working on something that will be covering these technologies in detail, but it won't be out for quite a while, and I still have a lot to figure out myself about this stuff.
Can you try out the username/password deal and let me know if it worked for you?
I had a similar problem and the solution was to have the following parameter:
/p:MSDeployPublishMethod=RemoteAgent
Here are all of the parameters I used.
/p:DeployOnBuild=True /p:DeployTarget=MSDeployPublish /p:MSDeployPublishMethod=RemoteAgent /p:MsDeployServiceUrl=http://my-server-name /p:username=myusername /p:password=mypassword
NOTE: I'm not using DeployIisAppPath because I'm building a solution and trying to build three web applications at once. Also I think your MsDeployServiceUrl should be just http://staging.example.com
It appears that when using InProc (which may be the default) for the MSDeployPublishMethod MSBuild ignores MsDeployServiceUrl and always tries to deploy to the local server. I changed it to RemoteAgent and all three of my web applications deployed successfully. I did notice that the Package file is nolonger contained in the MyWebApplication_Package folder, but that isn't a big deal to me.
Note that you can also set DeployTarget=Package -- this will prepare the package but not deploy it right away. For more info see this blog post.
For me the problem was that Web Deployment Agent Service was not started.
A simple net start msdepsvc fixed it. You could also set startup mode to Automatic on this service.
The arguments I'm using are:
/p:DeployOnBuild=True
/p:DeployTarget=MsDeployPublish
/p:MSDeployPublishMethod=RemoteAgent
/p:MSDeployServiceUrl=stagingserver
/p:DeployIisAppPath=test.local
/p:UserName=
You only need to specify the server name, and not the full path (no http needed).
Note that UserName is left empty to work around a bug with NTLM authentication (this way it uses the credentials of the TFS build agent for the deployment). see the accepted answer here
Here's how I got it to work. This was with Webdeploy 2.0. I am deploying on the same domain from our build machine to a dev webserver machine windows server 2008 r2. The account I am using to deploy is a service account on the domain that has administrator permissions on both machines. My solution includes a couple of unit test projects, an mvc3 project, and a couple of libraries under the solution. If you don't install MVC3 on the server you are deploying to look at http://www.iwantmymvc.com/2011-03-23-bin-deploy-aspnet-mvc-3-visual-studio for guidance.
/p:DeployOnBuild=True /p:DeployTarget=MSDeployPublish /p:DeployIisAppPath="Default Web Site/YourpplicationNameHere" /p:MsDeployServiceUrl=https://devserver02:8172/msdeploy.axd /p:AllowUntrustedCertificate=True /p:UserName=yourDomain\buildaccount /p:Password=password
The item I struggled with at first were the quotes around "Default Web Site/YourpplicationNameHere" That gives the partial error:
MSBUILD : error MSB1008: Only one project can be specified.
This happens when there are no quotes around Default Web Site/YourApplicationNameHere
The next error I got was because of the wrong username and password in my credentials for deployment. It gave this error:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets (3588): Web deployment task failed.(Remote agent (URL https://devserver02:8172/msdeploy.axd?site=Default Web Site) could not be contacted. Make sure the remote agent service is installed and started on the target computer.) Make sure the site name, user name, and password are correct. If the issue is not resolved, please contact your local or server administrator. Error details: Remote agent (URL https://devserver02:8172/msdeploy.axd?site=Default Web Site) could not be contacted. Make sure the remote agent service is installed and started on the target computer. An unsupported response was received. The response header 'MSDeploy.Response' was '' but 'v1' was expected. The remote server returned an error: (401) Unauthorized.
This was because the username and password I had in /p:UserName=/p:Password=did not include the domain for the user. Even though it the build was running under that user it would not deploy. So I hit the url directly https://devserver02:8172/msdeploy.axd in a browser to make sure it was operation and make sure the username and password worked. This is where I noticed I had to put in the domain/user to get it to work.
I hope this is OK to reply I figured some other poor soul with find these errors and this could help...
If you can deploy your applications with fileCopy, it is easy to customize the TFS workflow to do so.
I've used the CopyDirectory activity, with the help of these articles:
http://www.ewaldhofman.nl/post/2010/11/09/Part-14-Execute-a-PowerShell-script.aspx
and
http://geekswithblogs.net/jakob/archive/2010/09/01/tfs-team-build-2010-how-to-place-the-build-output.aspx
Very simple and straightforward.
I Configured the build service with a user account that has write privileges on the desired share.
Next, I created the CopyDirectory workflow step, configuring the source as BuildDetail.DropLocation + "_PublishedWebsites" and for the destination I created an argument, which I called "DeployPath", that can be filled in the build configuration.
Now I still have to implement a test to check if the build was successful before invoking the CopyDirectory activity. The articles I mentioned show how to do that. They also teach how to invoke a powershell script instead of CopyDirectory.

Resources