¡@

Home 

c# Programming Glossary: identity

Detect if running as Administrator with or without elevated privileges?

http://stackoverflow.com/questions/1220213/detect-if-running-as-administrator-with-or-without-elevated-privileges

up like this static bool IsAdministrator WindowsIdentity identity WindowsIdentity.GetCurrent WindowsPrincipal principal new WindowsPrincipal.. WindowsPrincipal principal new WindowsPrincipal identity return principal.IsInRole WindowsBuiltInRole.Administrator This.. determine the current elevation. else WindowsIdentity identity WindowsIdentity.GetCurrent WindowsPrincipal principal new WindowsPrincipal..

How do you do Impersonation in .NET?

http://stackoverflow.com/questions/125341/how-do-you-do-impersonation-in-net

set username password domain name which represents the identity I need to impersonate. c# .net impersonation share improve..

== or .Equals()

http://stackoverflow.com/questions/144530/or-equals

over the other c# share improve this question is the identity test. It will return true if the two objects being tested are.. either of these to provide different behavior like identity testing for Equals but for the sake of anybody reading your..

Why .NET String is immutable? [duplicate]

http://stackoverflow.com/questions/2365272/why-net-string-is-immutable

types in particular equality is based on state rather than identity. This means that abc ab c . While this doesn't require immutability..

How to provide user name and password when connecting to a network share

http://stackoverflow.com/questions/295538/how-to-provide-user-name-and-password-when-connecting-to-a-network-share

improve this question You can either change the thread identity or P Invoke WNetAddConnection2. I prefer the latter as I sometimes..

Does Entity Framework 4 Code First have support for identity generators like NHibernate?

http://stackoverflow.com/questions/5275306/does-entity-framework-4-code-first-have-support-for-identity-generators-like-nhi

Entity Framework 4 Code First have support for identity generators like NHibernate This question asked a year ago is.. I'd like to know is if the code first CTP adds support for identity generation strategies. If not does anyone know a good extension.. DB to newid but that defeats the purpose of client side identity generation. Is Entity Framework just not mature enough to be..

Windows Impersonation from C#

http://stackoverflow.com/questions/559719/windows-impersonation-from-c-sharp

a C# program running as LocalSystem impersonate the login identity of another user temporarily Roughly speaking I have a Windows..

How is Math.Pow() implemented in .Net Framework?

http://stackoverflow.com/questions/8870442/how-is-math-pow-implemented-in-net-framework

engineers is unlikely. Although my high school book's identity was twice as fast when I tried it public static double fasterPow..

Return value from SQL Server Insert command using c#

http://stackoverflow.com/questions/9319532/return-value-from-sql-server-insert-command-using-c-sharp

improve this question SCOPE_IDENTITY returns the last identity value inserted into an identity column in the same scope. A.. returns the last identity value inserted into an identity column in the same scope. A scope is a module a stored procedure.. INTO foo column_name VALUES @Value SELECT CAST scope_identity AS int using var insertCommand new SqlCommand cmd con insertCommand.Parameters.AddWithValue..

Understanding WCF Windows Authentication

http://stackoverflow.com/questions/9588265/understanding-wcf-windows-authentication

IS the Windows credentials the Windows identity used to call your service. It's a lot more than just the user..

Difference Between Equals and ==

http://stackoverflow.com/questions/971954/difference-between-equals-and

and b are reference types In Java will always compare for identity i.e. whether the two values are references to the same object... .NET and Java the implementation in Object also checks for identity. Note that this depends on the execution time type rather than..

Why is Multiple Inheritance not allowed in Java or C#?

http://stackoverflow.com/questions/995255/why-is-multiple-inheritance-not-allowed-in-java-or-c

impacts casting layout dispatch field access serialization identity comparisons verifiability reflection generics and probably lots..

InvalidOperationException when calling SaveChanges in .NET Entity framework

http://stackoverflow.com/questions/1008582/invalidoperationexception-when-calling-savechanges-in-net-entity-framework

file and the SSDL section have the StoreGeneratedPattern Identity as suggested. I also followed the blog post and tried to add.. my table I forgot to add the primary key and set Is Identity property to yes. I then created my Entity model and got this..

Display Unicode characters in converting Html to Pdf

http://stackoverflow.com/questions/10329863/display-unicode-characters-in-converting-html-to-pdf

specific to iTextSharp and in your case you want it to be Identity H . If you don't set this then it default to Cp1252 WINANSI..

Why can't I unbox an int as a decimal?

http://stackoverflow.com/questions/1085097/why-cant-i-unbox-an-int-as-a-decimal

read this Eric Lippert's blog entry Representation and Identity Personally I categorize things done by cast syntax into four..

Moq: unit testing a method relying on HttpContext

http://stackoverflow.com/questions/1214178/moq-unit-testing-a-method-relying-on-httpcontext

from request string sUser HttpContext.Current.User.Identity.Name everything after the domain sUser sUser.Substring sUser.IndexOf.. HttpContext here somehow using Moq. string foundUserName MyIdentityBL.GetSecurityContextUserName assert Assert.AreEqual foundUserName.. ADAccount true Should have been the same User Identity. Question How can I use Moq to arrange a fake HttpContext object..

== or .Equals()

http://stackoverflow.com/questions/144530/or-equals

return true if the two objects consider themselves equal. Identity testing is faster so you can use it when there's no need for..

How check by unit test that properties mark as computed in ORM model?

http://stackoverflow.com/questions/15866272/how-check-by-unit-test-that-properties-mark-as-computed-in-orm-model

Type bigint Nullable false StoreGeneratedPattern Identity Property Name Name Type nvarchar Nullable false MaxLength 32..

anyway see why I get this “Concurrency Violation” in these few lines of code??? Concurrency violation: the UpdateCommand affected 0 of the expected 1 records

http://stackoverflow.com/questions/1599230/anyway-see-why-i-get-this-concurrency-violation-in-these-few-lines-of-code

got code clue here Retrieving Identity or Autonumber Values ADO.NET the table CREATE TABLE emp emp_id..

Entering keys manually with Entity Framework

http://stackoverflow.com/questions/18907411/entering-keys-manually-with-entity-framework

HasDatabaseGeneratedOption DatabaseGeneratedOption.Identity or calling Property e e.EventID .HasDatabaseGeneratedOption.. .HasDatabaseGeneratedOption DatabaseGeneratedOption.Identity in the Fluent API. If you look at the migration that creates.. to drop and recreate the table. EDIT Or you could Switch Identity On Off With A Custom Migration Operation share improve this..

C# 4.0/EF - Server-generated keys and server-generated values are not supported by SQL Server Compact

http://stackoverflow.com/questions/2734424/c-sharp-4-0-ef-server-generated-keys-and-server-generated-values-are-not-suppo

one of my date columns was set with StoreGeneratedPattern Identity . EntityType Name ImportDoorAccesses Key PropertyRef Name ID.. Property Name Imported Type datetime StoreGeneratedPattern Identity Nullable false Property Name ID Type uniqueidentifier Nullable..

Autonumber with Entity Framework

http://stackoverflow.com/questions/3011764/autonumber-with-entity-framework

this question Set the StoreGeneratedPattern attribute to Identity in your SSDL for the autoincrement field. It should help. share..

C#, entity framework, auto increment problem

http://stackoverflow.com/questions/3188194/c-entity-framework-auto-increment-problem

field's StoreGeneratedPattern attribute is set to Identity . In this way EF knows that the autonumbers are handled by the..

Access to the path is denied

http://stackoverflow.com/questions/4877741/access-to-the-path-is-denied

it is running under by default this is Application Pool Identity and grant that the correct permissions. share improve this..

How does TransactionScope roll back transactions?

http://stackoverflow.com/questions/494550/how-does-transactionscope-roll-back-transactions

to return Department ID after inserting the department Identity Column dept.DepartmentID deptAdapter.GetInsertReturnValue foreach..

ASP.NET Access to the temp directory is denied

http://stackoverflow.com/questions/542312/asp-net-access-to-the-temp-directory-is-denied

Access to the temp directory is denied. Identity 'NT AUTHORITY NETWORK SERVICE' under which XmlSerializer is..

Entity Framework - Using Transactions or SaveChanges(false) and AcceptAllChanges()?

http://stackoverflow.com/questions/815586/entity-framework-using-transactions-or-savechangesfalse-and-acceptallchanges

mine went bad then this means there will be a missing Identity value. Is there any reason to use the standard TransactionScope..

