identity

Problem using custom principal and identity with WCF services

旧城冷巷雨未停 提交于 2019-12-04 15:54:00
问题 We are using a custom principal and identity type (ProdigyPrincipal/ProdigyIdentity) because we need extra information within our programs and services. In the program we set the principal and identity. When communicating with a WCF service the principal and identity are set, but after casting to our own type the principal and identity are null. I noticed that there is a difference between running in Debug mode and Unit Test mode. In Debug mode the type of the principal and identity are of

Result identity changing

断了今生、忘了曾经 提交于 2019-12-04 15:43:14
问题 I'm using TOR and I want to know, how to switch between result-nodes with need country. I can simply change it by telnet the 9051 port like: telnet localhost 9051 "AUTHENTICATE\r" "signal NEWNYM\r" "quit\r" This will chose randomly the exit(result) node. My goal is to change that node to the node from need country. I didn't find such information in the documentation, but in some GUI apps for the TOR there is a map with a list of all available nodes/servers and their country, so that I can

Using custom user instead of ASP.NET IdentityUser

好久不见. 提交于 2019-12-04 15:01:26
I'm new on ASP.NET Identity and trying to customize the identity which is provided while creating new MVC project. ASP.NET Identity automatically creates few tables for handle authentication and authorization itself. My main goal is just create Users table but others. I've tried following code to prevent creating these tables: protected override void OnModelCreating(DbModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); modelBuilder.Ignore<IdentityUserRole>(); modelBuilder.Ignore<IdentityUserClaim>(); modelBuilder.Ignore<IdentityRole>(); } When I want to create a user, following

Is using MS SQL Identity good practice?

痞子三分冷 提交于 2019-12-04 14:14:35
问题 Is using MS SQL Identity good practice in enterprise applications? Isn't it make difficulties in creating business logic, and migrating database from one to another? 回答1: Yes, they work very well and are reliable, and perform the best. One big benefit of using identity fields vs non, is they handle all of the complex concurrency issues of multiple callers attempting to reserve new id's. This may seem like something trivial to code but it's not. These links below offer some interesting

How safe is it to rely on hashes for file identification?

孤街醉人 提交于 2019-12-04 13:40:29
问题 I am designing a storage cloud software on top of a LAMP stack. Files could have an internal ID, but it would have many advantages to store them not with an incrementing id as filename in the servers filesystems, but using an hash as filename. Also hashes as identifier in the database would have a lot of advantages if the currently centralized database should be sharded or decentralized or some sort of master-master high availability environment should be set up. But I am not sure about that

HiLo or identity?

时光怂恿深爱的人放手 提交于 2019-12-04 13:21:41
Just wanted to get some opinions on primary keys - would it be better to use identity/sequence numbers or use a HiLo strategy (query for the high value and increment the low value on the app itself)? If your application is only going to use one database, I'd go with an identity/sequence. The only really compelling reason to go with HiLo that I've seen is when you could have two disconnected instances of your application that people can work on simultaneously and you need to reconcile the differences at some point Ex . You are working on a content management system where people could be working

SQL Server Reset Identity Increment for all tables

可紊 提交于 2019-12-04 07:38:51
问题 Basically I need to reset Identity Increment for all tables to its original. Here I tried some code, but it fails. http://pastebin.com/KSyvtK5b Actual code from link: USE World00_Character GO -- Create a cursor to loop through the System Ojects and get each table name DECLARE TBL_CURSOR CURSOR -- Declare the SQL Statement to cursor through FOR ( SELECT Name FROM Sysobjects WHERE Type='U' ) -- Declare the @SQL Variable which will hold our dynamic sql DECLARE @SQL NVARCHAR(MAX); SET @SQL = '';

SQL Server - Get Inserted Record Identity Value when Using a View's Instead Of Trigger

这一生的挚爱 提交于 2019-12-04 07:19:45
For several tables that have identity fields, we are implementing a Row Level Security scheme using Views and Instead Of triggers on those views. Here is a simplified example structure: -- Table CREATE TABLE tblItem ( ItemId int identity(1,1) primary key, Name varchar(20) ) go -- View CREATE VIEW vwItem AS SELECT * FROM tblItem -- RLS Filtering Condition go -- Instead Of Insert Trigger CREATE TRIGGER IO_vwItem_Insert ON vwItem INSTEAD OF INSERT AS BEGIN -- RLS Security Checks on inserted Table -- Insert Records Into Table INSERT INTO tblItem (Name) SELECT Name FROM inserted; END go If I want

How to move MVC 5 IdentityModels.cs into a separate assembly

妖精的绣舞 提交于 2019-12-04 06:41:00
I wonder if someone ran into the issue that I am having with trying to move ApplicationUser into Models project (where all other models reside including the ones related to Users table). My test MVC 5 solution consists of a web project and two class libraries: one for data access layer (DAL) and the other for Models. I references AspNet.Identity.EntityFramework in all three projects. In my DAL class I implement Repository pattern and a UnitOfWork. UnitOfWork extends IdentityDbContext<ApplicationUser> . ApplicationUser : IdentityUser is in Models class library. In my web project UnitOfWork is

Using OUTPUT/INTO within instead of insert trigger invalidates 'inserted' table

白昼怎懂夜的黑 提交于 2019-12-04 06:23:11
I have a problem using a table with an instead of insert trigger. The table I created contains an identity column. I need to use an instead of insert trigger on this table. I also need to see the value of the newly inserted identity from within my trigger which requires the use of OUTPUT/INTO within the trigger. The problem is then that clients that perform INSERTs cannot see the inserted values. For example, I create a simple table: CREATE TABLE [MyTable]( [MyID] [int] IDENTITY(1,1) NOT NULL, [MyBit] [bit] NOT NULL, CONSTRAINT [PK_MyTable_MyID] PRIMARY KEY NONCLUSTERED ( [MyID] ASC )) Next I