10 changes: 5 additions & 5 deletions src/live.asp.net/TagHelpers/ScriptInliningTagHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
using System;
using System.IO;
using System.Text;
using Microsoft.AspNet.FileProviders;
using Microsoft.AspNet.Hosting;
using Microsoft.AspNet.Mvc.Rendering;
using Microsoft.AspNet.Mvc.ViewFeatures;
using Microsoft.AspNet.Razor.TagHelpers;
using Microsoft.Extensions.FileProviders;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Razor.TagHelpers;

namespace live.asp.net.TagHelpers
{
Expand Down
10 changes: 5 additions & 5 deletions src/live.asp.net/ViewModels/HomeViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
using System;
using System.Collections.Generic;
using live.asp.net.Models;
using Microsoft.Extensions.WebEncoders;
using System.Text.Encodings.Web;

namespace live.asp.net.ViewModels
{
public class HomeViewModel
{
private static readonly string _dateTimeFormat = "yyyyMMddTHHmmssZ";
private static readonly string _googleCalendarText = UrlEncoder.Default.UrlEncode("ASP.NET Community Standup");
private static readonly string _googleCalendarLocation = UrlEncoder.Default.UrlEncode("https://live.asp.net/");
private static readonly string _googleCalendarText = UrlEncoder.Default.Encode("ASP.NET Community Standup");
private static readonly string _googleCalendarLocation = UrlEncoder.Default.Encode("https://live.asp.net/");

public bool IsOnAir => !HasAdminMessage && !string.IsNullOrEmpty(LiveShowEmbedUrl);

Expand All @@ -39,8 +39,8 @@ public string AddToGoogleUrl
get
{
// reference: http://stackoverflow.com/a/21653600/22941
var from = UrlEncoder.Default.UrlEncode(NextShowDateUtc?.ToString(_dateTimeFormat));
var to = UrlEncoder.Default.UrlEncode(NextShowDateUtc?.AddMinutes(30).ToString(_dateTimeFormat));
var from = UrlEncoder.Default.Encode(NextShowDateUtc?.ToString(_dateTimeFormat));
var to = UrlEncoder.Default.Encode(NextShowDateUtc?.AddMinutes(30).ToString(_dateTimeFormat));

return $"https://www.google.com/calendar/render?action=TEMPLATE&text={_googleCalendarText}&dates={from}/{to}&details={_googleCalendarLocation}&location={_googleCalendarLocation}&sf=true&output=xml";
}
Expand Down
2 changes: 1 addition & 1 deletion src/live.asp.net/Views/Admin/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
@Model.SuccessMessage
</div>
}
<div asp-validation-summary="ValidationSummary.All" class="text-danger"></div>
<div asp-validation-summary="All" class="text-danger"></div>
<div class="form-group">
<label asp-for="AdminMessage" class="col-md-3 control-label"></label>
<div class="col-md-9">
Expand Down
4 changes: 2 additions & 2 deletions src/live.asp.net/Views/Shared/_AnalyticsHead.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@using Microsoft.ApplicationInsights.Extensibility
@inject TelemetryConfiguration TelemetryConfiguration
@*@inject TelemetryConfiguration TelemetryConfiguration*@

<environment names="Production">

Expand All @@ -17,5 +17,5 @@
ga('liveaspnetTracker.send', 'pageview');
</script>

@Html.ApplicationInsightsJavaScript(TelemetryConfiguration)
@* @Html.ApplicationInsightsJavaScript(TelemetryConfiguration) *@
</environment>
2 changes: 1 addition & 1 deletion src/live.asp.net/Views/Shared/_Layout.cshtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@inject Microsoft.AspNet.Hosting.IHostingEnvironment HostingEnvironment
@inject Microsoft.AspNetCore.Hosting.IHostingEnvironment HostingEnvironment
@inject Microsoft.Extensions.PlatformAbstractions.IApplicationEnvironment ApplicationEnvironment
<!DOCTYPE html>
<html>
Expand Down
4 changes: 2 additions & 2 deletions src/live.asp.net/Views/_ViewImports.cshtml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@using live.asp.net
@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers"
@addTagHelper "*, live.asp.net"
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, live.asp.net
7 changes: 7 additions & 0 deletions src/live.asp.net/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
"AzureStorageContainerName": "live-asp-net",
"AzureStorageBlobName": "ShowDetails.localhost.json"
},
"Authentication": {
"AzureAd": {
"ClientId": "362d9613-09c4-4f4a-967f-328375f87d63",
"AADInstance": "https://login.microsoftonline.com/",
"TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47"
}
},

This comment has been minimized.

Copy link
@hbiarge

hbiarge Apr 29, 2016

UserSecrets + Environment variables :)

