Configure TFS 2015 GIT Clone URL to use a DNS alias - tfs-2015

Is there a way to configure TFS 2015 Update1, so that the Git clone URL it displays in the web portal is a DNS alias of our choosing?
Right now it is using the server's actual name but our IT department usually has us connect to TFS via an alias like tfs-org.is.acme.com instead of the server's physical name like tfs1.is.acme.com. This facilitates future migrations where they can move a collection to a new machine (usually when upgrading to a major version of TFS) and then change just the alias and not impact every developer's "origin" URL (or workspace config).

If you refer to this URL.You can't edit this link, this is based on the TFS server url.
Unless you'd like to edit the TFS server url to meet your needs. However, if you want to edit the server url and use https, there are also many limitations. More info from MSDN: https://msdn.microsoft.com/en-us/library/aa833872(v=vs.120).aspx

Related

How to move MVC application from one server to another?

Currently we are subscribed to GoDaddy for their dedicated server lease, and now we are considering just purchasing our own server and just moving off of GoDaddy.
I have no idea how to put all of my source code from one server to another and also move the database and other files. Please explain what process has to be followed for this.
Also wanted to ask if their would be any changed for the third party tools i have used in my application?
To migrate my web application from one server to another I would do following :
Make a list of all transferable which would be:
Latest and running Source code on the server (ideally located in wwwroot)
database back up files (usually .mdb or .bak)
Copy source code and database back up to targeted server. Obviously depending upon type of the server you may need to set up the site in IIS and and point it to new directory
Restore database backup on database server
edit web.config to point to new database server and credentials.
Another important tip: If you have kept domain name with GoDaddy and only changing hosting server you may also need to change namedserver of you domain, without which you will not be able to point your domain to new hosting provider!
You may not succeed on the very first attempt of copying your stuffs to target server. It's always better to maintain back up so that you can copy files again and again in case something goes wrong on the new server.
As long as third party charges are concerned please check with your service providers they may be able to guide you best. For above simple stuff you do not need to worry about license stuff.
All the best!

Hybris: cannot find CMSSite associated with current URL

I created a new Hybris extension using one of the given templates.
The build was successful and I am able to start the server, too.
But when opening the weblink from the HAC I get the error "Cannot find CMSSite associated with current URL".
Are there suggestions to solve or investigate this issue?
You need to use hosts file mappings or use the site-ID parameter to avoid a 500 error.
Please follow these link
https://wiki.hybris.com/display/accdoc/Just+One+Storefront
https://help.hybris.com/6.3.0/hcd/8ae0711f86691014877ae05249b2f5ac.html (Hybris 6)
If you have administrator rights, it is a good idea to add the following entries in your host file.
127.0.0.1 hybris.local [Example]
The etc hosts modification allows the accelerator to identify sites (CMSSites) from the url. This makes the URL neat and clean.
After host file change, You can access the site like this
http://hybris.local:9001/yacceleratorstorefront/
If you don't do this, the sites would need to be identified with an additional request parameter like this
http://localhost:9001/yacceleratorstorefront/?site=hybris&clear=true
Error "Cannot find CMSSite associated with current URL".
This is because you are not telling hybris which site you want to access.
There are three ways to do that
Simply pass your siteID as a request parameter(?site=SiteID) in your first request which helps the Hybris to understand which site you are trying to access. Let's say I'm trying to access powertools site then URL would be
https://localhost:9002/yacceleratorstorefront?site=powertools
Access site with siteID as DNS name. You can make 127.0.0.1 host with <siteID>.local. Let's say I want to access a powertools (It's CMSSite id for powertools), then add an entry like 127.0.0.1 powertools.local in your host file and then access your site using http://powertools.local:9001/yacceleratorstorefront/ instead of localhost
Add a new regular expression of your choice in the urlPatterns of your CMSSite. So that you can access your site as you want. Let's say I want to access site using localhost URL only and without passing ?site=powertools ever. So I need to add a new regex like (?i)^https?://[^/].*$ to urlPatterns of powertools CMSSite. Now I can directly open powertools site using https://localhost:9002/yacceleratorstorefront/
You can do that using Impex as well
$siteUid=mysite
# CMS Site
INSERT_UPDATE CMSSite ; uid[unique=true] ; urlPatterns ;
; $siteUid ; (?i)^https?://[^/]+(/[^?]*)?\?(.*\&)?(site=$siteUid)(|\&.*)$,(?i)^https?://$siteUid\.[^/]+(|/.*|\?.*)$,(?i)^https?://[^/].*$ ;
Find the detailed answer here
In addition to the host entry, make sure to add the appropriate regular expression for your website.
The CMS site has an attribute called urlPatterns. This is a list of regular expressions that the website CMS filters match to determine which storefront a user is trying to access.
The simplest thing is to add a further regular expression to the CMS site like the one below:
(?i)^https?://[^/]*/yacceleratorstorefront((?![\?\&]site=).)*
At run time, you can can do it in the hybris Management Console(hMC). Navigate to WCMS Website Your Site Name Properties tab and edit URL Patterns section.
To make the change permanent, add the appropriate code to the CMS site setup ImpEx script run during the project data phase of initialization e.g. for electronics storefront
# CMS Site
UPDATE CMSSite;uid[unique=true];urlPatterns;
;electronics;(?i)^https?://[^/]+(/[^?]*)?\?(.*\&)?(site=electronics)(|\&.*)$,(?i)^https?://electronics\.[^/]+(|/.*|\?.*)$,(?i)^https?://api\.hybrisdev\.com(:[\d]+)?/rest.*$,(?i)^https?://[^/]*/yacceleratorstorefront((?![\?\&]site=).)*;
This issue usually comes up if the server was started with unsatisfied spring bean dependencies. Please check your server startup log to confirm which particular bean or beans failed to initialise.

