Skip to content
This repository was archived by the owner on Jan 23, 2020. It is now read-only.

Commit e1d2a35

Browse files
committed
Updating to RC2 & dotnet sdk
1 parent e937177 commit e1d2a35

File tree

655 files changed

+32894
-202631
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

655 files changed

+32894
-202631
lines changed

.vs/config/applicationhost.config

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
</sectionGroup>
116116
<section name="applicationInitialization" allowDefinition="MachineToApplication" overrideModeDefault="Allow" />
117117
<section name="webSocket" overrideModeDefault="Deny" />
118-
<section name="httpPlatform" overrideModeDefault="Allow" />
118+
<section name="aspNetCore" overrideModeDefault="Allow" />
119119
</sectionGroup>
120120
</configSections>
121121
<configProtectedData>
@@ -154,20 +154,21 @@
154154
<binding protocol="http" bindingInformation=":8080:localhost" />
155155
</bindings>
156156
</site>
157-
<site name="TodoListService" id="2">
157+
<site name="TodoListWebApp" id="2">
158158
<application path="/" applicationPool="Clr4IntegratedAppPool">
159-
<virtualDirectory path="/" physicalPath="C:\Users\dastrock\Source\Azure-Samples\active-directory-dotnet-webapp-webapi-openidconnect-aspnet5\TodoListService\wwwroot" />
159+
<virtualDirectory path="/" physicalPath="C:\Users\dastrock\Source\Azure-Samples\dotnet-webapp-webapi-openidconnect-aspnet5-temp\WebApp-WebAPI-OpenIdConnect-DotNet" />
160160
</application>
161161
<bindings>
162-
<binding protocol="https" bindingInformation="*:44321:localhost" />
162+
<binding protocol="http" bindingInformation="*:6886:localhost" />
163+
<binding protocol="https" bindingInformation="*:44371:localhost" />
163164
</bindings>
164165
</site>
165-
<site name="TodoListWebApp" id="3">
166+
<site name="TodoListService" id="3">
166167
<application path="/" applicationPool="Clr4IntegratedAppPool">
167-
<virtualDirectory path="/" physicalPath="C:\Users\dastrock\Source\Azure-Samples\active-directory-dotnet-webapp-webapi-openidconnect-aspnet5\TodoListWebApp\wwwroot" />
168+
<virtualDirectory path="/" physicalPath="C:\Users\dastrock\Source\Azure-Samples\dotnet-webapp-webapi-openidconnect-aspnet5-temp\TodoListService" />
168169
</application>
169170
<bindings>
170-
<binding protocol="https" bindingInformation="*:44322:localhost" />
171+
<binding protocol="https" bindingInformation="*:44351:localhost" />
171172
</bindings>
172173
</site>
173174
<siteDefaults>
@@ -248,7 +249,7 @@
248249
<add name="ManagedEngineV4.0_32bit" image="%windir%\Microsoft.NET\Framework\v4.0.30319\webengine4.dll" preCondition="integratedMode,runtimeVersionv4.0,bitness32" />
249250
<add name="ManagedEngineV4.0_64bit" image="%windir%\Microsoft.NET\Framework64\v4.0.30319\webengine4.dll" preCondition="integratedMode,runtimeVersionv4.0,bitness64" />
250251
<add name="ApplicationInitializationModule" image="%IIS_BIN%\warmup.dll" />
251-
<add name="httpPlatformHandler" image="C:\Program Files (x86)\Microsoft Web Tools\HttpPlatformHandler\HttpPlatformHandler.dll" />
252+
<add name="AspNetCoreModule" image="C:\Program Files (x86)\Microsoft Web Tools\AspNetCoreModule\aspnetcore.dll" />
252253
</globalModules>
253254
<httpCompression directory="%TEMP%\iisexpress\IIS Temporary Compressed Files">
254255
<scheme name="gzip" dll="%IIS_BIN%\gzip.dll" />
@@ -891,7 +892,7 @@
891892
<add name="ScriptModule-4.0" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="managedHandler,runtimeVersionv4.0" />
892893
<add name="ServiceModel" type="System.ServiceModel.Activation.HttpModule, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="managedHandler,runtimeVersionv2.0" />
893894
<add name="ApplicationInitializationModule" lockItem="true" />
894-
<add name="httpPlatformHandler" />
895+
<add name="AspNetCoreModule" />
895896
</modules>
896897
<handlers accessPolicy="Read, Script">
897898
<!-- <add name="WebDAV" path="*" verb="PROPFIND,PROPPATCH,MKCOL,PUT,COPY,DELETE,MOVE,LOCK,UNLOCK" modules="WebDAVModule" resourceType="Unspecified" requireAccess="None" /> -->
@@ -989,4 +990,14 @@
989990
</handlers>
990991
</system.webServer>
991992
</location>
993+
<location path="TodoListWebApp">
994+
<system.webServer>
995+
<security>
996+
<authentication>
997+
<anonymousAuthentication enabled="true" />
998+
<windowsAuthentication enabled="false" />
999+
</authentication>
1000+
</security>
1001+
</system.webServer>
1002+
</location>
9921003
</configuration>

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ This sample shows how to build an MVC web application that uses Azure AD for sig
99

