sqlmembershipprovider

How to join with LinQ to (typed) dataset?

拈花ヽ惹草 提交于 2019-11-30 15:36:56
i recently upgraded VS 2005 to 2010 and am fairly new to LinQ. Maybe somebody can put me in the right way. Background : I have a typed dataset and have the standard SQLMembershipProvider extended with a Table AccessRule. So a role can have infinitely AccessRules(f.e. "Administrator" has "DeleteCustomer"). I use a custom membership provider that inherits from SqlMemberShipProvider and has an overloaded function hasAccess(one with a memory-dataset as parameter and the other uses the database directly). This is the complete Model: Now i need to know f.e. if a User with UserID= '89f9ea8d-8ae1-460b

Inject a MembershipProvider into ASP.NET MVC AccountController

跟風遠走 提交于 2019-11-29 10:27:21
问题 ASP.NET MVC 1.0 project templates include an AccountController class, which supports constructor injection: public AccountController(IFormsAuthentication formsAuth, IMembershipService service) { FormsAuth = formsAuth ?? new FormsAuthenticationService(); MembershipService = service ?? new AccountMembershipService(); } An AccountMembershipService class is also included, and it too supports constructor injection: public AccountMembershipService(MembershipProvider provider) { _provider = provider

How to set password rules for ASP.NET identity?

◇◆丶佛笑我妖孽 提交于 2019-11-28 18:57:51
In my ASP.NET applications I have following settings in DefaultMembershipProvider and SqlMembershipProvider in web.config: enablePasswordRetrieval="true" passwordFormat="Clear" requiresQuestionAndAnswer="false" They are required for Digest authentication. I would like to move to ASP.NET Identity. I am using automated tool to update all web.config files that I manage. How do I set these settings for ASP.NET Identity in the project generated by Visual Studio 2013? You need to provide IPasswordHasher implementation that can provide clear password without hashing. You can set UserManager

WCF Authentication using SQL Membership Provider

倾然丶 夕夏残阳落幕 提交于 2019-11-28 12:50:01
Hopefully you folks can clarify some of this for me. I have a web-application using the Sql Membership Provider and it talks to a second web-application through a WCF Service. Both applications share the same Sql Membership Provider datastore...but I need each WCF Service call to authenticate the user. Now, I've looked at a LOT of samples, but I feel like the samples I've seen either leave out certain code because it "should" be obvious to me, or I mis-understand how WCF handles the request (see expected code below). I'm grateful for any help... HERE'S WHAT I ALREADY KNOW HOW TO DO I know how

Making user login persistant with ASP .Net Membership

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-28 06:27:09
I have a website that is built in ASP.NET 3.5 & SQL Server 2005, using the sql membership provider, and presumably forms authentication. Since security needs on my site are very low, I would like to authenticate once, and then keep the log in persisted indefinitely (without giving the user the choice). What is happening is that the user logs in, stays logged in for the session, and then the next time they arrive, they are logged out. How can I get the log-in persisted? Here's the technical details, I have experimented with many variations of durations. Try If Membership.ValidateUser(UserName

Is it possible to change the username with the Membership API

徘徊边缘 提交于 2019-11-27 14:34:53
I am using the default sql membership provider with ASP.NET and I would like to provide a page to change the user's username. I believe I am sure I could do this with a custom provider, but can this be done with the default provider? Second part of my question is: Should I allow users to change their username after the account is created? It's true that the default SQL Membership Provider does not allow username changes. However, there's no intrinsic reason to prevent users from changing their usernames if you have a valid argument, on your site, to allow it. None of the tables in the SQL

WCF Authentication using SQL Membership Provider

徘徊边缘 提交于 2019-11-27 07:10:49
问题 Hopefully you folks can clarify some of this for me. I have a web-application using the Sql Membership Provider and it talks to a second web-application through a WCF Service. Both applications share the same Sql Membership Provider datastore...but I need each WCF Service call to authenticate the user. Now, I've looked at a LOT of samples, but I feel like the samples I've seen either leave out certain code because it "should" be obvious to me, or I mis-understand how WCF handles the request

How to combine using Membership API with own application related data?

自作多情 提交于 2019-11-27 01:54:10
Designing a new application in asp.net 4 I have to make a decision how to use a MS SQL Membership API along with my own data in the MS SQL data base. Firstly I need to store and access user profile data in more flexible manner then the Profile provider supports. Secondly I would like to link other user related information (e.g. Orders). No matter where you store your aspnetdb tables (in the separate data base or in the same data base with your data), the problem stays how to keep your data synchronized. After a research I see the following relevant options: 1. Foreign key UserId from asp_Users

Making user login persistant with ASP .Net Membership

て烟熏妆下的殇ゞ 提交于 2019-11-27 01:21:22
问题 I have a website that is built in ASP.NET 3.5 & SQL Server 2005, using the sql membership provider, and presumably forms authentication. Since security needs on my site are very low, I would like to authenticate once, and then keep the log in persisted indefinitely (without giving the user the choice). What is happening is that the user logs in, stays logged in for the session, and then the next time they arrive, they are logged out. How can I get the log-in persisted? Here's the technical

Entity Framework: how to solve “FOREIGN KEY constraint may cause cycles or multiple cascade paths”?

ⅰ亾dé卋堺 提交于 2019-11-26 20:20:39
there are lots of questions about this problem, but I couldn't solve my case. can some one please take a look at this: I have an Office table which has one-many relationship with Doctor and Secretary tables. Both of the last tables, are derived from Employee table which has a shared-primary-key relationship with predefined Users table created by sqlmembershipprovider . It seems there is a many-many relationship between Users table and Roles table which I haven't any hand in it. My problem was in creating a (zero,one) - (one) relationship between my Employee table and that Users table which I