Proxy Auto Configuration - tfs

I have configured our local tfs proxy against the Active Directory site for our local office using the below syntax:
tf proxy /add http://MyProxy:8080 /default:site /Site:LocalOffice /name:MyProxy
When I run
tf proxy /configure
it correctly identifies my site, and sets up the correct proxy.
However, I'm seeing inconsistent behaviour during get operations.
My understanding is that when run a get operation (either via tf get or through Visual Studio), it should automatically recognise that the site has a proxy, and configure it.
When I tried this on a VM that had never used a proxy, this seems to have worked fine. However, on my own machine, I went into VS and removed the proxy settings, then closed the VS instance. Then I attempted a tf get from powershell, and found that it did not configure the proxy correctly (I confirmed using tf proxy).
I'm expecting the proxy to be automatically configured for any user who is currently in our office, overriding any manual settings they have. Is there additional setup I need to do in order to do this?
Update
Based on the documentation here, I would expect it to set up the proxy on a my machine when I ask for the code
If you add a proxy record with the default set to site, the first time that a developer from within the specified Active Directory domain performs a get operation, Team Foundation Server will redirect that developer's request to the proxy that is specified by the record that is associated with the site.
However, this doesn't happen even if I clear out the proxy settings in VC (and untick the box) and perform a get after a reboot. I can understand it perhaps not overriding a setting I enter by hand, but I would expect it to configure when no setting is present at all.

You need to use the /default flag:
tf proxy /add http://MyProxy:8080 /default:site /Site:LocalOffice
A full description of how this works can be found on: http://blogs.msdn.com/b/deepakkhare/archive/2014/05/06/tfs-proxy-unsung-hero.aspx

Related

Add a URL path prefix to artifactory installation (Docker)

I'm running Artifactory CPP CE 7.7.3 and Traefik v2.2 using docker-compose. The service is only available over http://localhost/ui/. Now, what I need is an option which allows to add a URL path-prefix (e. g. http://localhost/artifactroy/ui).
My Setup
I used the described setup process from the Artifactory Docs suggest it.
My docker.compose.yaml is the official extracted from the jfrog-artifactory-cpp-ce-7.7.3-compose.tar.gz: ./templates/docker-compose.yaml.
I'm using a reverse proxy (traefik). For this, I've added the necessary traefik configuration lines to the docker-compose-file. Here is a small extract what I've added:
[...]
labels:
- "traefik.http.routers.artifactory.rule=Host(`localhost`) && PathPrefix(`/ui`)"
- "traefik.http.routers.artifactory.middlewares=artifactory-stripprefix"
- "traefik.http.middlewares.artifactory-stripprefix.stripprefix.prefixes=/"
- "traefik.http.services.artifactory.loadbalancer.server.port=8082"
With this I managed to access artifactory over http://localhost/ui/.
Problem:
I have multiple small services running on my server, each of this service is accusable via http://localhost/<service-name>. This is very convenient and want to make clear that this URL is related to this service on my production server.
Because of this, I want to have an URL like http://localhost/artifactroy/ui/... instead of http://localhost/ui/...
I struggled getting artifactory setup in that way. I already managed to get a redirection from typing e. g. http://localhost/artifactroy/ to http://localhost/ui/ but this is not what I want on my production server.
What I did
Went through the documentation in hope of finding an option which I just can passt to artifactroy to add a prefix (Not successful).
Tried configure traefik two full days, to alter headers to get the repose point to http://localhost/artifactroy/ui/... (Only partially successful, redirection didn’t work afterwards)
Tried finding the configuration which is responsible for configure artifactory in $JFROG_HOME/artifactory/var/etc (Not successful)
Is this even possible? Help is highly appreciated..
This example (even though not traefic example) gives you a direction to implement it. There are certain routes already used within the product. You need to add a context over and above it to ensure all comes via the new context path.
https://jfrog.com/knowledge-base/how-to-remove-artifactory-from-the-context-url-in-artifactory-7/

TFS 2012: URL not reachable

