Scopes in Microsoft.Extensions.DependencyInjection
I'm playing around with the new Microsoft DI and am trying to implement this in my project. I'm looking for examples on is how to implement a chain of 2 nested scopes from a the (shared) root...
View Article"System.IO.FileNotFoundException" in mscorlib.dll when loading standard .net...
Each time I call a method in the class library a got the above mentioned exception. "dnx.exe" (CLR v4.0.30319: DefaultDomain):...
View ArticleDependency Injection with ASP.NET 5 WebAPI and Class Libraries (.csproj)
I have a VS2015 solution in which I have a ASP.NET5 WebAPI project and three class libraries (.csProj).Class Library 1 has reference to Class library 2 and Class library 3.In class Library 2 I have...
View Article502 Bad Gateway after POST
I had a working WebAPI in beta6 and beta7. After updating to beta8, all my POST requests get this error. The POST succeeds first and records are stored in my database, but I still get this error....
View ArticleDebugging Information not displaying in output
I have an aspnet 5 project using EF7 and I'm trying to get it to display some debug logs (specifically, the queries generated by EF7). My database layer is in a seperate class library project but when...
View ArticleWeb-based tool for Locating Microsoft assemblies NuGet packages by class name
Hi,I'm recalling that one of ASP developers mentioned in some blogpost a tool, that can tell you the name of NuGet package of the newly modularized .Net if you give it a class name. Unfortunately, even...
View ArticleMVC 6 - Best way to turn my input box border red when validation occurs.
I'm using MVC6 on ASP.NET 5 Beta 8. Trying to use the new tag helpers to submit a single textbox form that captures e-mail with jquery validation.In my view I've included these scripts in the shared...
View ArticleUpload file save to database
Hi folks,I am using asp.net 5 (MVC 6) using beta 8. I am having problem with upload file and save to a database.Here is my sample code:View:<form asp-controller="Home" asp-action="Create"...
View ArticleTryValidateModel in unit tests
Hi! :)I am trying to unit test an action which invokes TryValidateModel but it throws errors all the time and I can't figure out how to make it work (after searching through the code of MVC 6). I am...
View ArticleFile name: 'Microsoft.DNX.PackageManager"">ASP.NET 5 Beta8 breaks with "System.IO.FileNotFoundException: Could not load...
When I was trying to build a application using beta8, i am getting the below error.System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.DNX.PackageManager' or one of its...
View ArticleCannotUnloadAppDomainException when starting ASP.NET 5 website
Hello! I am new in ASP.NET 5 and trying to make a website with it, but I've got several problems.I worked with .NET Clr and Entity Framework 6, but now I design to change EF to 7 and framework to...
View ArticleViewComponent and Scripts
With partial views it was not possible to register scripts in the host view's Script section without an HttpContext.Items hack.I'm wondering if it is possible to write entirely encapsulated...
View ArticleInitialize Event missing from Controller Class?
Created a base class where I am trying to add some code to get some cookie data. Wanted to use Initialize, however it appears that is no longer present in MVC6.Tried:protectedoverridevoid...
View ArticleWhere is URLEncode
How can I use URLEncode in MVC6? What do I need to add or reference? Many thanks in advance for help!
View ArticleNullReferenceException in AddJsonFile Extension method
HiI am using Microsoft.Framework.ConfigurationModel and am getting the following errorSystem.NullReferenceException Object reference not set to an instance of an object....
View ArticleUsing 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 ArticleEntityFramework.SqlServer 7.0.0-rc1-final ?
Hi,I update all to rc1.final ,and want these dependencies:"dependencies": {"Microsoft.AspNet.Mvc": "6.0.0-rc1-final","Microsoft.AspNet.Cors": "6.0.0-rc1-final","Microsoft.AspNet.Server.WebListener":...
View ArticleASP.NET 5 / MVC 6 - Loading projects from network share
When loading ASP.NET 5 web application projects from a network share in Visual Studio 2015, a project loads OK and can it can debug/run.Any changes to CSHTML, however, aren't reflected in the browser...
View ArticleHow to create a custom context object in middleware and access it in the...
If I want to build a "custom context" in a piece of middleware:public class MyCustomMiddleware { private RequestDelegate _next; public MyCustomMiddleware(RequestDelegate next) { _next = next; }//ctor...
View ArticleTag helper to highlight the active page in navbar
I've found and fixed some code that can determine whether a link in the navbar should be highlighted as the active page. It's made as an extension method for IHtmlHelper and needs to be used with the @...
View Article