Month: January 2017

Configure State Service Application in SharePoint 2016

$databaseServer = "{SERVER_NAME}\SHAREPOINT"
$databaseName = "SessionStateService"
$svcAppName = "State Service Application"
$svcAppProxyName = "State Service Application Proxy"

$database = New-SPStateServiceDatabase -Name $databaseName -DatabaseServer $databaseServer
$svcApp = New-SPStateServiceApplication -Name $svcAppName -Database $database
New-SPStateServiceApplicationProxy -ServiceApplication $svcApp -DefaultProxyGroup -Name $svcAppProxyName
Initialize-SPStateServiceDatabase -Identity $database

Building your first ASP.NET Core MVC app with Visual Studio

  1. Get Started
    • ASP.NET Core Web Application (.NET Core)
  2. Adding Controller
  3. Adding View
    • Layout Page
      • Views/Shared/_Layout.cshtml
      • @RenderBody()
    • Passing Data from the Controller to View
      • ViewData dictionary
  4. Adding Model
    • Scaffolding a controller
      • MVC Controller with views, using Entity Framework
    • Update the database
      • dotnet ef migrations add [migration name]
      • dotnet ef database update
    • Strongly typed models and the @model keyword
  5. Working with SQL Server LocalDB
    • Seed the database
  6. Controller Methods and Views
    • Protect your controller from over-posting
    • Validate AntiForgeryToken
  7. Adding Search
  8. Adding New Field
  9. Adding Validation
    • System.ComponentModel.DataAnnotations
  10. Examining the Details and Delete Methods

See Also



Classes that represent the data of the app and that use validation logic to enforce business rules for that data. Typically, model objects retrieve and store model state in a database.

Views are the components that display the app’s user interface (UI). Generally, this UI displays the model data.

Classes that handle browser requests, retrieve model data, and than specify view templates that return a response to the browser. In an MVC app, the view only displays information; the controller handles and responds to user input and interaction. For example, the controller handles route data and query-string values, and passes these values to the model. The model might use these values to query the database.