p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional SQL Server 2005 CLR Programming: w/ Stored Procedures, Functions, Triggers,
This is the forum to discuss the Wrox book Professional SQL Server 2005 CLR Programming: with Stored Procedures, Functions, Triggers, Aggregates, and Types by Derek Comingore, Douglas Hinson; ISBN: 9780470054031

Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional SQL Server 2005 CLR Programming: w/ Stored Procedures, Functions, Triggers, section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 25th, 2008, 05:28 PM
Friend of Wrox
 
Join Date: Apr 2005
Location: Fort Walton Beach, FL, USA.
Posts: 190
Thanks: 0
Thanked 0 Times in 0 Posts
Default WindowsIdentity - Impersonation Context

On page 52 of the book, the authors show the code for a stored procedure. I am using VS 2008 Pro (C#) and SQL Server 2005 Enterprise. I have not been able to get this code to work. Inside the using statement I have replaced ".\\sqlexpress" with the name of my own SQL Server. My statement reads: using (SqlConnection oConn = new SqlConnection(".\\SQLSERVER2005;Integrated Security=true;")). My code compiles and Deploys fine.

BTW, in order to use the WindowsIdentity and WindowsImpersonationContext objects I had to manually add a using statement for the class for namespace: System.Security.Principal.

I won't go into the err messages posted at query execute time until I know at least one person has got this to work.

If you have successfully executed this code in your SSMS, I would appreciate you posting that fact to this thread so that the rest of us don’t spend a lot of time spinning our wheels uselessly. Thanks.

VictorVictor


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
impersonation for asp app xile Classic ASP Basics 1 November 11th, 2008 08:56 AM
Problem with impersonation.. joseph20 .NET Framework 2.0 0 July 23rd, 2008 10:07 AM
Unable to set context in web.xml or context.xml. dchicks Apache Tomcat 1 March 7th, 2008 07:59 AM
Impersonation mike_remember ASP.NET 1.0 and 1.1 Professional 1 March 5th, 2007 09:10 AM
impersonation problems Morrislgn ASP.NET 1.1 10 March 6th, 2004 04:42 AM



All times are GMT -4. The time now is 05:35 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc