What is ASP.NET Identity’s IUserSecurityStampStore interface?

Looking at ASP.NET Identity (new membership implementation in ASP.NET), I came across this interface when implementing my own UserStore: //Microsoft.AspNet.Identity.Core.dll namespace Microsoft.AspNet.Identity { public interface IUserSecurityStampStore<TUser> : { // Methods Task<string> GetSecurityStampAsync(TUser user); Task SetSecurityStampAsync(TUser user, string stamp); } } IUserSecurityStampStore is implemented by the default EntityFramework.UserStore<TUser> which essentially get and set the TUser.SecurityStamp property. … Read more

ASP.NET web.config: configSource vs. file attributes

Within an web.config-file in an ASP.NET-application some sections of config, like appSettings and connectionStrings, supports the attributes file and configSource. What is the difference between using the file-attribute and the configSource-attribute? When should you use which attribute and can you use both? <?xml version=”1.0″?> <configuration> <appSettings file=”AppSettings.config”> </appSettings> <connectionStrings configSource=”ConnectionStrings.config”> </connectionStrings> <!– … –> </configuration> … Read more

Using different Web.config in development and production environment

I need to use different database connection string and SMTP server address in my ASP.NET application depending on it is run in development or production environment. The application reads settings from Web.config file via WebConfigurationManager.AppSettings property. I use Build/Publish command to deploy the application to production server via FTP and then manually replace remote Web.config … Read more

ASP.NET Identity DbContext confusion

A default MVC 5 App comes with this piece of code in IdentityModels.cs – this piece of code is for all the ASP.NET Identity operations for the default templates: public class ApplicationDbContext : IdentityDbContext<ApplicationUser> { public ApplicationDbContext() : base(“DefaultConnection”) { } } If I scaffold a new controller using views with Entity Framework and create … Read more

Difference between and ?

Every time I have to add a handler or module for ASP.NET with IIS7, the instructions always tell me to incorporate it into two sections: system.web and system.webserver. <system.web> <httpHandlers> </httpHandlers> <httpModules> </httpModules> </system.web> And this: <system.webServer> <modules> </modules> <handlers> </handlers> </system.webServer> What is the difference between these two sections? In addition, if I don’t … Read more

What is the claims in ASP .NET Identity

Can somebody please explain, what the claim mechanism means in new ASP.NET Identity Core? As I can see, there is an AspNetUserLogins table, which contains UserId, LoginProvider and ProviderKey. But, I still can’t understand or find any information on when data is added to the AspNetUserClaims table and what situations this table is used for? … Read more

DropDownList’s SelectedIndexChanged event not firing

I have a DropDownList object in my web page. When I click on it and select a different value, nothing happens, even though I have a function wired up to the SelectedIndexChanged event. First, the actual object’s HTML code: <asp:DropDownList ID=”logList” runat=”server” onselectedindexchanged=”itemSelected”> </asp:DropDownList> And this is that function, itemSelected: protected void itemSelected(object sender, EventArgs … Read more

Unable to launch the IIS Express Web server, Failed to register URL, Access is denied

Some web projects are causing me problems while others work fine. I decided to focus on one of the problematic ones. I’m using Visual Studio 2013 on Windows 7. I think I’m running it as administrator, the window title says PROJECT NAME – Microsoft Visual Studio (Administrator). When I try to run the project I … Read more