Changing URL in VisualSVN

Have 5 year old server ready to decommission and have new server with VisualSVN just installed. Our old server had a very memorable URL such as svn://company.com. Now the path on the new server is terrible - https://server.company.com:8443/svn/MyRepo. I'd much prefer to have something much shorter with a dozen engineers needing to use it.
I've read other posts saying we should visit httpd.conf but I can't even find that file in the conf folder.
I've also read that VisualSVN support states they cannot support this as of mid-2009. They also suggest not changing the httpd.conf file.
Anyone have answers on the topic?
OK, lets split problem on separate small tasks
Convert server.company.com into company.com
Pure DNS issue, write needed data in DNS-zone for internal domain or use local hosts-file
Convert company.com:8443 into company.com
Start VisualSVN Server (plain VisualSVN is SVN-plugin for Visual Studio) on 80 port
Convert company.com/svn/ path into company.com/
Read my answer in the part "How to have DAV-SVN in the site-root" ("Implementation", p.3)
Remove repository name from URL
Default config implies using more than one repo from one server. If it is not your case and you have one repo, you can modify Location data and use wanted and needed SVN directive (we'll consult with Subversion Book for this, "Basic Apache Configuration" topic)
You can instruct Apache to delegate the handling of all URLs... to a
DAV provider whose repository is located at /var/svn/repository using
the following httpd.conf syntax:
<Location ...>
...
SVNPath /var/svn/repository
</Location>
Note - /var/svn/repository in example is directory, which contain immediately our single repository
Viola! Task solved?!
When VisualSVN team tell about
not changing the httpd.conf file
they have in mind (I think) the need for the user
have a copy of customized httpd.conf, because on every VisualSVN Server update httpd.conf will be replaced with default
self-integrate their own changes to changed by developers configuration
be intelligent and smart and don't complaint to VisualSVN team about troubles, caused by local changes, not by problems in vanulla product
Beginning with VisualSVN Server 3.5, it is possible to adjust the URL to your repositories. In other words, prior to version 3.5 the URL always looked like https://example/svn/myrepo/. It is now possible to change the "/svn" part to "/repos" or any other prefix you'd like. Moreover, you can completely remove the prefix.
Follow these steps to customize the URL prefix:
Start VisualSVN Server Manager.
Go to Action | Properties.
Select Network tab.
Select Customize under Repositories URL:
You can select "Empty URL prefix" option to remove the "/svn" prefix completely or select "Custom URL prefix" and specify the prefix you'd like to use in the URL (for example, "repos").

What is the best practice for setting the SccAuxPath property in a Visual Basic .NET project for a distributed team?

We've recently moved to Team System and now a remote team needs access to our source. However, they use a different IP address to access the Team System server, and whenever they try to open a project, they are prompted to check out and change the project. Is there a way to work around this? It seems to be the 'SccAuxPath' property which is the problem.
EDIT: I found this article which explains that there are three ways to support distributed teams using TFS - VPN, reverse proxy, and a hosted solution. I'm accepting Jason Whitehorn's answer as he's suggesting the first option, VPN, which seems the best. If this isn't possible for us I'll suggest the reverse proxy option.
Indeed it is the SccAuthPath causing the problem. It has an explicit reference to TFS server. Modify the project file and use the keyword SAK for all of the Scc properties. This tells TFS to figure out what the values are because it "Should Already Know" (Get it? SAK? Funny chaps those TFS devs).
In my case I changed:
<SccProjectName>%24/Project/Trunk/Source/A.Library.Tests</SccProjectName>
<SccLocalPath>.</SccLocalPath>
<SccAuxPath>http://myserver:8080</SccAuxPath>
<SccProvider>{4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}</SccProvider>
To this
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
I would assume (from the problems you are having) that your remote team is not accessing TFS via a VPN.
Regardless of how you local team and remote team are accessing TFS, the short of it is that both teams need to use the same server name when accessing TFS. Might I suggest using DNS entries instead of IP addresses. The DNS entries wouldn't need to be externally visible, and the local team could point to one IP while the remote team pointed to another.

IIS 6 - Create a virtual directory that points to an IIS application on a different server?

Here's the scenario:
Server A is hosting the 'main' application (www.example.com)
Server B is hosting a support application (b.example.com)
They are connected internally to each other through a 192.* address and are both externally available through DNS
Server A has several virtual directories that are mapped through UNC shares:
www.example.com/virtual1 -> \192.168.1.1\virtual1 (on serverB)
I'd like to be able to run the application that sits on Server B (served through IIS) and make it appear as if it's running on serverA:
www.example.com/application -> b.example.com/app
I'd still want to be able to access server B directly
b.example.com/app
Any ideas?
Edit:
Turns out the application behind the proxy refused to let me dynamically change it's form "action" (nor did it let me change anything else). I was able to display the data from the server; just couldn't post :(
So both answers pointed me in the right direction. I used a proxy:
http://code.google.com/p/iisproxy/
I created a virtual directory on Server A that matched the directories I needed on Server B - and it worked! :-)
This should be possible in IIS. I remember I had to do this once.
Just create a virtual directory using the UNC path pointing to \\ServerB\SharedAppDirOnB and (if necessary) "Connect As..." using the credentials needed for Server B.
If you have problems with "Connect As..." it could be a folder permissions problem of Server B. Try the following thing: add a new user account on your main server which has the same name and password as the account on Server B. It sounds stupid, but I remember it solved my issue. You could for example add a new user account on both servers: "IisCommon" with the same passwords on both servers. Then make sure you give all necessary file access permission to the folder on server B (and the Share permission!). Try first connecting manually using Windows Explorer if you can access the share.
Make sure that you mark the new virtual directory as application and give the right execution permissions.
Another solution would be some kind of reverse proxy. I used a third-party product on IIS 6.0 for this: ISAPIrewrite for IIS. The "proxy" mode allows you to "forward" request made to your main server (www.example.com/...) to your other server, but serving the resulting responses as if they were processed by your main "domain" application. The feature is called "proxy directive". It accepts regular expressions.
Since serving the virtual directory from server A through a UNC share apparently does not work, you need to serve b.example.com/app from server b.
DNS resolves domain names to IP addresses. You are asking for the same domain name to resolve to two different IP addresses, based on a different URL. This is not something that IIS or Windows can do.
Your options are:
write a proxy service on server A that passes requests on to server B. If you want it completely transparent (not just a redirect), you'd have to stream back the response as well. This is not trivial, but possible.
Put the server B page into an IFRAME on a new page on server A.
Use a load balancer in front of both servers that can split traffic based on URL