after a servercrash we installed TFS on a new server. I used Application Tier only for
restoring the databases, and in the Team Foundation Express Administration Console everything shows up.
When on the server I surf to the URL I get a Windows login screen and after entering credentials it proceeds to the website.
However, if I try this from an PC, the URL is not reachable.
I've checked the firewall (even disabled it for test), put port 8080 is added.
I gues something is wrong with the authentication, hence the Windows login screen, but fail to find.
Anyone ideas?
I use TFS Express 2012.4 on Server 2019
Since you are able to access http://localhost:8080/tfs url and work properly.
This tell you TFS is up and running. So issue should not related to IIS side.
Try to disable loopback by creating registry key under the
location
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\DisableLoopbackCheck
and assigned the value “1”.
Details follow this blog.
If you do not want to disable your firewall during daily usage. Make sure Port 8080 is open in Windows firewall.
Also take a look at this similar issue: TFS url with server name is not working

Is it possible to share my localhost with someone on a different network?

I am working with a designer and I'd like them to have access to the interactions I've implemented on the site we're working on. However this time, I have 2 issues. My localhost is configured to a subdomain:
http://store.teststore:3000/ and we're on different networks. Is there anyway to work around this?
ngrok should work for you. Download and install it following these instructions here: https://ngrok.com/download. Documentation on how it is used can be found here https://ngrok.com/docs. Once installed running the below command should work for you (depending on the hosting environment):
ngrok http -host-header=rewrite store.teststore:3000
You will need to give the URL generated by ngrok and displayed in the cmd prompt to the designer.
Update: Handling absolute redirects
Based on your comment it sounds like, after login, your site does an absolute redirect (the full URL is specified). If it is possible I would change your code to do a relative redirect where the domain is omitted. You could also make your root domain configurable in the absolute redirect and configure it to be the ngrok domain provided for now. Lastly, you could attempt to configure your DNS with a CNAME record following ngroks Tunnels to custom domains documentation. This last option, however, requires a paid for ngrok subscription.
Install ngrok if you haven't yet and CD into your project directory and invoke ngrok. Note Your application must be running locally on the same port number ngrok will be running.

Can't change notification url on team foundation server 2010 to domain name

Here is a bit of background on the setup:
I have a server called "File-Serv".
I have an NS entry that redirects clients.mydomain.com to the ip address of the modem which in turns forwards the request to the computer (this is all working perfectly so far)
I have apache running on port 80 and one IIS site running on port 8080
I installed TFS and changed the binding of the TFS site to use port 8081 so that it doesn't clash with the rest.
I installed team explorer on the server and was able to connect to TFS and add a project, etc.
The problem is now that i want to access TFS from all other computers on the network and more importantly still access TFS if i'm not connected to the local network but i can't
What i have tried is to change the notification url to clients.mydomain.com and change the binding on IIS to match. when i go to clients.mydomain.com:8081/tfs/web it asks me for a username and password
I do not have active directory installed and i have created users for all the users needed on the server but when whatever combination i put for username/password, i can never ever log in.
I've tried the following usernames with no success:
Administrator
File-Serv\Administrator
clients.mydomain.com\Administrator
I'm really not sure what i'm missing here.. I have read forums upon forums without any resolution. Help!
P.S. This is my first question on stackoverflow after using the site religiously for 2 years now!

Trying to call svn.exe from batch file called by .NET webpage - odd results

The situation: I have a mvc.net web page which, when called, runs a batch file on my server using System.Diagnostics.Process.Start and cmd.exe. The batch file contains a line that runs "svn.exe update myfilepath" and should therefore update the files on the server.
What's happening?
- the batch file is running, but the call to svn.exe does nothing, nor produces any error messages.
- if I run the batch file by double clicking, the svn command DOES run successfully.
I guess this is a security issue, but I'm no expert on this and I cannot make any headway.
The site is hosted on Windows Server 2008 R2 and the app pool is using the ApplicationPoolIdentity system. I have tried running the app pool as Network Service and also adding Network Service as a user that can Read/Execute to svn.exe.
Please help!
This could be proxy related. It's possible that you access the Internet via a proxy, but that the user profile for the app pool identity isn't configured like this. You may need to use a domain account that you can log on as in order to create a suitable user profile. You will also need to make sure IIS is loading the profile by ticking the appropriate option.
(Another possibility is that the working directory for the process you are starting is not set correctly to the root of your Subversion working copy. We've established this wasn't the problem in your case.)

Resources