1010
For more information about how the protocols work in this scenario and other scenarios, see [Authentication Scenarios for Azure AD](http://go.microsoft.com/fwlink/?LinkId=394414).
1111

12+
> Looking for previous versions of this code sample? Check out the tags on the [releases](../../releases) GitHub page.
13+
1214
## How To Run This Sample
1315

1416
To run this sample you will need:

TodoListService/Controllers/HomeController.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
using Microsoft.AspNet.Mvc;
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
using Microsoft.AspNetCore.Mvc;
26

37
// For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860
48

@@ -7,7 +11,6 @@ namespace TodoListService.Controllers
711
public class HomeController : Controller
812
{
913
// GET: /<controller>/
10-
[HttpGet("/")]
1114
public IActionResult Index()
1215
{
1316
return View();
Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
using System;
2+
using System.Collections.Concurrent;
23
using System.Collections.Generic;
34
using System.Linq;
4-
using Microsoft.AspNet.Mvc;
55
using System.Security.Claims;
6+
using System.Threading.Tasks;
7+
using Microsoft.AspNetCore.Authorization;
8+
using Microsoft.AspNetCore.Mvc;
69
using TodoListService.Models;
7-
using System.Collections.Concurrent;
8-
using Microsoft.AspNet.Authorization;
10+
11+
// For more information on enabling Web API for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860
912

1013
namespace TodoListService.Controllers
1114
{
@@ -15,20 +18,20 @@ public class TodoListController : Controller
1518
{
1619
static ConcurrentBag<TodoItem> todoStore = new ConcurrentBag<TodoItem>();
1720

18-
// GET: api/todolist
21+
// GET: api/values
1922
[HttpGet]
2023
public IEnumerable<TodoItem> Get()
2124
{
22-
string owner = (ClaimsPrincipal.Current.FindFirst(ClaimTypes.NameIdentifier))?.Value;
25+
string owner = (User.FindFirst(ClaimTypes.NameIdentifier))?.Value;
2326
return todoStore.Where(t => t.Owner == owner).ToList();
2427
}
25-
26-
// POST api/todolist
28+
29+
// POST api/values
2730
[HttpPost]
28-
public void Post(string Title)
31+
public void Post([FromBody]TodoItem Todo)
2932
{
30-
string owner = (ClaimsPrincipal.Current.FindFirst(ClaimTypes.NameIdentifier))?.Value;
31-
todoStore.Add(new TodoItem { Owner = owner, Title = Title });
33+
string owner = (User.FindFirst(ClaimTypes.NameIdentifier))?.Value;
34+
todoStore.Add(new TodoItem { Owner = owner, Title = Todo.Title });
3235
}
3336
}
3437
}

TodoListService/Models/TodoItem.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
25

36
namespace TodoListService.Models
47
{
@@ -7,4 +10,4 @@ public class TodoItem
710
public string Owner { get; set; }
811
public string Title { get; set; }
912
}
10-
}
13+
}

TodoListService/Program.cs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.IO;
4+
using System.Linq;
5+
using System.Threading.Tasks;
6+
using Microsoft.AspNetCore.Hosting;
7+
using Microsoft.AspNetCore.Builder;
8+
9+
namespace TodoListService
10+
{
11+
public class Program
12+
{
13+
// Entry point for the application.
14+
public static void Main(string[] args)
15+
{
16+
var host = new WebHostBuilder()
17+
.UseKestrel()
18+
.UseContentRoot(Directory.GetCurrentDirectory())
19+
.UseDefaultHostingConfiguration(args)
20+
.UseIISIntegration()
21+
.UseStartup<Startup>()
22+
.Build();
23+
24+
host.Run();
25+
}
26+
}
27+
}

TodoListService/Project_Readme.html

Lines changed: 27 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<title>Welcome to ASP.NET 5</title>
5+
<title>Welcome to ASP.NET Core</title>
66
<style>
77
html {
88
background: #f1f1f1;
@@ -128,70 +128,53 @@
128128
<body>
129129

130130
<div id="header">
131-
<h1>Welcome to ASP.NET 5 Preview</h1>
131+
<h1>Welcome to ASP.NET Core</h1>
132132
<span>
133-
We've made some big updates in this release, so it’s <b>important</b> that you spend
133+
We've made some big updates in this release, so it’s <b>important</b> that you spend
134134
a few minutes to learn what’s new.
135-
<br /><br />
136-
ASP.NET 5 has been rearchitected to make it <b>lean</b> and <b>composable</b>. It's fully
137-
<b>open source</b> and available on <a href="http://go.microsoft.com/fwlink/?LinkID=517854">GitHub</a>.
138-
<br />
139-
Your new project automatically takes advantage of modern client-side utilities
140-
like <a href="http://go.microsoft.com/fwlink/?LinkId=518004">Bower</a> and <a href="http://go.microsoft.com/fwlink/?LinkId=518005">npm</a>
141-
(to add client-side libraries) and <a href="http://go.microsoft.com/fwlink/?LinkId=518006">Grunt</a> and
142-
<a href="http://go.microsoft.com/fwlink/?LinkId=518007">Gulp</a> (for client-side build and automation tasks).
143-
144-
<br /><br />
145-
We hope you enjoy the new capabilities in ASP.NET 5 and Visual Studio 2015.
146-
<br />
147-
The ASP.NET Team
148135
</span>
149-
<p>You've created a new ASP.NET 5 project. <a href="http://go.microsoft.com/fwlink/?LinkId=518016">Learn what's new</a></p>
136+
<p>You've created a new ASP.NET Core project. <a href="http://go.microsoft.com/fwlink/?LinkId=518016">Learn what's new</a></p>
150137
</div>
151138

152139
<div id="main">
153140
<div class="section first">
154141
<h2>This application consists of:</h2>
155142
<ul>
156-
<li>Sample pages using ASP.NET MVC 6</li>
157-
<li><a href="http://go.microsoft.com/fwlink/?LinkId=518006">Grunt</a> and <a href="http://go.microsoft.com/fwlink/?LinkId=518004">Bower</a> for managing client-side resources</li>
143+
<li>Sample pages using ASP.NET Core MVC</li>
144+
<li><a href="http://go.microsoft.com/fwlink/?LinkId=518007">Gulp</a> and <a href="http://go.microsoft.com/fwlink/?LinkId=518004">Bower</a> for managing client-side libraries</li>
158145
<li>Theming using <a href="http://go.microsoft.com/fwlink/?LinkID=398939">Bootstrap</a></li>
159146
</ul>
160147
</div>
161-
162148
<div class="section">
163-
<h2>New concepts</h2>
149+
<h2>How to</h2>
164150
<ul>
165-
<li><a href="http://go.microsoft.com/fwlink/?LinkId=518008">The 'wwwroot' explained</a></li>
166-
<li><a href="http://go.microsoft.com/fwlink/?LinkId=518012">Configuration in ASP.NET 5</a></li>
167-
<li><a href="http://go.microsoft.com/fwlink/?LinkId=518013">Dependency Injection</a></li>
168-
<li><a href="http://go.microsoft.com/fwlink/?LinkId=518014">Razor TagHelpers</a></li>
169-
<li><a href="http://go.microsoft.com/fwlink/?LinkID=517849">Manage client packages using Grunt</a></li>
170-
<li><a href="http://go.microsoft.com/fwlink/?LinkID=517850">Develop on different platforms</a></li>
151+
<li><a href="http://go.microsoft.com/fwlink/?LinkID=398600">Add a Controller and View</a></li>
152+
<li><a href="http://go.microsoft.com/fwlink/?LinkID=699562">Add an appsetting in config and access it in app.</a></li>
153+
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699315">Manage User Secrets using Secret Manager.</a></li>
154+
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699316">Use logging to log a message.</a></li>
155+
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699317">Add packages using NuGet.</a></li>
156+
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699318">Add client packages using Bower.</a></li>
157+
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699319">Target development, staging or production environment.</a></li>
171158
</ul>
172159
</div>
173-
174160
<div class="section">
175-
<h2>Customize app</h2>
161+
<h2>Overview</h2>
176162
<ul>
177-
<li><a href="http://go.microsoft.com/fwlink/?LinkID=398600">Add Controllers and Views</a></li>
178-
<li><a href="http://go.microsoft.com/fwlink/?LinkID=398602">Add Data using EntityFramework</a></li>
179-
<li><a href="http://go.microsoft.com/fwlink/?LinkID=398603">Add Authentication using Identity</a></li>
180-
<li><a href="http://go.microsoft.com/fwlink/?LinkID=398606">Add real time support using SignalR</a></li>
181-
<li><a href="http://go.microsoft.com/fwlink/?LinkID=398604">Add Class library</a></li>
182-
<li><a href="http://go.microsoft.com/fwlink/?LinkId=518009">Add Web APIs with MVC 6</a></li>
183-
<li><a href="http://go.microsoft.com/fwlink/?LinkID=517848">Add client packages using Bower</a></li>
163+
<li><a href="http://go.microsoft.com/fwlink/?LinkId=518008">Conceptual overview of what is ASP.NET Core</a></li>
164+
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699320">Fundamentals of ASP.NET Core such as Startup and middleware.</a></li>
165+
<li><a href="http://go.microsoft.com/fwlink/?LinkId=398602">Working with Data</a></li>
166+
<li><a href="http://go.microsoft.com/fwlink/?LinkId=398603">Security</a></li>
167+
<li><a href="http://go.microsoft.com/fwlink/?LinkID=699321">Client side development</a></li>
168+
<li><a href="http://go.microsoft.com/fwlink/?LinkID=699322">Develop on different platforms</a></li>
169+
<li><a href="http://go.microsoft.com/fwlink/?LinkID=699323">Read more on the documentation site</a></li>
184170
</ul>
185171
</div>
186-
187172
<div class="section last">
188-
<h2>Deploy</h2>
173+
<h2>Run & Deploy</h2>
189174
<ul>
190-
<li><a href="http://go.microsoft.com/fwlink/?LinkID=517851">Run your app locally</a></li>
191-
<li><a href="http://go.microsoft.com/fwlink/?LinkID=517852">Run your app on ASP.NET Core 5</a></li>
192-
<li><a href="http://go.microsoft.com/fwlink/?LinkID=517853">Run commands in your project.json</a></li>
193-
<li><a href="http://go.microsoft.com/fwlink/?LinkID=398609">Publish to Microsoft Azure Web Sites</a></li>
194-
<li><a href="http://go.microsoft.com/fwlink/?LinkId=518019">Publish to the file system</a></li>
175+
<li><a href="http://go.microsoft.com/fwlink/?LinkID=517851">Run your app</a></li>
176+
<li><a href="http://go.microsoft.com/fwlink/?LinkID=517853">Run tools such as EF migrations and more</a></li>
177+
<li><a href="http://go.microsoft.com/fwlink/?LinkID=398609">Publish to Microsoft Azure Web Apps</a></li>
195178
</ul>
196179
</div>
197180

@@ -201,4 +184,4 @@ <h2>Deploy</h2>
201184
</div>
202185

203186
</body>
204-
</html>
187+
</html>

TodoListService/Properties/debugSettings.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

TodoListService/Properties/launchSettings.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,16 @@
33
"windowsAuthentication": false,
44
"anonymousAuthentication": true,
55
"iisExpress": {
6-
"applicationUrl": "https://localhost:44321/",
7-
"sslPort": 0
6+
"applicationUrl": "https://localhost:44351/",
7+
"sslPort": 44351
88
}
99
},
1010
"profiles": {
1111
"IIS Express": {
1212
"commandName": "IISExpress",
1313
"launchBrowser": true,
1414
"environmentVariables": {
15-
"Hosting:Environment": "Development"
16-
}
17-
},
18-
"web": {
19-
"commandName": "web",
20-
"environmentVariables": {
21-
"Hosting:Environment": "Development"
15+
"ASPNET_ENVIRONMENT": "Development"
2216
}
2317
}
2418
}

0 commit comments

Comments
 (0)