"Logging": {
"IncludeScopes": false,
"LogLevel": {
Expand Down
3 changes: 0 additions & 3 deletions src/live.asp.net/hosting.json

This file was deleted.

6 changes: 3 additions & 3 deletions src/live.asp.net/live.asp.net.xproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />

This comment has been minimized.

Copy link
@MariovanZeist

MariovanZeist Apr 28, 2016

I am assuming this works only when the new VS tooling has been released? Or is there some other "sneaky" way to get this to work :)

<PropertyGroup Label="Globals">
<ProjectGuid>36b98821-099a-4c64-a117-151354333639</ProjectGuid>
<RootNamespace>live.asp.net</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\bin\$(MSBuildProjectName)\</OutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">.\</OutputPath>
</PropertyGroup>
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
<WebProject_DirectoryAccessLevelKey>0</WebProject_DirectoryAccessLevelKey>
<DevelopmentServerPort>33451</DevelopmentServerPort>
<SSLPort>44300</SSLPort>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
<Import Project="$(VSToolsPath)\DotNet.Web\Microsoft.DotNet.Web.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
73 changes: 50 additions & 23 deletions src/live.asp.net/project.json
Original file line number Diff line number Diff line change
@@ -1,39 +1,65 @@
{
"version": "1.0.0-*",

"webroot": "wwwroot",
"userSecretsId": "aspnet5-live.asp.net-20150723035013",
"version": "1.0.0-*",

"compilationOptions": {
"warningsAsErrors": true,
"emitEntryPoint": true
"emitEntryPoint": true,
"preserveCompilationContext": true
},

"dependencies": {
"Microsoft.AspNet.Mvc": "6.0.0-rc1-final",
"Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-rc1-final",
"Microsoft.AspNet.Authentication.Cookies": "1.0.0-rc1-final",
"Microsoft.AspNet.Authentication.OpenIdConnect": "1.0.0-rc1-final",
"Microsoft.AspNet.Diagnostics": "1.0.0-rc1-final",
"Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final",
"Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final",
"Microsoft.AspNet.Tooling.Razor": "1.0.0-rc1-final",
"Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final",
"Microsoft.Extensions.Configuration.Json": "1.0.0-rc1-final",
"Microsoft.Extensions.Configuration.UserSecrets": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final",
"Microsoft.ApplicationInsights.AspNet": "1.0.0-rc1",
"Newtonsoft.Json": "8.0.2",
"Google.Apis.YouTube.v3": "1.9.2.1540",
"WindowsAzure.Storage": "6.1.1-*"
"Microsoft.NETCore.App": {
"version": "1.0.0-rc2-24008",
"type": "platform"
},
"Microsoft.NETCore.Portable.Compatibility": "1.0.1-rc2-24008",
"Microsoft.AspNetCore.Mvc": "1.0.0-rc2-20581",
"Microsoft.AspNetCore.Mvc.TagHelpers": "1.0.0-rc2-20581",
"Microsoft.AspNetCore.Authentication.Cookies": "1.0.0-rc2-20581",
"Microsoft.AspNetCore.Authentication.OpenIdConnect": "0.1.0-rc2-20581",
"Microsoft.AspNetCore.Diagnostics": "1.0.0-rc2-20581",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-20581",
"Microsoft.AspNetCore.StaticFiles": "1.0.0-rc2-20581",
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-rc2-20581",
"Microsoft.Extensions.Configuration.Binder": "1.0.0-rc2-20581",
"Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-20581",
"Microsoft.Extensions.Configuration.UserSecrets": "1.0.0-rc2-20581",
"Microsoft.Extensions.Logging": "1.0.0-rc2-20581",
"Microsoft.Extensions.Logging.Console": "1.0.0-rc2-20581",
"Microsoft.Extensions.Logging.Debug": "1.0.0-rc2-20581",
"Microsoft.ApplicationInsights.AspNetCore": "1.0.0-rc2-beta1",
"Newtonsoft.Json": "8.0.3",
"Google.Apis.YouTube.v3": "1.12.0.461",
"WindowsAzure.Storage": "7.0.1-preview"
},
"commands": {
"web": "Microsoft.AspNet.Server.Kestrel"

"tools": {
"dotnet-razor-tooling": {
"version": "1.0.0-rc2-20581",
"imports": "portable-net45+wp80+win8+wpa81+dnxcore50"
}
},

"frameworks": {
"dnx451": { }
"netcoreapp1.0": {
"imports": [
"portable-dnxcore50+net45+win8+wp8+wpa81",
"portable-net45+win8+wpa81",
"dotnet5.6"
]
}
},

"content": [
"Views",
"wwwroot",
"web.config",
"appsettings.json"
],

"exclude": [
"wwwroot",
"node_modules"
Expand All @@ -42,6 +68,7 @@
"**.user",
"**.vspscc"
],

"scripts": {
"prepublish": [ "npm install", "bower install", "gulp clean", "gulp csslint", "gulp jshint", "gulp min" ]
}
Expand Down
30 changes: 30 additions & 0 deletions src/live.asp.net/web.Debug.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>

<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->

<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<!--
In the example below, the "SetAttributes" transform will change the value of
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
finds an attribute "name" that has a value of "MyDB".
<connectionStrings>
<add name="MyDB"
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
</connectionStrings>
-->
<system.web>
<!--
In the example below, the "Replace" transform will replace the entire
<customErrors> section of your web.config file.
Note that because there is only one customErrors section under the
<system.web> node, there is no need to use the "xdt:Locator" attribute.
<customErrors defaultRedirect="GenericError.htm"
mode="RemoteOnly" xdt:Transform="Replace">
<error statusCode="500" redirect="InternalError.htm"/>
</customErrors>
-->
</system.web>
</configuration>
31 changes: 31 additions & 0 deletions src/live.asp.net/web.Release.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>

<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->

<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<!--
In the example below, the "SetAttributes" transform will change the value of
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
finds an attribute "name" that has a value of "MyDB".
<connectionStrings>
<add name="MyDB"
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
</connectionStrings>
-->
<system.web>
<compilation xdt:Transform="RemoveAttributes(debug)" />
<!--
In the example below, the "Replace" transform will replace the entire
<customErrors> section of your web.config file.
Note that because there is only one customErrors section under the
<system.web> node, there is no need to use the "xdt:Locator" attribute.
<customErrors defaultRedirect="GenericError.htm"
mode="RemoteOnly" xdt:Transform="Replace">
<error statusCode="500" redirect="InternalError.htm"/>
</customErrors>
-->
</system.web>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,30 @@
<configuration>
<system.webServer>
<handlers>
<add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified"/>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<httpPlatform processPath="%DNX_PATH%" arguments="%DNX_ARGS%" stdoutLogEnabled="false" startupTimeLimit="3600"/>
<rewrite>
<rules>
<rule name="Redirect to https">
<match url="(.*)"/>
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="Off"/>
<add input="{HTTPS}" pattern="Off" />
<add input="{REQUEST_METHOD}" pattern="^get$|^head$" />
<add input="{HTTP_HOST}" negate="true" pattern="localhost" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}"/>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" />
</rule>
<rule name="Redirect to https (localhost)">
<match url="(.*)"/>
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="Off"/>
<add input="{HTTPS}" pattern="Off" />
<add input="{REQUEST_METHOD}" pattern="^get$|^head$" />
<add input="{HTTP_HOST}" pattern="localhost:11321" />
</conditions>
<action type="Redirect" url="https://localhost:44383/{R:1}"/>
<action type="Redirect" url="https://localhost:44383/{R:1}" />
</rule>
</rules>
</rewrite>
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" forwardWindowsAuthToken="false" stdoutLogEnabled="false" />
</system.webServer>
</configuration>
</configuration>