diff --git a/samples/angular/MusicStore/.gitignore b/samples/angular/MusicStore/.gitignore index 051e6c1..762a3e6 100644 --- a/samples/angular/MusicStore/.gitignore +++ b/samples/angular/MusicStore/.gitignore @@ -3,3 +3,8 @@ /wwwroot/ng-app/**/*.js /project.lock.json /music-db.sqlite +/Properties/launchSettings.json + +# Obviously you don't really want your DB to go in wwwroot, but due to https://github.com/aspnet/Microsoft.Data.Sqlite/issues/188 +# it currently does when run from IIS Express. Will resolve this once RC2 is out, which is supposed to eliminate the inconsistency. +/wwwroot/music-db.sqlite diff --git a/samples/angular/MusicStore/Apis/Models/SampleData.cs b/samples/angular/MusicStore/Apis/Models/SampleData.cs index c6e86d3..95ed0b3 100644 --- a/samples/angular/MusicStore/Apis/Models/SampleData.cs +++ b/samples/angular/MusicStore/Apis/Models/SampleData.cs @@ -22,36 +22,10 @@ namespace MusicStore.Models if (await db.Database.EnsureCreatedAsync()) { await InsertTestData(serviceProvider); - await CreateAdminUser(serviceProvider); } } } - private static async Task CreateAdminUser(IServiceProvider serviceProvider) - { - return; - - var settings = serviceProvider.GetService>().Value; - const string adminRole = "Administrator"; - - var userManager = serviceProvider.GetService>(); - var roleManager = serviceProvider.GetService>(); - - if (!await roleManager.RoleExistsAsync(adminRole)) - { - await roleManager.CreateAsync(new IdentityRole(adminRole)); - } - - var user = await userManager.FindByNameAsync(settings.DefaultAdminUsername); - if (user == null) - { - user = new ApplicationUser { UserName = settings.DefaultAdminUsername }; - await userManager.CreateAsync(user, settings.DefaultAdminPassword); - await userManager.AddToRoleAsync(user, adminRole); - await userManager.AddClaimAsync(user, new Claim("app-ManageStore", "Allowed")); - } - } - private static async Task InsertTestData(IServiceProvider serviceProvider) { var albums = GetAlbums(imgUrl, Genres, Artists); diff --git a/samples/misc/ES2015Transpilation/.gitignore b/samples/misc/ES2015Transpilation/.gitignore index 2ccbe46..6330d42 100644 --- a/samples/misc/ES2015Transpilation/.gitignore +++ b/samples/misc/ES2015Transpilation/.gitignore @@ -1 +1,2 @@ /node_modules/ +/Properties/launchSettings.json diff --git a/samples/react/ReactGrid/.gitignore b/samples/react/ReactGrid/.gitignore index ef7d547..ea034a8 100644 --- a/samples/react/ReactGrid/.gitignore +++ b/samples/react/ReactGrid/.gitignore @@ -3,3 +3,4 @@ project.lock.json /wwwroot/bundle.* /wwwroot/*.svg /wwwroot/*.css +/Properties/launchSettings.json diff --git a/samples/react/ReactGrid/Controllers/PeopleApiController.cs b/samples/react/ReactGrid/Controllers/PeopleApiController.cs index 82e967a..4ca743d 100644 --- a/samples/react/ReactGrid/Controllers/PeopleApiController.cs +++ b/samples/react/ReactGrid/Controllers/PeopleApiController.cs @@ -7,7 +7,7 @@ namespace ReactExample.Controllers public class PeopleApiController : Controller { [HttpPut("api/people/{personId:int}")] - public async Task UpdatePerson([FromBody] PersonDto person) + public ActionResult UpdatePerson([FromBody] PersonDto person) { if (!ModelState.IsValid) { return HttpBadRequest(ModelState); diff --git a/src/Microsoft.AspNet.AngularServices/project.json b/src/Microsoft.AspNet.AngularServices/project.json index f828c3c..65a0e45 100644 --- a/src/Microsoft.AspNet.AngularServices/project.json +++ b/src/Microsoft.AspNet.AngularServices/project.json @@ -1,6 +1,9 @@ { "version": "1.0.0-alpha7", "description": "Helpers for building Angular 2 applications on ASP.NET 5.", + "compilationOptions": { + "keyFile": "../../tools/Key.snk" + }, "authors": [ "Microsoft" ], "repository": { "type": "git", diff --git a/src/Microsoft.AspNet.NodeServices/project.json b/src/Microsoft.AspNet.NodeServices/project.json index 16f59e0..92a7608 100644 --- a/src/Microsoft.AspNet.NodeServices/project.json +++ b/src/Microsoft.AspNet.NodeServices/project.json @@ -1,6 +1,9 @@ { "version": "1.0.0-alpha7", "description": "Invoke Node.js modules at runtime in ASP.NET 5 applications.", + "compilationOptions": { + "keyFile": "../../tools/Key.snk" + }, "authors": [ "Microsoft" ], "repository": { "type": "git", diff --git a/src/Microsoft.AspNet.ReactServices/project.json b/src/Microsoft.AspNet.ReactServices/project.json index e12d64b..e00acef 100644 --- a/src/Microsoft.AspNet.ReactServices/project.json +++ b/src/Microsoft.AspNet.ReactServices/project.json @@ -1,6 +1,9 @@ { "version": "1.0.0-alpha7", "description": "Helpers for building React applications on ASP.NET 5.", + "compilationOptions": { + "keyFile": "../../tools/Key.snk" + }, "authors": [ "Microsoft" ], "repository": { "type": "git", diff --git a/src/Microsoft.AspNet.SpaServices/project.json b/src/Microsoft.AspNet.SpaServices/project.json index e53886b..19fc114 100644 --- a/src/Microsoft.AspNet.SpaServices/project.json +++ b/src/Microsoft.AspNet.SpaServices/project.json @@ -1,6 +1,9 @@ { "version": "1.0.0-alpha7-1", "description": "Microsoft.AspNet.SpaServices", + "compilationOptions": { + "keyFile": "../../tools/Key.snk" + }, "authors": [ "Microsoft" ], diff --git a/tools/Key.snk b/tools/Key.snk new file mode 100644 index 0000000..e10e488 Binary files /dev/null and b/tools/Key.snk differ