Permalink
Browse files

Add strong naming and fix DB path on IIS Express

  • Loading branch information...
1 parent 2218212 commit 73e218de4e7f8f9f70f2f26cb6ee9ab1502dab51 @SteveSandersonMS SteveSandersonMS committed Feb 2, 2016
@@ -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
@@ -22,36 +22,10 @@ public static class SampleData
if (await db.Database.EnsureCreatedAsync())
{
await InsertTestData(serviceProvider);
- await CreateAdminUser(serviceProvider);
}
}
}
- private static async Task CreateAdminUser(IServiceProvider serviceProvider)
- {
- return;
-
- var settings = serviceProvider.GetService<IOptions<SiteSettings>>().Value;
- const string adminRole = "Administrator";
-
- var userManager = serviceProvider.GetService<UserManager<ApplicationUser>>();
- var roleManager = serviceProvider.GetService<RoleManager<IdentityRole>>();
-
- 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);
@@ -1 +1,2 @@
/node_modules/
+/Properties/launchSettings.json
@@ -3,3 +3,4 @@ project.lock.json
/wwwroot/bundle.*
/wwwroot/*.svg
/wwwroot/*.css
+/Properties/launchSettings.json
@@ -7,7 +7,7 @@ namespace ReactExample.Controllers
public class PeopleApiController : Controller
{
[HttpPut("api/people/{personId:int}")]
- public async Task<ActionResult> UpdatePerson([FromBody] PersonDto person)
+ public ActionResult UpdatePerson([FromBody] PersonDto person)
{
if (!ModelState.IsValid) {
return HttpBadRequest(ModelState);
@@ -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",
@@ -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",
@@ -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",
@@ -1,6 +1,9 @@
{
"version": "1.0.0-alpha7-1",
"description": "Microsoft.AspNet.SpaServices",
+ "compilationOptions": {
+ "keyFile": "../../tools/Key.snk"
+ },
"authors": [
"Microsoft"
],
View
Binary file not shown.

0 comments on commit 73e218d

Please sign in to comment.