Entity Framework Core: Initialize and Create Database

When you have finished defining your EF model the first time and you want to create the actual database and tables. First you will need to install the EF Core command line tools, you can do this in the .NET Core CLI or inside Visual Studio. But this post I will be focusing on Visual Studio only. So open your Package Manager Console and enter the following commands.

Install-Package Microsoft.EntityFrameworkCore.Tools

The Install-Package command will install the command tools for you, before you can continue to the next command.

Add-Migration InitialCreate

Add-Migration command will create the migration to generate the initial sets of tables for the model.

Update-Database

Update-Database command will create the database and applies the new migration to it.

SharePoint Prerequisite Installation Can’t Install Web Server Role

If you are trying to install the prerequisite for SharePoint 2013 or 2016 and you come across an error message saying it can’t install the web server role. Most likely the issue is that you haven’t installed .NET Framework 3.5 feature on the server.

Go to Server Manager and select Add roles and features, click next till you see a list of features and then select .NET Framework 3.5 Features and continue. After you have done this, install the prerequisite again.

 

Samsung Galaxy Note 7 Recall

samsung-note-7-colors

So it’s been 2 weeks since we were contacted by Harvey Norman to recall our Note 7 mobile phone due to the internal battery exploding issue that is going around. So we took it back for a new replacement which will be available on 21st September 2016.

Harvey Norman and other resellers are also offering a courtesy Samsung J1 Mini phone that we get to keep, or get a loan S7 and swap it back for your Note 7 when it arrives. Also we get to keep all the accessories that came with the Note 7 inside the box too! So now I have an extra fast charger to USB-C and headphones.

I’m still considering if I should get a full refund while still waiting for the new replacement. The reason is because I have a feeling that when the phone goes back on sale to the public in October the price might drop.

I recommend that you go to Samsung’s web site for more information on the recall process, or contact the place of purchase.

 

SharePoint: Configure App Domain on Host Header Environments

So I have configured a host header web application and the application domain (apps.domain.com). I was able to download and install apps from the apps store, but when I click on the app the I get an error 404 Not Found.

While doing some digging around on the Internet I discovered there is a PowerShell cmdlet that I can run to configure app domain and web application. If have already created a app domain in your DNS, you will need to create a new host header web application using the app domain name (http://apps.domain.com).

To configure your app domain use the following cmdlet:

New-SPWebApplicationAppDomain -AppDomain <AppDomain> -WebApplication <WebApplicationID> -Zone <Zone> -Port <Port> -SecureSocketsLayer

Where:

  • <AppDomain> is the URI of the app domain. This parameter is required.
  • <WebApplicationID> is the GUID, URI, or name of the web application for which the app domain is being configured. This parameter is required.
  • <Zone> is the security zone to which the app domain will be assigned. Possible values are “Default”, “Intranet”, “Internet”, “Custom”, or “Extranet”. If no value is specified “Default” will be applied. This parameter is optional.
  • <Port> is the IIS port number to which the app domain will be assigned. If no value is specified, the same port that is used by the web application for the zone will be applied. This parameter is optional.
  • -SecureSocketsLayer is a parameter to specify that the app domain will use Secured Sockets Layer (SSL) security. If no value is specified, no SSL security will be used.This parameter is optional.

To remove the app domain use the following cmdlet:

Remove-SPWebApplicationAppDomain -WebApplication <WebApplicationID> -Zone <Zone>

Where:

  • <WebApplicationID> is the GUID, URI, or name of the web application for which the app domains will be removed. This parameter is required.
  • <Zone> is the security zone from which the app domain will be removed. Possible values are “Default”, “Intranet”, “Internet”, “Custom”, or “Extranet”. If no value is specified, all of the app domains for the web application will be removed. This parameter is optional.

 

SharePoint: Web Application Creation Fails

If you have noticed after you have created a few web applications in SharePoint Central Administration, your new web application doesn’t complete it’s process normally and at the end you see an error message in a dialog saying it can’t find the following URL address.

But if you think that your site has been created successfully, well don’t keep your hopes up because it didn’t. The reason for this is because the more web application is created the time in which it takes to create a web application increases.  As part of the creation process, IIS is reset and by default, the application pool allows 90 seconds for the connections to close off before shutting down. When the number of web application grows above 90 seconds its not enough time for the provisioning to complete.

Don’t worry, I have done some searching around and found a resolution, by increasing the time longer before it shutdowns:

  1. On the same server that is hosting Central Administration, open IIS Manager.
  2. Expand the Application Pools section.
  3. Find the SharePoint Central Administration  application pool. Right click and choose Advance Settings.
  4. In the Process Model section set the Shutdown Time Limit to a higher value. Eg. 300
  5. Restart IIS.

 

Shares