Forms Authentication understanding context.user.identity

http://stackoverflow.com/questions/8810496/forms-authentication-understanding-context-user-identity

I have the following check in Page_Init if Context.User.Identity.IsAuthenticated int userid int Session userid if userid null.. userid if userid null userid GetUserID Context.User.Identity.Name if userid null Session userid userid EDIT GLOBAL.ASAX.. ticket exists for this user if HttpContext.Current.User.Identity.IsAuthenticated see if the authentication is done using FormsAuthentication..

Understanding WCF Windows Authentication

http://stackoverflow.com/questions/9588265/understanding-wcf-windows-authentication

Using the following code I can get the Windows Identity of the user who by using the client consumes the service. String.. OperationContext.Current.ServiceSecurityContext.WindowsIdentity.Name The configuration in the server is binding name messageSecurity.. Yes OperationContext.Current.ServiceSecurityContext.WindowsIdentity IS the Windows credentials the Windows identity used to call..

Claim Based Authentication using WCF

http://stackoverflow.com/questions/9632463/claim-based-authentication-using-wcf

desktop only. Note I won ™t be able to develop with Windows Identity Foundation since I have only XP. Also can you please provide.. and role based authorization REFERENCE How to use System.IdentityModel in own client server application Implementing claims based..

LINQ to SQL - mapping exception when using abstract base classes

http://stackoverflow.com/questions/1021274/linq-to-sql-mapping-exception-when-using-abstract-base-classes

Id Modifier Override Type System.Int32 DbType Int NOT NULL IDENTITY IsPrimaryKey true IsDbGenerated true CanBeNull false Column..

Entity Framework code first many-to-many mapping table

http://stackoverflow.com/questions/11382783/entity-framework-code-first-many-to-many-mapping-table

the Code First mappings above CREATE TABLE Members Id int IDENTITY 1 1 NOT NULL primary key Name nvarchar 128 NOT NULL CREATE TABLE.. key Name nvarchar 128 NOT NULL CREATE TABLE Recipes Id int IDENTITY 1 1 NOT NULL primary key Name nvarchar 128 NOT NULL AuthorId..

How to create “embedded” SQL 2008 database file if it doesn't exist?

http://stackoverflow.com/questions/1715691/how-to-create-embedded-sql-2008-database-file-if-it-doesnt-exist

runs stuff like this CREATE TABLE AuditUser ID int IDENTITY 1 1 NOT NULL UserSourceTypeID tinyint NOT NULL DateCreated smalldatetime..

Entering keys manually with Entity Framework

http://stackoverflow.com/questions/18907411/entering-keys-manually-with-entity-framework

explicit value for identity column in table 'Events' when IDENTITY_INSERT is set to OFF. If it's helpful here is the POCO class.. NOT NULL Which actually does diddly squat. Dropping the IDENTITY from a column is not trivial. You need to drop and recreate..

How do I ensure Linq to Sql doesn't override or violate non-nullable DB default values?

http://stackoverflow.com/questions/201706/how-do-i-ensure-linq-to-sql-doesnt-override-or-violate-non-nullable-db-default

value gettime NOT NULL . An int with no default value IDENTITY NOT NULL . When I generate Linq to SQL for this table the following..

Convert GUID to int

http://stackoverflow.com/questions/4518684/convert-guid-to-int

What are the differences between Merge Join and Lookup transformations in SSIS?

http://stackoverflow.com/questions/6735733/what-are-the-differences-between-merge-join-and-lookup-transformations-in-ssis

helps. SQL Scripts CREATE TABLE dbo . ItemAmount Id int IDENTITY 1 1 NOT NULL ItemNumber nvarchar 30 NOT NULL Price numeric 18.. ON PRIMARY GO CREATE TABLE dbo . ItemDiscountInfo Id int IDENTITY 1 1 NOT NULL ItemNumber nvarchar 30 NOT NULL Discount numeric.. ASC ON PRIMARY GO CREATE TABLE dbo . ItemPriceInfo Id int IDENTITY 1 1 NOT NULL ItemNumber nvarchar 30 NOT NULL Price numeric 18..

Entity Framework Stored Procedure Table Value Parameter

http://stackoverflow.com/questions/8157345/entity-framework-stored-procedure-table-value-parameter