Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Authorize("Admin")]
- public async Task<IActionResult> DeleteDItem(int? id)
- "dependencies": {
- "BundlerMinifier.Core": "2.1.258",
- "Microsoft.ApplicationInsights.AspNetCore": "1.0.0",
- "Microsoft.AspNet.Authentication.Google": "1.0.0-rc1-final",
- "Microsoft.AspNetCore.Authentication.Cookies": "1.0.0",
- "Microsoft.AspNetCore.Authentication.Facebook": "1.0.0",
- "Microsoft.AspNetCore.Authentication.Google": "1.0.0",
- "Microsoft.AspNetCore.Authorization": "1.0.0",
- "Microsoft.AspNetCore.Diagnostics": "1.0.0",
- "Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore": "1.0.0",
- "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.0.0",
- ...
- "Npgsql.EntityFrameworkCore.PostgreSQL": "1.0.0"
- public void ConfigureServices(IServiceCollection services)
- {
- services.AddAuthorization(options =>
- {
- options.AddPolicy("Admin", policy =>
- policy.RequireAuthenticatedUser());
- });
- services.AddIdentity<ApplicationUser, IdentityRole>()
- .AddEntityFrameworkStores<ApplicationDbContext>()
- .AddDefaultTokenProviders();
- }
- public void Configure(IApplicationBuilder app, IHostingEnvironment env,
- ILoggerFactory loggerFactory)
- {
- app.UseIdentity();
- }
- <sites>
- <site name="WebApplication2" id="4">
- <bindings>
- <binding protocol="http" bindingInformation="*:12619:localhost" />
- </bindings>
- </site>
- </sites>
- <sites>
- <site name="WebApplication2" id="4">
- <bindings>
- <binding protocol="http" bindingInformation="*:12619:*" />
- </bindings>
- </site>
- </sites>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement