Most voted ".net-core" questions
. NET Core is a general-purpose open source development platform maintained by Microsoft and the. NET community on Github. It is a cross-platform (compatible with Windows, macOS, and Linux) that can be used in device development, cloud, and Iot applications.
Learn more…160 questions
Sort by count of
-
2
votes0
answers79
viewsHow to create a custom Authorizeattribute in ASP.NET Core?
I need only a few endpoints in my API to use a different token, because they will be called by a less secure application and I don’t want that other token to have access to every application equal…
-
2
votes1
answer58
viewsMysql database coordinate persistence using Entity Framework
I’m having trouble making an efficient select for geolocation coordinates in Mysql. In the bank I am saving two values related to latitude and longitude, so when I perform the Select the two values…
-
2
votes1
answer218
viewsFormdata passing image plus object
Following this link Similar post Is it possible to pass an object together with a file via Formdata? I saw that I can do but not an object, in case I did some tests and they worked, but in this case…
.net-coreasked 5 years ago Diogo Soares 158 -
2
votes1
answer363
viewsVariable double receiving comma value in API - . Netcore
Hello, I created an API that receives two parameters from another project (requirement of college work), is the calculation of the BMI, so it receives weight and height and makes the calculation,…
-
2
votes1
answer71
viewsHtml.Beginform error with area
I have a view with the following form: @using (Html.BeginForm("Salva", "Blog", new { area = "admin" }, FormMethod.Post, false, new { id = "formCadastro" })) However, when clicking on Ubmit the url…
-
2
votes1
answer67
viewsTheninclude of a List
I have an entity called Team (image 1) which in turn has a Icollection of Userteam (image 2) which in turn has a Icollection Applicationuser called Member. Goal: return a list of Teams with their…
-
2
votes0
answers69
viewsRunning console application (C#) on another Windows machine
I am developing a console application, where I read a file . txt and perform some routines of INSERT my database. The application running on my machine works normal, but when running my . exe on…
-
1
votes0
answers153
viewsSystem.Data.Sqlclient problem while upgrading to aspnet 5 core
I updated my entire project to aspnet 5 core because I was using dnx vnext and apparently everything worked fine, but I performed tests and noticed that some values were not correct and when…
-
1
votes1
answer735
viewsMigration with possible data loss
When generating an update of db which results in possible data loss efcore shows the alert: An Operation was scaffolded that may result in the Oss of data. Please review the Migration for Accuracy.…
-
1
votes0
answers267
viewsHow to change the default folder of an ASP . NET Core application?
I am trying to set up an ASP site . NET Core, to host an Angularjs application. The structure my "index" page is using is: /wwwroot/app/index.html I tried some settings in the Startup.Cs file, like…
-
1
votes1
answer784
viewsProblems referencing a classlibrary from . net framework core - C#
I need to reference a class library . NET Core in my WPF layer which is a . NET Framework layer. However, a compilation error is made saying that it is not possible to refer to it. The error message…
-
1
votes1
answer1013
viewsGenerate ASPNET CORE MVC reports
Is there a solution to generate reports in ASPNET CORE 2.0 MVC applications without needing a reporting server? I did some searching and did not find much on the subject.
-
1
votes1
answer721
viewsConnect to database using . Net Core 2
I am studying . Net Core 2 and I am unable to make the connection to the database. My appsettings.json looks like this: "ConnectionStrings": { "DefaultConnection":…
-
1
votes1
answer1131
viewsUse Ilogger with . Net Core 2
I am studying . Net Core 2 and I have a question. I am wanting to log error in my Repository layer and only saw example in Controller. Some specific reason for this? Follows my codes:…
-
1
votes2
answers339
viewsReturn of a View List to the Controller - Asp.Net Core
I have a viewmodel called Profile, in this viewmodel there is a Itensprofile List property and a string - title. public class PerfilViewModel { [Key] [DisplayName("Código")] public int Id { get;…
-
1
votes0
answers51
viewsEntity mapping with . Net Core 2
have the following entities: public class Transacao : IEntity { [Key] public int Id { get; private set; } public int LojaId { get; set; } public virtual Loja Loja { get; set; } public int…
-
1
votes0
answers54
views"Could not parse Expression '...: The Given Arguments Did not match the expected Arguments"
I am using the Compiledqueries Feature of the framewok core 2.0 Entity but Even though it does not Give syntax error, when the program is running, I get this Exception: Could not parse Expression…
c# asp.net asp.net-core entity-framework-core .net-coreasked 6 years, 2 months ago Samuel Silva De Carvalho 11 -
1
votes1
answer86
views"Jsonresult" does not contain a constructor that accepts 0 arguments
I am trying to return a Jsonresult to my View, but it is returning the following error. "Jsonresult" does not contain a constructor that accepts 0 arguments You could help me friends ? [HttpGet]…
-
1
votes1
answer34
viewsHow to get an instance in . net core without using constructor
Normally I use the constructor to get dependencies something like: public class Test { private IServiceDependency serviceDependency; Test(IServiceDependency serviceDependency) { _serviceDependency =…
-
1
votes1
answer758
viewsIgnore files when uploading to repository
I have a . net core project in bitbucket and I use visual studio 2017 to do the operations next to the repository. The problem is that even without me having made any changes to the project, when I…
-
1
votes0
answers51
viewsHow to block part of a method to be processed only once per request with . net core
i have to increment a column in the database and this increment may depend on the situation, for example increment according to the user, I am using Jmeter to send 100 requests at the same time, but…
-
1
votes0
answers21
viewsReports in . NET CORE 3.1
I am migrating a system in the company that uses Reporting Services, which is not used in . NET CORE. The company asked me to go after Reportservice-like tools that were free and applicable on . NET…
-
1
votes0
answers119
viewsCheck if any user has logged in, and pick up the logged in user - core 2.1
Hello I need to check if there is any user authentication, and after checking if any user has authenticated to get this user’s ID. I own a Middleware that redirects the user to condominium…
-
1
votes1
answer272
viewsCheck if the user has authenticated, and get authenticated user information
I want to check if you had any user authentication, and after checking if any user authenticated to get that user’s ID. I have a Middleware that will redirect the user to condominium registration…
-
1
votes1
answer83
viewsList for logical deletion
I have a question about who’s responsible (back or front) in my case, I have a list on front which is sent to the backend save or inactivate the record: [{ idTabela: 2, codKit: "kitCopleto",…
-
1
votes2
answers248
viewsError while trying to connect to another Rabbitmq server
I am trying to send a message to another machine in my network that already has the rabbitmq installed. The following error occurs: Error message: None of the specified endpoints Were Reachable When…
-
1
votes1
answer40
viewsrefer to the logged in user’s id if missing
I’m doing a Net Core MVC point card project, in which I have user, company and employee registration. To register the company I need to get the id of the logged in user, I already have a function…
-
1
votes1
answer519
viewsRedirect Http to Https on IIS
I’m setting up a server IIS to run an application asp.net core 1.0 but the application is https and by typing www.dominio.com.br it does not redirect to the https, I have already made the following…
-
1
votes1
answer1672
viewsShow current date and time (real-time clock)
I want to display on the system screen the current/current date and time, which shows the clock incrementing seconds in real time. I’ve tried using the datetime.now (shows the date and time, however…
-
1
votes1
answer71
viewsHow to add only the Dlls needed for an (-self-contained) application?
To generate/publish an application on net-core use the command: dotnet publish -c Release --self-contained If you have configured the .csproj with <RuntimeIdentifier>, or else use this…
.net-coreasked 4 years, 11 months ago Guilherme Nascimento 98,651 -
1
votes1
answer231
viewsUpload image with Vue.js + . net core 3.0
I’m trying to upload an image, but the image always comes as null on my controller This is my Viewmodel which I receive the image: public class UpdateViewModel { [Required(ErrorMessage = "Nome é um…
-
1
votes1
answer141
viewsHow to make a Soap call on . Net Core
I am trying to consume an external service that receives an xml Soap, but always returns error 500 (Internal server error). But if I test via SOAPUI works normally. I have tested several types of…
-
1
votes1
answer219
viewsAxios + . Net Core - Post with file
I need to send the data of a form along with the Axios file and return a JSON with . netcore, I can receive the file normally in the controller but the form data cannot receive. Follows JS code…
-
1
votes1
answer216
viewsHow to consume data from an api to show on the front end using Razor pages?
I’m a beginner in development. net core and I am developing an application that consumes data from an api and shows to users, but I can’t convert JSON to OBJECT and crunch everything into a…
-
1
votes1
answer64
viewsHow do I not need to request the api all the time?
I’m a beginner in development. net core and I am developing an application that consumes data from an api and shows to users, but I need to update the site all the time and it takes a little time.…
-
1
votes1
answer31
viewsMongo BD timeout with Aspnetcore hosted on the smarterasp server
I have a web api on Asp Net Core performing reading on a non-relational basis on Mongo DB. Running the application locally with the connection pointed to the Atlas Mongo DB server works perfectly,…
-
1
votes1
answer91
viewsGenerate Token API access
Good morning, I will send a link through my system for the client to have access, until then everything is ok, however I wanted to send a token to validate, along with the link, and when the client…
-
1
votes1
answer45
views.NET Core - Class configured in container with Addsingleton() needs to be a Singleton?
A Web API application in . NET Core consumes a DLL in . NET Standard. DLL has a Foo class that depends on the Bar class: class Foo { private readonly IBar bar; public Foo(IBar bar) { this.bar = bar;…
-
0
votes1
answer641
viewsHow to generate Microsoft Excel spreadsheets in . NET Core?
I need to generate Microsoft Excel spreadsheets through .NET Core, there is some library that does this? In my research I could only find the Open XML SDK from Microsoft itself, but support for .…
-
0
votes1
answer59
viewsHow do I reference Entity Framework 6 from . Net Core Class Library?
When installing the Entity Framework by Nuget I got the following error in its reference: The dependency Entityframework 6.1.3 does not support framework . Netcoreapp, Version=v1.6 How to get around…
-
0
votes1
answer222
viewsCommand "dotnet run" too slow
When I execute the command dotnet run via the command line in my ASP.NET Core project I have to wait 8 to 10 seconds until I can access the browser to test any changes. I downloaded Visual Studio…
-
0
votes1
answer36
viewsWhat class is similar to Aescryptoserviceprovider in . NET Core?
I am migrating an application to . net core and need to use the AesCryptoServiceProvider, that worked perfectly in other versions of . NET Framework. But when using on . NET Core Visual Studio warns…
-
0
votes0
answers43
viewsHow to get application settings in static classes in Aspnet Core 1.1
In my application’s web project I have the appsettings.json: { "Foo": "Exemplo" }, And I have a class that reflects that configuration: public class FooSettings { public string Foo { get; set; } }…
-
0
votes2
answers183
viewsReference System.Configuration
I’m trying to use the System.Configuration reference to finish integrating the instances of my code with a block .txt. However, I noticed that unlike the Visual Studios present in youtube videos,…
-
0
votes1
answer1213
viewsHow to use Asp net core 2 in the visual studio 2015 community?
I installed . NET Core 2.0, but when I create a new project in Visual Studio 2015 there is no option to choose Asp net core 2.0. It can be used in VS 2015?
-
0
votes0
answers456
viewsImage storage in mongodb
I’m developing a mobile app in React where there will be several profiles, with up to 5 photos each. Our api is currently in aspnet core 2.0 and we use mongodb as a database. My question is this,…
-
0
votes1
answer220
viewsGet the value of custom attributes in aspnet-Identity . NET CORE 2.0
I’m using the Identity with aspnet core 2.0 and I needed to add the attribute nuCPF on the table Applicationuser. In the controller I am getting the user data as follows: [Controller:…
-
0
votes0
answers105
viewsHow to use EF Core with inheritance correctly and capture foreign key objects?
I’m using the Entity Framework Core, and I have a model that uses heritage. I use the TPH (Table Per Hierarchy) pattern that maps all classes of the same super class in the same table and uses a…
-
0
votes0
answers31
views -
0
votes0
answers79
viewsError in Entityframework Core installation
I’m starting an angular application with ASP.Net, and in the video I’m seeing, the instructor says we install Microsoft.Entityframework through Nuget, but I’m having this error: Severity Code…