I am writing a MSSQL2000 database-aware application that is, among other things, going to run queries. The database in question will have security settings in different places, and the query must be executed from the user context of a given user / group. Users and groups refer to local system accounts or Active Directory accounts. Assume the former.
Herein lies my problem. I don't know how to begin to execute the query under the context of an arbitrary user. How do I execute code in an arbitrary user's context? Does the SqlConnection have to be created in that context, or just the query command?
Any solutions that don't use unmanaged code would be much preferred! Thanks.
I think (not absolutely positive) that this changes the principal for the current thread.
You may have to set the Thread.CurrentPrincipal property for the respective threads if your doing a multithreaded
Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.
Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email
Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …