It should be just like this to pass the users credentials:
Service svc = new Service();
CredentialCache credentialCache = new CredentialCache();
NetworkCredential credentials = new
NetworkCredential(UserName,Password,Domain);
credentialCache.Add(new Uri(svc.Url), "Basic", credentials);
svc.Credentials = credentialCache;
string result = svc.SayHello();
Wes
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Nic Stronell
Sent: Wednesday, July 02, 2008 6:36 PM
To: [email protected]
Subject: RE: [OzTFS] Adding Proxy to TFS calls
I may not have been clear. We've developed a standalone application
that talks to our (externally exposed) TFS server (we use no TFS Proxy).
Some of our developers who use this application are at external offices
(not ours) and those offices have HTTP proxies that we need to be able
to authenticate through.
I understand that all the TFS traffic uses web services under the hood,
so these are getting stopped by the HTTP proxy.
We can build a screen in the standalone application to capture some
credentials (supplied by the manager of the external office's network)
to use to authenticate to the proxy with, but how do I pass these
credentials to FS calls? - the actual TFS web service calls are not
directly exposed in the Microsoft.TeamFoundation.Client /
Microsoft.TeamFoundation.WorkItemTracking.Client namespaces.
Will the standalone application use the proxy settings of IE or Visual
Studio? I can't see how this would happen, but I'll get one of our guys
to test today.
Nic.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Grant Holliday
Sent: Thursday, 3 July 2008 2:44 AM
To: [email protected]
Subject: RE: [OzTFS] Adding Proxy to TFS calls
Do you mean that your developers have to go through a "TFS Proxy Server"
or a "HTTP Proxy Server" at the remote site?
If you mean "HTTP Proxy Server", then Visual Studio just uses whatever
the computer's proxy configuration is.
Open: Internet Explorer | Tools | Internet Options | Settings | LAN
Settings
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Martin Woodward
Sent: Wednesday, July 02, 2008 1:54 AM
To: [email protected]
Subject: Re: [OzTFS] Adding Proxy to TFS calls
Nic,
Regarding the TFSProxy server, there are two ways to control this in
code. One is a registry setting, and there is also an environment
variable that you can set in the local process if you didn't want the
setting machine wide. I think the environment variable name is
"TFSPROXY" but if you Google for "Martin Woodward TFSProxy environment
variable" you should find a blog post about it. (I've not got proper
internet access at the moment or I would find it myself)
Regarding WIT memory usage, are you connecting to a server with a lot of
team projects? The WIT stuff works by downloading a large ammount of
meta-data to support the client side rules etc and holds this in memory.
In normal API usage (when connecting from individual users machines)
this meta-data is downloaded and stored per user - however if you are
writing a server system used by many users (like Team System Web Access
does) then there is a way to get it to share the meta-data cache between
users. Give me a shout if you need information about that and I'll try
to dig it up from where I am.
Hope that helps,
Martin.
Nic Stronell wrote:
> We have built a custom application to enable our developers to track
> time into TFS work items. We are using the TFS libraries to make the
> connection to the TFS server, essentially:
>
>
>
> TeamFoundationServer tfs = new
> TeamFoundationServer("http://ourTFSserver.ourDomain.com", new
> NetworkCredential("username", "password", "ourADdomain"));
>
> WorkItemStore wistore = new WorkItemStore(tfs);
>
> WorkItem workItem = wistore.GetWorkItem(workItemID);
>
>
>
> Our issue is that some developers are offsite and need to go through
the
> proxy server at that site. I can't figure out a way to have this TFS
> access go through that proxy.
>
>
>
> Help appreciated.
>
>
>
> Also, if anyone know why the memory usage of the application jump 50MB
> on the "WorkItemStore wistore = new WorkItemStore(tfs);" command and
if
> this can be reduced, that would also be helpful.
>
>
>
> Nic.
>
>
>
>
> OzTFS.com - to unsubscribe from this list, send a message back to the
list with 'unsubscribe' as the subject. View the web archives at
http://www.mail-archive.com/[email protected]/
>
> Powered by mailenable.com, supported by www.readify.net
>
>
OzTFS.com - to unsubscribe from this list, send a message back to the
list with 'unsubscribe' as the subject. View the web archives at
http://www.mail-archive.com/[email protected]/
Powered by mailenable.com, supported by www.readify.net
OzTFS.com - to unsubscribe from this list, send a message back to the
list with 'unsubscribe' as the subject. View the web archives at
http://www.mail-archive.com/[email protected]/
Powered by mailenable.com, supported by www.readify.net
OzTFS.com - to unsubscribe from this list, send a message back to the
list with 'unsubscribe' as the subject. View the web archives at
http://www.mail-archive.com/[email protected]/
Powered by mailenable.com, supported by www.readify.net
OzTFS.com - to unsubscribe from this list, send a message back to the list with
'unsubscribe' as the subject. View the web archives at
http://www.mail-archive.com/[email protected]/
Powered by mailenable.com, supported by www.readify.net