.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links


Posted By:      Posted Date: October 22, 2010    Points: 0   Category :ASP.Net

hi all

how can i create IDENTITY ID for primary Key  column like this





















thats all

thanx for all 

View Complete Post

More Related Resource Links

Pass ASP.NET membership identity object across domain?


I am trying to figure a way to SSO with ASP.NET membership and role model.

I can implement custom membership provider which consume web services hosting on a server.

With encryption of data. No problem.

But my question is, If I sign on a website with my provider, got my identity object on that application,

could I pass it to another website on another domain which use the same provider and by doing so, do not need to login again?

If this is possible, I am going to implement this solution. Please tell me what's your take on this.

Federated Identity: Passive Authentication for ASP.NET with WIF


The goal of federated security is to provide a mechanism for establishing trust relationships between domains. Platform tools like Windows Identity Foundation (WIF) make it much easier to support this type of identity federation. We show you how.

Michele Leroux Bustamante

MSDN Magazine August 2010

AD FS 2.0 in Identity Solutions: Using Active Directory Federation Services 2.0 in Identity Solution


This article explains how you can use Active Directory Federation Services (AD FS) 2.0 to claims-enable Windows Communication Foundation (WCF) services and browser-based applications. The focus is on the token issuance functionality in AD FS 2.0. You'll find out how to use AD FS 2.0 as an identity provider; set up an AD FS 2.0 security token service (STS) to interact with WCF; federate AD FS 2.0 with your custom STS or another AD FS 2.0; enable Web single sign-on and federation with WS-Federation and SAML 2.0 protocols; and externalize authentication logic through Visual Studio. You'll come away appreciating how AD FS 2.0 and Windows Identity Foundation make programming identity solutions in Windows less of a chore.

Zulfiqar Ahmed

MSDN Magazine November 2009

Security Briefs: Exploring Claims-Based Identity


Keith Brown introduces you to the new identity model in the Microsoft .NET Framework 3.0.

Keith Brown

MSDN Magazine September 2007

Identity: Secure Your ASP.NET Apps And WCF Services With Windows CardSpace


Windows CardSpace replaces traditional authentication with a more consistent and streamlined login process and improves trust between end-users, applications and services. Michèle Leroux Bustamante explains.

Michele Leroux Bustamante

MSDN Magazine April 2007

Aajaxtoolkit control +

dear all,   i have propblem, when i put  <identity impersonate="true" userName="domain\username" password="password" />   i have the following erro: Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. Access is denied.   but if i remove this tag : <identity impersonate="true" userName="domain\username" password="password" /> this site work normally. and i need to put this tag in web.config.

Windows Identity Foundation Security Token Service can't stay logged in

I'm using the Windows Identity Foundation **(WIF)** Security Token Service **(STS)** to handle authentication for my application which is working all well and good. However I can't seem to get any long running login with the STS. From my understanding I shouldn't care about the client tokens at the application level since they can expire all they want to and it should redirect me to the STS and as long as they're still logged in on the STS it should refresh their application token. Yet it doesn't seem to want to keep them signed in. Here's what occurs in my login.aspx on the STS var cookie = FormsAuthentication.GetAuthCookie(userName, persistTicket); if (persistTicket) cookie.Expires = DateTime.Now.AddDays(14); Response.Cookies.Add(cookie); var returnUrl = Request.QueryString["ReturnUrl"]; Response.Redirect(returnUrl ?? "default.aspx"); Which was taken almost directly from existing application using normal Forms Auth. From my web.config <authentication mode="Forms"> <forms loginUrl="Login.aspx" protection="All" timeout="2880" name=".STS" path="/" requireSSL="false" slidingExpiration="true" defaultUrl="default.aspx" cookieless="UseDeviceProfile" enableCrossAppRedirects="false" /> </auth

Replication and auto Identity Increment

We want to have two SQL server working on the same data at the same time (SQL Server 2008). I've been told that the auto ID's will stop working (the identity option). I'm not sure how true this is or what is the best replication to use for this.   Thanks

Fetch Identity column just after inserting a row in table

Hi, Please help me with this question. I have a table and I insert a row into it. How can i select the latest inserted row? Can the 'inserted table' keyword be used outside trigger? ( I mean can we use it in above scenario?? If yes how)   Thanks in advance Tiya

MessageSecurityException "Identity check failed for outgoing message" when using custom endpointaddr

Hi! I am currently developing a WCF service which will use ASP.NET Membership and RoleProvider as authentication/authorization. I followed the description in on this page http://msdn.microsoft.com/en-us/library/ff647294.aspx to do this, and everything works as expected when I try add a reference to my development service and uses that without any interaction. But, I want to be able to override the enpoint address in code since the server may be placed on other servers, but when I do this in my code (with the same enpointAddress stated in the client wcf file for testing purpose) I get a MessageSecurityException with this information: "Identity check failed for outgoing message. The expected DNS identity of the remote endpoint was 'localhost' but the remote endpoint provided DNS claim 'MyCert'. If this is a legitimate remote endpoint, you can fix the problem by explicitly specifying DNS identity 'MyCert' as the Identity property of EndpointAddress when creating channel proxy." I have search the net for information about this, and found that the only thing I had to do was to add a <dns value="MyCert" /> to my client wcf configuration, and everything should work. But it doesn't, I still get the same error. My server behavior configuration looks like this: <serviceCredentials> <serviceCertificate findValue="CN=MyCert" />

