WCF Impersonation With Client

28 בפברואר 2008

If you have a service that uses Windows authentication and you want to impersonate the caller, you need to configure the client and the server. This is the client proxy. You need to give it the correct credentials. client.ClientCredentials.Windows.ClientCredential.Domain = "DOMAINName"; client.ClientCredentials.Windows.ClientCredential.UserName = "UserName"; client.ClientCredentials.Windows.ClientCredential.Password = "Password"; client.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation; The server side looks like this: using (ServiceSecurityContext.Current.WindowsIdentity.Impersonate()) { ... } This impersonate part of the method. To impersonate all method, use the attribute:
אין תגובות

Stop Connecting To TFS Automatically On Visual Studio Startup

27 בפברואר 2008

Stop Connecting To TFS Automatically On Visual Studio Startup I often visit customers and work outside the office, means I work disconnected for a while. It's laborious when I open VS (2005 or 2008) and waiting for VS to connect automatically to TFS. Colin Beales has an excellent tip that explains how to stop Visual Studio from automatically connecting to a TFS server when it starts up. Backup your registry Navigate to Team Foundation key: For VS 2005 navigate to: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\TeamFoundation For VS 2008 navigate to: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\TeamFoundation Add a registry key "AutoLoadServer" (type DWORD) Setting the value to be 0 (Do not...
תגובה אחת

Data Compare Does Not List All Tables

26 בפברואר 2008

Data Compare Does Not List All Tables VSTS for Database Professionals has a great tools like schema and data compare. I got a lot of questions why schema compare list all tables in the target and source databases, but data compare not. So, the answer is simple. There are 2 possible reasons to this issue: The table doesn't have a primary key, unique key, or unique constraint to do the comparison against The table definitions are different VSTS for Database Professionals uses a key or index to determine which objects correspond with each other when we use the data compare. If a table or...
אין תגובות

Tech-Ed 2008 Talk

Tech-ED 2008 Talk As I posted earlier, I'll speak at the next Tech-Ed in Eilat (6-8 April 2008). This is a great honor for me! My session will be about MSBuild & VSTS for Database Professional. The session is title less for now.... If you have any idea - please send it to me. In order to give you a great presentation, help me to decide about it's content: Do you have any unanswered questions around VSTS for Database Professionals? What do you like most and least about VSTS for Database Professionals? Do you have any stories you would be willing to share if...
אין תגובות

Client Impersonation in WCF

Client Impersonation in WCF Recently I got a question about impersonation in WCF. What should we do in order to impersonate the client? It's simple: Client Side 1: // Create a client with given client endpoint configuration 2: MyServiceClient client = new MyServiceClient(); 3: client.ClientCredentials.Windows.AllowedImpersonationLevel = TokenImpersonationLevel.Impersonation; Server Side 1: if (ServiceSecurityContext.Current.WindowsIdentity.ImpersonationLevel == TokenImpersonationLevel.Impersonation || 2: ServiceSecurityContext.Current.WindowsIdentity.ImpersonationLevel == TokenImpersonationLevel.Delegation) 3: { 4: ...
5 תגובות

TechEd Israel 2008, I'll Talk There

22 בפברואר 2008

I'll be attending in Eilat's Teched (6-8 April 2008) presenting about VSTS for Database Professionals and Team Build. I'm very excited... If development is your business,  (or) you are decision maker, (or) ALM interesting you, (or) you suffering with database version management, (or) I'm interesting you... then this session is for you! Hopefully I'll actually find the time to make a Live Blogging from the conference. Microsoft  also arranges a meetings with the lecturers - I'll be glad to see you there! The session will demonstrate full lifecycle of a development team with SCM, including database versions management. The cycle has full build on...

LINQ in Action: Book Review

Recently I got a copy of the book "LINQ in Action" (by Fabrice Marguerie, Steve Eichert, Jim Wooley, and Matt Warren (Foreword))from Manning publishing. Language Integrated Query (LINQ) is a great feature and I wrote about it in this blog. The book targets the .NET developers who know C# (2.0) or VB.NET (8.0): Whether you don't know LINQ or you already know - this book is for you. Read it! For me, it was a pleasure to read it: smooth, clear, didactic and effective. The book divided into 4 parts: Getting started, Querying objects...
3 תגובות

Visual Studio Team System 2008 Database Edition Power Tools

15 בפברואר 2008

Finally, the “DataDude” team announced the availability of the Power Tools for Visual Studio Team System 2008 Database Edition. The release includes all the functionality that shipped in 2005 plus: Command line SQL Static Code Analysis execution through MSBuild. This enables SQL Static Code Analysis to be an integrated part of Team Build! Data Generation Wizard; allow users to create a new data generation plan by pointing at an existing database, the plan will be fully configured by the wizard to pull all data from the database using the Sequential...

Performance Driven Development

4 בפברואר 2008

Do you think that your application's performance is critical? Do you agree that you should think about the performance before you deliver your application to QA/Production? If the answer is true, visit the next meeting of the Israeli ALM User Group. Guy Kolbis will talk about it, with hands-on labs, best practices and lot of samples. See you there! Register here to the event : http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032368228&Culture=he-IL
אין תגובות