asp.net-membership

SQL Server 2005 - How often should you rebuild Indexes?

天大地大妈咪最大 提交于 2019-12-12 08:39:44
问题 I recently took over a project and they have a SQL job setup to run every three hours which rebuilds the indexes found within the ASP.NET Membership database tables. This seems pretty high, to rebuild indexes 8 times a day. I get about 2000 new users every day, and a total of about 2 million registered users. What would you recommend for a proper index rebuilding schedule? 回答1: Your deadlocks can definitely be related to the rebuilding of the indexes. There is also no doubt that those indexes

Storing a Windows SID in a Database for Lookup

柔情痞子 提交于 2019-12-12 08:09:34
问题 I have an ASP.NET MVC application where I need to allow to customers configure MembershipProviders based on their environment, but still be able to map that MembershipUser to a concrete User model in our database. Membership.GetUser() will give me access to the logged-in user's Membership.ProviderUserKey . I can use this to relate to a User record. Our custom SQL provider will just return the User.Id, but AD is a different story. In that case, ProviderUserKey is an IdentityReference . These

ASP.NET site auto-login during development

北慕城南 提交于 2019-12-12 08:00:47
问题 While developing an ASP.NET site, is the a way to setup automatic login? For example, each time I build the site and run it, I have to login again. I don't want to disable security entirely, but I would like to automate the process of logging in while I'm working on the site. 回答1: Just keep your browser open and Ctrl+F5 after you modify and/or recompile in Visual Studio. This will keep the authentication cookie. Another possibility is to setup an automatic login page in which you would test

DefaultConnection and membership - what is the connection between localsqlserver and defaultconnection

醉酒当歌 提交于 2019-12-12 07:37:45
问题 Hmmmm... I really can't get my head around this. In web.config I have: <connectionStrings> <clear /> <!--- need this to prevent using LocalSqlServer from machine.config or somewhere becouse it is not present when when publish to hosting --> <add name="DefaultConnection" providerName="System.Data.SqlClient" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=aspnet-Goaly-20120615111028;Integrated Security=SSPI" /> </connectionStrings> and <membership defaultProvider=

Update ASP.Net membership from windows service

跟風遠走 提交于 2019-12-12 07:28:35
问题 I am working on a project for a property management company. There is the back end system that stores all of the tenants and property portfolios, and a front end website that allows users to view their packages, service requests etc. I need to write a windows service that pulls their information out of the back end and place it into the membership database. I cannot figure out how to configure the service to connect to the membership provider. 回答1: You can basically use it as you were with

Issues with storing the custom Principal in Session for ASP.NET MVC

走远了吗. 提交于 2019-12-12 07:23:19
问题 I am running into an issue with ASP.NET MVC where it is forcing the user to log back in after about 20 mins of inactivity. I am using Forms Authentication and have increased the time-out in the config file as: <authentication mode="Forms"> <forms loginUrl="~/Account/LogOn" timeout="9999999" /> </authentication> I am also setting the session time-out in the config file as: <sessionState timeout="120"></sessionState> I am basing this off of Rockford Lhotka's CSLA ASP.NET MVC example and have

getting error when editing the user details

旧时模样 提交于 2019-12-12 05:58:31
问题 I am trying to edit and update a selected users details, following the tutorial http://www.4guysfromrolla.com/articles/052307-1.aspx I get the following errors in the Error List in VS 2010: Error 6 'Comment' is not a member of 'System.Security.Principal.IPrincipal'. C:\projects\FPOS_v2\FamilyAdmin\edit_user.aspx.vb 21 9 C:\projects\FPOS_v2\ Error 5 'Email' is not a member of 'System.Security.Principal.IPrincipal'. C:\projects\FPOS_v2\FamilyAdmin\edit_user.aspx.vb 20 9 C:\projects\FPOS_v2\

asp.net login fails on first and second call

可紊 提交于 2019-12-12 05:17:11
问题 I have a login control on an aspx page - mydomain.cloudapp.net/Login.aspx. My login page is running in azure and I have written code for the Page_Load, Login_authenticate and OnLoggedIn routines in login.aspx.vb. The website has an offline html5 application cache which is checked / refreshed when the page is loaded. I don't think this is affecting the operation of the login. The cache state is 'idle' when I attempt to log in. My web.config configuration for my membership is: <authentication

How to get custom information from UserProfile?

柔情痞子 提交于 2019-12-12 04:37:04
问题 I add in my UserProfile the custom field UserType as string. I want to change my login post method to get the value from UserType and pass this value in a TempData. This is my code on AccountController: [HttpPost] [AllowAnonymous] [ValidateAntiForgeryToken] public ActionResult Login(LoginModel model, string returnUrl) { if (ModelState.IsValid && WebSecurity.Login(model.UserName, model.Password, persistCookie: model.RememberMe)) { var context = new UsersContext(); var currentUser = Membership

how to create login using membership in mvc 5?

瘦欲@ 提交于 2019-12-12 04:35:22
问题 I have created a small demo in angularjs with mvc c# and I want to have a login facility using membership provider. I have tried this simple code for the getting records from the database but it doesn't return any users from the database. There are users in the database. The membership setting in web.config file: <membership defaultProvider="AspNetSqlMembershipProvider"> <providers> <clear /> <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider"