Passthrough (impersonation) Authentication With TFS Api?

Oct 25, 2010

I'm trying to enable passthrough or impersonation authentication inside an ASP.NET website that uses the TFS2010 API.I've got this working correctly with Cassini, however with IIS 7.5 (Windows 7) something is going wrong.I found this blog post on the subject, and tried the following:

private static void Test()
{
TfsTeamProjectCollection baseUserTpcConnection =

[code]...

View 2 Replies


Similar Messages:

Security :: How To Set The Authentication To Basic And Impersonation

Oct 12, 2010

I have an Intranet which is on IIS 7.0. I want to authenticate my users and know who is logged in. What options do I have to set in IIS Authentication part that my users do not need to type their user name and password to login to Intranet. I have set the Authentication to Basic and Impersonation, but it is asking user name and password.

View 3 Replies

Authentication / Impersonation With Call To WCF Service

Nov 3, 2010

I have a web page that calls a WCF service that makes a sql database call using Integrated Security. I get an error saying, "Login failed for user 'CorpDomainServerName01$'". I want it so that it all layers will execute under the user's AD credetials (working in an intranet), ie: "CorpDomainAlbert". On the server (Win 2008/IIS 7), I have Windows Authentication turned on and everything else off (including Anonymous) under Authentication for both the web client and the WCF service. Here's my client web.config:

<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0"/>
<authentication mode="Windows"/>
<identity impersonate="true"/>
<customErrors mode="Off"/>
</system.web>
<system.serviceModel>
<bindings>
<netTcpBinding>
<binding name="NetTcpBinding_IMyService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="524288" maxBufferSize="65536" maxConnections="10" maxReceivedMessageSize="65536">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
<!--<security mode="Transport">
<transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
<message clientCredentialType="Windows" />...........................

View 1 Replies

Security :: Impersonation With Forms Authentication?

Mar 1, 2011

I have been looking for code samples on how to do impersation with forms authentication for the current logged on user. I have found samples on the internet and this site and most seem to refer to windows authentication not forms. I am wanting to run specific blocks of code under the current user's credentials to access lists of files on servers on the internal network and display them in the page.I found this article on MSN for using impersonation in various ways, http://support.microsoft.com/kb/306158 and I was able to use the section of code where it describes how to Impersonate a Specific User in Code. This works quite well with forms authentication but requires a service account in AD with login and password. One the same page is a sample of how to impersonate the authenticated user in code, but this only seems to work with windows authentication. As have all other samples I could find, such as the article here,http://www.codedigest.com/codedigest/9-identity-impersonate-at-code-level-in-asp-net.aspx. But trying those with forms authentication results in the error "Unable to cast object of ype 'System.Security.Principal.GenericIdentity' to type 'System.Security.Principal.WindowsIdentity'" Since there is no windows identity with forms authentication.Can anyone point to an article that describes how to do impersonation with forms authentication at the code level?

View 4 Replies

How To Disable Anonymous Authentication And Enable .net Impersonation

Feb 12, 2010

I been strugling with this for 2 days now without comming any closer to solution. I have read 20-30 threads alteast and stil can not resolve this.I have disable anonymous authentication, enable asp.net impersonation.I have added <identity impersonate = "true" />I have added the a user to the security logins that is connected to the database I try to connect tThis is the connectionstring I use:

Data Source=IPTOSERVER;Initial Catalog=Phaeton;User Id=User;Password=Password;errormessage

View 6 Replies

Security :: Active Directory User Impersonation With Forms Authentication

Aug 31, 2010

I've written a small ASP.NET 3.5 application to allow users to update selected account attributes on their own. Everything works fine when I use Basic Authentication, but because the dialog that is presented is less than ideal, I'd like to use forms authentication to give the users more instruction on how to log in. My problem is that in order for the user to update their account information, I have to have the application impersonate them for the update actions. I've scoured the internet trying to find a solution to my issue, but nothing fits or works. I have tried setting the web.config:

[Code]....

I also tried using the LogonUser method to create a user token and backend the authentication that way, and it doesn't work either.

[Code]....

View 2 Replies

To WCF - Passthrough Security?

Aug 11, 2010

I have a MVC website that sits on top of a WCF service. The WCF service is also accessible to the internet with username/password authentication using message security and certificates. This is setup and working.

Both the website and the service use the same membership store, using the membership API.

A user can log onto either the website or the service using the same credentials. However, when the website calls the service, it needs to pass the credentials of the currently logged on user. I can get the username from

Membership.GetUser().UserName

but I can't get the password!

Is there another way to essentially pass the website user credentials to the service?

View 1 Replies

Web Forms :: Set The PassThrough Property For A Server Control?

Mar 10, 2010

Basically I have a master page named Flr.Master that has in it a reference to a web server control which appears to serve as a footer. Here is the referenceto the server control in the master page:

<Cloister:Footer id="footerPage" runat="server" />

I also have an asp.net web form named default.aspx, with a code behind file named default.aspx.cs.

Now I am given these instructions which I don't understand:

1.) In the master page Flr.Master add a pass through property to the footer controls AddStatistics propertry.

2.) In the LoadPage method for default.aspx.cs set the AddStatistics property to to "true".

I don't have access to the sourcecode for the server control, but I don't think I need it. I only need to figure out steps 1 and 2.

View 2 Replies

C# - What's The Difference: Windows Authentication, Passport Authentication And Form Authentication

Sep 17, 2010

Just going to start making a web application and was wondering which was better, or at least what are the main differences between them (as it probably matters what I am using them for)?

View 3 Replies

Configuration :: When And Why Use Impersonation

Aug 10, 2010

what is impersonation and when, why to use it?I am not getting it.

View 1 Replies

Can Allow .NET Impersonation By Role

Sep 7, 2010

I modified the ASP.NET login control to also allow specifying UserRole ('Employee' or 'Volunteer'). Users are authenticated via a call to a webservice written by our client, which accepts username/password/role and returns true or false.If role is 'Employee' it represents an active directory user. The application should impersonate the user with the given username/password.If role is 'Volunteer' the application should run under a set Windows account whose username/password are known in advance (i.e. hard-coded in web.config file).

View 1 Replies

Security :: Impersonation In .net 2.0

Mar 4, 2010

what is impersonation in asp.net? Is authentication and impersonation both are same ?I googled and found both are one type of security.

View 3 Replies

C# - Impersonation And NetworkCredential?

Jan 14, 2010

I need to pass a NetworkCredential object with the credentials of the currently impersonated user to a web service from an asp.net application.My code looks like this:

WindowsIdentity windowsIdentity = HttpContext.Current.User.Identity as WindowsIdentity;
WindowsImpersonationContext context = windowsIdentity.Impersonate();
try {

[code]...

View 2 Replies

Can Use Masterpages With Selective Impersonation

Feb 25, 2010

The masterpage of my site is using a control that reads data from a network share. To make this work on all pages I'm having to enable impersonation for the whole site. But what I want to do is only enable it for the pages that actually read/write to the share. Eg:

<location path="SystemAdmin">
<system.web>
<identity impersonate="true" password="abcdefgh" userName="MYDOMAINAdministrator" />
<authorization>
<allow roles="Admin" />
<deny users="*" />
</authorization>
</system.web></location>

View 4 Replies

Security :: .NET Impersonation / How To Do The DB Connection

Mar 13, 2011

We are in the process of building ASP.NET windows auth application. Where user need to interact with other internal system using the same single sign on. To interact application DB the system relies on App Pool account, for this we are every time doing the imporsanation to before every DB call. We can not have all useres added to DB, or create an SQL account. Which requires password and user to store in Web Config. We can encrypt it again you encrypt with what and etc ..So we have one windows account wihich same windows account used for our app pool as well.

I would like to know from the team is what is the best way to do the DB connection in this case?What is the implcations if we imporsanate the DB calls based on the app pool account ? Is it a best practice? I have read it creates its own thred and stuff, Do we need to worry ?

View 1 Replies

C# - Impersonation Memory Leak

Feb 9, 2011

On http://msdn.microsoft.com/en-us/library/w070t6ka(v=VS.100).aspx there is an example on how to do impersonation with .net 4.0. We have used this example in a class that inherits IDisposable for ease of use. However, when we use this class in a asp.net web application, we notice a slight but steady increase of Pool Paged Bytes in performance monitor. After a week, the application crashes.

I've tried different implementations of the impersonation-class, using http://msdn.microsoft.com/en-us/library/w070t6ka(v=VS.90).aspx and http://support.microsoft.com/kb/306158 as reference, but they all show the same leak.

Where does this leak come from? Is there a problem with the windows api? We are running Windows 2008 R2.

This is our current version of the impersonation class:

public class Impersonator : IDisposable
{
public Impersonator(string username, string domain, string password)
{
if (!ImpersonateValidUser(username, domain, password))[code]....

And this is the performance monitor graph of two webservers using different versions of the class:

When we disable the class, and use global impersonation via web.config, those lines are completely flat.

Update,I have made a test-application that successfully reproduce the problem. It can be downloaded here:

http://rapidshare.com/files/447325211/ImpersonationTest.zip

The result over 18 hours looks like this:

View 1 Replies

Security :: Impersonation In SharePoint?

Apr 13, 2010

I noticed impersonation is turned on by default in MOSS web configs. I tried disabling it but the web app returns an error. So my question, is it possible to disable impersonation in MOSS? If it is possible are there any special considerations I should be aware of?

If you're interested in why I need to do this...I need to have a custom web part (developed with SmartPart) talk to a separate SQL server using the application pool rather than the current user (Kerberos is enabled). If I set the authentication mode to NTLM I get NTAuthority/ANonymous login errors from my SQL connection. If I turn Kerberos on, the currently logged in user's credentials are passed. If I hard code the user id and password in the connection string it seems to ignore it and default to whichever security model is in place (NTLM or Kerberos).

View 6 Replies

Security :: Impersonation Not Working?

Jun 30, 2010

I've added the identity tag for impersonation. I've configured my site under IIS 5.1. The identity i've added is my domain username/password. But when I run any exe file from my asp.net file, it still runs under "aspnet" user name.

View 1 Replies

Security :: Looking For Video About How To Use Impersonation

Aug 6, 2010

suggest me a good Video to look at that can give me a start on how to use Impersonation?

View 1 Replies

Security :: Impersonation And Directoryentry?

Dec 27, 2010

I am trying to use impersonation on an IIS server while I access Active Directory data. The following code works fine on the localmachine but when I put this same code on an IIS server I get an error: System.DirectoryServices.DirectoryServicesCOMException: An operations error occurred.

If I remove the top 4 lines and add my ID and passcode to the DirectoryEntry, everything works fine. I would prefer to not have my id and passcode anywhere on the web. Any ideas on how to fix this? Dim impersonationContext As System.Security.Principal.WindowsImpersonationContext

View 2 Replies

Security :: .NET Impersonation In IIS 6 Is Not Working?

Sep 2, 2010

I am using impersonation in my ASP.NET application to access network resources. It works fine when I run on my computer, however when I setup the site on IIS6, it does not work. Is there some extra configuration, I need make in IIS for it?1. I created an account "TestUser" with the privilege as "act as operating system" on a server that has the resources which I want to access.2. The impersonation works fine on my computer, when I run from visual studio. My computer is on the network under same domain where the "TestUser" is created.

View 5 Replies

IIS 7.5, .NET, Impersonation, And Access To C:WindowsTemp?

Jun 7, 2010

Summary: One of our web applications requires write access to C:WindowsTemp. However, no matter how much I weaken the NTFS permission, procmon shows ACCESS DENIED.Background (which might or might not be relevant for the problem): We are using OLEDB to access an MS Access database (which is located outside of C:WindowsTemp). Unfortunately, this OLEDB driver requires write access to the user profile's TEMP directory (which happens to be C:WindowsTemp when running under IIS 7.5), otherwise the dreaded "Unspecified Error" OleDbException is thrown.

View 1 Replies

Security :: How To Enable Impersonation On IIS 7.5

Sep 14, 2010

I am running ASP.MVC 2 with LINQ2SQL on IIS 7.5. I have enabled Windows Authentication with ASP.NET Impersonation. Application pool is running on different domain account [AsiaTestWebUser] is part of windows group [AsiaTestUserGrp]When i enable Asp.net impersonation on MVC web site. Once i hit LogOn from the default page , it's throwing me with below error message

[Code]....

View 1 Replies

Impersonation Fails On First Try But Succeeds On Second?

Jun 3, 2010

We are using RDLC's in a Asp.net web application. For reasons beyond our understanding, the first call to the database server fails with the following error:

An error has occurred during report processing. Cannot open database "TryParkingIt2" requested by the login. The login failed. Login failed for user 'EXTRANETOurServerNameHere$'.

Run the report again, it works.

Update Click the button the first time, it fails. Click the button again, it works. The account being impersonated is a domain account. Also, this error occurs on all five different report pages, which is why I didn't include any code.

View 1 Replies

WCF / ASMX :: Impersonation Not Working?

Jan 13, 2011

I have a website using Windows Authentication. Note: The accounts are domain accounts.The website is configured to impersonate in the Web.Config using

[Code]....

View 6 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved