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

Troubles with .NET Core 1 on Linux after migration from RC1 (Error 500 for...

Hello! I'm using RC1 for few months with success in production. After migration from RC1 to .NET Core 1some clients receive 500 Error after POST request to my WEB API.Details: Ubuntu 14.04 +...

View Article


Querying JSON with dynamic

I'm using GoogleMapsApi to get the longitude and latitude information for a given address. I'm now attempting to extract those two fields from the resulting JSON string using a dynamic object. When I...

View Article


How to mock a User in .NET Core

Hi,I`m trying to mock User in ASP.NET Core as below however this can`t be done because controller.User can`t be set. How can I do this in .NET Core?var identity = new GenericIdentity(username);...

View Article

How to configure postcompile commands

I am experimenting with creating a .Net Core Project, which is a NETStandard.Library version 1.6.0.I wanted to experiment with a post build command, but I noticed now that in our project.json file,...

View Article

Custom authentication with Integration testing would not work correctly

I'm using a custom authentication middleware:public async Task Invoke(HttpContext httpContext, ICatchInfoService catchInfoService) { StringValues sessionToken;...

View Article


Error in Updating Database Migration

Trying to update the database migration (using both database-update and dotnet ef) and I get the below result.  There is no data type datetimeoffset in my database.  What can I try next to resolve...

View Article

Startup Dependency Injection when class has muliple interfaces

I have a single class that supports multiple interfaces. I'd like to instantiate the class once on a request to inject the interface. A request to inject the other interfaces should draw on the...

View Article

Dependency Injection: Selecting class to instantiate dependency when multiple...

In my .NET Core project, I have multiple classes that instantiate the same interface. When a controller requests an interface, I'd like to be able to select from among the classes that implement the...

View Article


How get the property of another class

I want to do a multipication of 2 properities from 2 difrent class modelsI tryed using Dependncy Injection but did not know  how to do it, How can I do that ?    public class Product { public int...

View Article


Error creating controller in unit test

HiI'm trying to write unit tests for a controller and I'm getting the error "Internal Error in the expression evaluator" while I'm debugging the test and when I'm creating the controllerThe error...

View Article

ASP.NET Core AJAX not working?

Hi,I am trying to implement AJAX in ASP.NET Core so I have created a new default "ASP.NET Core Web Application (.NET Core) with "Individual User Accounts". I added "Microsoft.jQuery.Unobtrusive.Ajax":...

View Article

Error in migration from ASP.NET 5 RC1 to ASP.NET Core 1.0

I am getting lots of error after trying to migrate from ASP.NET 5 RC1 to ASP.NET Core 1.0 like belowThe dependency Microsoft.AspNetCore.Html.Abstractions 1.0.0 in project does not support framework...

View Article

asp.net core how to get current user from web API

.I wan to get current user from Web API port, but this.HttpContext.User is null in the API controller.

View Article


Example Active Directory OnPremise NET Core

Hello Guys,I´m searching how can I search one user on Ldap using NET Core.I used to System.DirectoryServices, but I can´t anymore.Any ideia?Thanks a lotAlisson Xavier

View Article

Model Validation->all rules executed

Hi,I am wondering if it is possible to make certain validation rules get executed in order but if one fails (error) then the next one not get executed.For example:public class MyViewModel {...

View Article


ASP.NET Core and Scaffold-DbContext

Is there any way to get Scaffold-DbContext to reverse engineer a SQL view (as opposed to a table)?  I tried to force it with the -Tables parameter, but it didn't seem to work.  It created the Context...

View Article

getting IHostingEnvironment in a static class 1.0

is there a way to get IHostingEnvironment in a static class? you cannot dependency inject into a static class or even in an extension method. so i want to know how to obtain the correct application...

View Article


GETSDKTOOLINGINFO : error : The project is configured to use .NET Core SDK...

Hi,I'm having following error"GETSDKTOOLINGINFO : error : The project is configured to use .NET Core SDK version 1.0.0-preview2-003121 which is not installed or cannot be found. These components are...

View Article

ASP.Net Core and MySql

Tell me how to use ASP.Net Core and MySql? It is advisable to use Dapper

View Article

when will asp.net core support MySql

When will asp.net core support MySql, i need to run my Web on linux Server, I am always looking forward to that

View Article
Browsing all 9386 articles
Browse latest View live


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