Quantcast
Channel: ASP.NET Core
Browsing all 9386 articles
Browse latest View live

AccessDeniedPath in CookieAuthentication Middleware

I have options configured as so:  options.LoginPath = new PathString("/Account/Login");  options.LogoutPath = new PathString("/Account/Logout");  options.AccessDeniedPath = new...

View Article


Problem with ASP.NET in VS Community edition

Hi allI seem to have a problem developing ASP.NET MVC in VS community edition. When I create my models etc under wwwroot folder they are not referenced correctly. I also can't go to them via F12. It is...

View Article


Connecting my Visual studio MVC 6 database project to my database in Azure

Hi there,I have searched for this and thus far have found precious little on how I get my MVC 6 project with EF7 that I created with VS 2015 and connected to localdb/MSSQLLocalDB to be published on...

View Article

downloading ASP.NET 5 runtime and tooling for offline installation

Hi,How can I get the installation files this link:https://go.microsoft.com/fwlink/?LinkId=627627downloads and installs on VS2015?This link is from the site Installing ASP.NET 5 On...

View Article

Migration Tables

Tables are being built successfully in the Migrations folder and on database update command but aren't showing up in SQL Server database. Is there a way I can see why this is happening?

View Article


ASP.NET 5 Vnext Image Proccessing

Hello friendsHow can i make image proccesing in ASP.NET 5 vNext. I want image resize and also crop. 

View Article

Can I build ASP.NET Core web application using Microsoft Dotnet CLI?

<div class="post-text" itemprop="text">I have gone through some websites and found that .NET Core is using .NET CLI (.NET Command Line Interface). I have create a console application using .NET...

View Article

The frameworks section of the project.json is confusing me and causing...

First: What are, or what are the differences between net451, dotnet54, dnx451,  dnxcore50, I think I also saw dotnet5.4. Compared to previous versions of .NET this part is making no sense to me.Second:...

View Article


Using RoleManager in ASP.NET 5/MVC 6 ?

Hi, I want to create a new Role, "Administrator", in my ASP.NET 5/MVC6 project, but I don't know how to register the RoleManager<T> into the Dependency Injection container.In my controller I've...

View Article


Rendering view from database (cshtml template) using MVC 6

In mvc 5 it was possible to create views at runtime (see code below).I used it to store the cshtml in a database -or- just in code. How do I implement this in MVC 6?Stephanpublic static class...

View Article

How to post data to entity framework database tabel?

HelloI need some help post data to two tabels using entity framework. To explain this best as possible, I have two tabels (Booking and Passenger)The Booking tabel has been created based on the current...

View Article

how to do identity based authorization in asp.net5 (vnext)

I have 2 pages in my application - Login and Books Listing (for a moment books data is already entered into database). What I want to do is adding a claim after successful login and  I should we able...

View Article

Save cookie from controller

I need to save a cookie from the controller. In prior MVC versions this was done withResponse.Cookies.Add(new HttpCookie("CookieName", "Cookie text);I see that Response.Cookies.Add is now...

View Article


Separate Admin Web Application

I am trying to build an Admin section as a web application separate from my main web application. Do I keep the Startup.cs file the same but drop the Main call? And how would I set up the routing so...

View Article

Render just partial view on list item click

Hello!I have more partial views on the page. One contains the list of music(stored on Azure Storage) and an other the media player. I want to load just the media player partial view by clicking on an...

View Article


Lower case urls

In MVC 5 you can enable lower case urls by setting RouteTable.Routes.LowercaseUrls = true;and enable trailing slash using RouteTable.Routes.AppendTrailingSlash = true;is this possible in MVC 6?

View Article

External Login - 500 Internal Server Error

Hello!I've added external authentication (https://docs.asp.net/en/latest/security/authentication/sociallogins.html). When I run the application on the local server I have no problem with it. But when I...

View Article


RenderSection within an html attribute

We are using RC1 and I would like to render a section within an html attribute - this is in a Razor file<meta name="description" content="@(RenderSection("meta_content_description", true))">The...

View Article

ASP.NET 5 Please help - many-to-many relatnionship

Hi!In ASP.NET you still cannot migrate many-to-many relationship. So I created a join class link. I have an ApplicationUser class, a CloudMusic and the UserCloudMusic join class. I cannot collect the...

View Article

Custom authorization policy for controller in ASP.NET 5

Hi,I'm struggling a bit with the custom authorization policy described here: https://docs.asp.net/en/latest/security/authorization/policies.htmlWhat I don't understand is the following:Using VS2015,...

View Article
Browsing all 9386 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>