Posts

Showing posts from January, 2018

Net Core: Reset EF Migrations to a clean State

Net Core: Reset EF Migrations to a clean State: https://stackoverflow.com/questions/43687433/update-database-command-is-not-working-in-asp-net-core-entity-framework-6-beca https://weblog.west-wind.com/posts/2016/jan/13/resetting-entity-framework-migrations-to-a-clean-slate Removing and Resetting Migrations The idea of this process is basically this: The database and the EF schema are up to date and just the way you want it, so we are going to remove the existing migrations and create a new initial migration. In summary, the steps to do this are: Remove the _MigrationHistory table from the Database Remove the individual migration files in your project's Migrations folder Enable-Migrations  in Package Manager Console Add-migration Initial  in PMC Comment out the code inside of the Up method in the Initial Migration Update-database  in PMC (does nothing but creates Migration Entry) Remove comments in the Initial method You've now essentially reset th

Pass-through Authentication on an IIS Intranet site

We wish to use Single Sign On  to pass Windows Authentication through our Intranet site called LibPrograms. Firstly, we need enable Windows Authentication in IIS. In   IIS / Sites / LibPrograms / Authentication set as follows: Anonymous Authentication: disabled Windows Authentication: Enabled Secondly, add LibPrograms site to Local Intranet: IE 11 - Internet Option / Security / Local Intranet / Sites / Check Automatically detect intranet work / Advanced / Manually add this site to Local Intranet - Check Custom Level for Local Intranet: scroll down to the bottom, in User Authentication section, make sure Automatic logon only in Intranet zone is selected. Note: there is no such settings in IE Edge - so called "modern" browsers. Chrome Settings / Advanced /Search "proxy" / click Open proxy settings / this is the same one settings as in IE 11