How to configure Web Deploy publishing feature on IIS so developer can publish?

It appears that one must still download the Web Deploy extension. Also, Version 3.5 is now available. To download on a server, default IE security rules will require you add something like http://*.microsoft.com as a trusted site else you can’t download the installer. The whole package is rather large in its purpose and covers many … Read more

Can some hacker steal a web browser cookie from a user and login with that name on a web site?

Is it possible to steal a cookie and authenticate as an administrator? Yes it is possible, if the Forms Auth cookie is not encrypted, someone could hack their cookie to give them elevated privileges or if SSL is not require, copy someone another person’s cookie. However, there are steps you can take to mitigate these … Read more

How to set cell color programmatically epplus?

Check your line: if (dtdata.Rows[4].ToString() == “Annual Leave”) If it is a standard .net table wouldnt .ToString() evaluate to “System.Data.DataRow”? Also ws.Cells[“E1”] will need to be adjusted for each cell after looping through the row count (basically what krillgar was saying). Something like that: [TestMethod] public void Cell_Color_Background_Test() { //http://stackoverflow.com/questions/28679602/how-to-set-cell-color-programmatically-epplus //Throw in some data var … Read more

Dotnet core 2.0 authentication multiple schemas identity cookies and jwt

Asp.Net Core 2.0 definitely support multiple authentication schemes. Rather than a hacking with authenticate middleware, you can try to specify the schema in Authorize attribute: [Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)] I gave a try and it worked fine. Assuming you have added both Identity and JWT as below: services.AddIdentity<ApplicationUser, ApplicationRole>() services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) Since AddIdentity() already set cookie authentication … Read more

AutoValidateAntiForgeryToken vs. ValidateAntiForgeryToken

From AutoValidateAntiforgeryTokenAttribute documentation: An attribute that causes validation of antiforgery tokens for all unsafe HTTP methods. An antiforgery token is required for HTTP methods other than GET, HEAD, OPTIONS, and TRACE. It can be applied at as a global filter to trigger validation of antiforgery tokens by default for an application. AutoValidateAntiforgeryTokenAttribute allows to apply … Read more

ASP.NET Core 2.1 Identity: How to remove the Default UI razor pages?

Using the article linked by Panagiotis Kanavos, I was able to reach a solution. From the ASP.NET Core 2.1.0-preview1, there was a line .AddDefaultUI(), which you didn’t have to include in Startup.cs. services.AddIdentity<IdentityUser, IdentityRole>(options => options.Stores.MaxLengthForKeys = 128) .AddEntityFrameworkStores<ApplicationDbContext>() .AddDefaultUI() .AddDefaultTokenProviders(); In the final release version of Core 2.1 however, the same section was simplified … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)