scope identity...

 I need to get the identity (scope_identity) value of the newly inserted record. I don't see a way to do this.    I'm using public static int Insert(string planName, string planDescription, int offerID, int userID) { using (OLTPEntities context = new OLTPEntities()) { context.plan.AddObject(new plan() { plan_name = planName, plan_description = planDescription, offer_id = offerID, create_date = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day), last_update_date = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day), last_updated_by = userID }); return context.SaveChanges(); } }  

Combining databases with Identity columns

(Using SQL Server 2005)  I have only a basic knowledge of SQL Server, but need to roll up 5 SQL databases into one database (I guess this is known as "replication"?).  These database are of similar structure and make use of an identity (or autonumber) column.  These id's are also referenced in numerous child tables.  To avoid collisions, this is my plan:   1.  turn off the identity feature of all the columns (but still keep condition of uniqueness) 2.  For each database, assign a unique range of identities (ie, db1 gets 1-500, db2 gets 501-1000, etc) and then renumber these columns accordingly.  The new id's should cascade to the child tables via the table relationships. 3.  Replicate or copy the data of all 5 databases into the new one.  There should be no collisions. 4.  Turn back on the identity feature of the appropriate columns, hopefully everything works as before. After this is done we hopefully can get rid of the 5 original databases and proceed with just one. Should this work and/or is there a better way to do this?  

What is the prefix in identity name when using claimprovider and how can recreate it?

I create a custom IP-STS, when i sign in with it in SharePoint i see the identity name is "0?.t|myprovidername|test18", Now I have "username" and want to find its mapped "SPUser", so I need to recreate the login name, I can do following:     String loginName = "0?.t" + "|myprovider|" + username; loginName = SPClaimProviderManager.Local.GetUserIdentifierEncodedClaim(loginName);       but I don't know what is "0?.t" and how can i recreate it, i worry this perfix may change after i deployed the soultion to another server. so it seem not good idea to hardcode it. is there any method to do it?

User.Identity.Name returns blank

Hello, I have a strange problem when trying to get the user name. When I run the asp.net page from local machie it works, but when I run it from the server it doesn't. It's very strange, I have tryied with the following functions: Page.User.Identity.Name System.Web.HttpContext.Current.User.Identity.Name My.User.Name System.Threading.Thread.CurrentPrincipal.Identity.Name User.Identity.Name   All options returns blank :s when I run it in the server Anyone have had the same problem, that could help me please? Thanks in advance.    Also I have the following in web.config <identity impersonate="false"/>    <authentication mode="Windows"/>    <authorization>      <allow users="*" />      <deny users="?" />    </authorization>  and in the IIS enabled  the anonymus authentication and enabled windows authentication  

Mark columns as Identity in multi-table views?

Hello! When you create a view of one table (i.e. SELECT * FROM Table), it marks the table's identity column as an identity col in the view as well. I have a few that selects columns from several nested tables, but they are all related in a main identity column I select as well, but SQL Server doesn't mark this column as identity, is there a way to do it?Shimmy

current user identity in custom security trimmer

The crux of my problem is that I want to impersonate  a user’s NTLM credentials in the context of a SharePoint custom security trimmer to execute HttpWebRequests to check user access to URLs.  When accessing WindowsIdentity.GetCurent() in the security trimmer, the System.Security.Principal.WindowsIdentity object returns the identity of the application pool running the search query service, NOT the currently logged in user.   When accessing System.Threading.Thread.CurrentPrinciple.Identity in the security trimmer, the Microsoft.IdentityModel.Claims.ClaimsIdentity object of the current logged in user is returned.  However, there is a catch.  …   If I execute the following code in a .NET web application, the cast of the ClaimsIdentity to a WindowsIdentity succeeds because the identity has the authentication type of NTLM.    WindowsIdentity winId = (WindowsIdentity)System.Threading.Thread.CurrentPrincipal.Identity; WindowsImpersonationContext wic = winId.Impersonate(); request.Credentials = CredentialCache.DefaultCredentials; //access means a response comes back when a request is made to the url using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) { returnStatus = true; } wic.Undo(); However, when I execute the same code in the context of the SharePoint security trimmer (the search query service li

FIMSynchronizationService can not start (event id:6324) and The Forefront Identity Manager Service c

Hi, I have this two issuses 2 days. I tried lots of ways, I can not fixed it. I have fully permission accunt to create User Proflie Sych. Even last week, everything is fine, but since I deployed the Sql2005 maintenance for our database. It shows those two issues. Please help!
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend