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
-
0
votes0
answers31
viewsSession is null and void
I’m trying to set up a session, but it always gets null, look: public class AutenticacaoModel : PageModelBase { public void OnGet() { HttpContext.Session.SetString("Teste", "Quero ver esse valor");…
-
0
votes1
answer2633
viewsC# - Get Connectionstring from Appsettings.Json of a dotnet Core MVC application from a Data Access Library
I have an application in . Net Core MVC and I do the data access part using a Dll. How to configure a Connection String according to what was configured in my appSettings.Json of the Netcore MVC…
c# asp.net-core .net-core connectionstring configurationmanagerasked 5 years, 6 months ago Arthur Gresele 1 -
0
votes0
answers743
viewsWEB API 2 works on the localhost but not on the server
I’m starting with .NET Web Api 2 using .Net Core. In the Postman when I make the request on the localhost of my Webapi machine returns me a status 200 ok, but when I do on the server with the same…
-
0
votes0
answers49
viewsMap a Json to a Viewmodel via Automapper
I own the following Json (I’m betting just a piece of it). { "filters": {}, "competition": { "id": 2021, "area": { "id": 2072, "name": "England" }, "name": "Premier League", "code": "PL", "plan":…
-
0
votes1
answer71
viewsEntity Framework Core 2 - Recursive research into many-to-many relationships
I made a many-to-many relationship using EF Core 2, Code First method. Second seen at that link, it is necessary to create a Join entity: public class ClienteModel { public int ClienteId { get; set;…
entity-framework asp.net-core entity-framework-core .net-coreasked 6 years, 3 months ago Matheus Oliveira 51 -
0
votes0
answers108
viewsTwo Viewmodels in one View
I have a problem, let’s explain: I have a page called Index where I re-address all the clientes from my database in a table, in this table there is a delete button that opens a Modal de Confirmação…
-
0
votes0
answers22
viewsWhat are the positive and negative effects for command timeout 0 on string postgres connectivion?
Hello, I was constantly getting this mistake Response/Exception: An exception has been raised that is likely due to a transient failure. - System.TimeoutException: The operation has timed out. Then…
c# postgresql asp.net-core .net-core entity-framework-coreasked 4 years, 4 months ago Iago Soares 1 -
0
votes0
answers16
viewsClickonce for Dotnetcore
Good morning. We have a Console Application project in Dotnetcore 3.0. We need to generate an installer along the lines of Dotnetframework’s Clickonce. In addition to generating the installer, it…
-
0
votes0
answers58
viewsUpdate of Telephone Array in the database
I’m trying to update information in my database where I have 1:N amid Clientes and Telefones, but I am not able to perform such update, because sometimes it will be necessary to remove a phone that…
-
0
votes1
answer77
viewsreturning blank autocomplete
I do a search in my database to find the name of the products without exceptions (I don’t know if it’s relevant, but this return is a string list) var listaDosProdutos =…
-
0
votes0
answers112
viewsHow to insert Connection String in a console project in . NET CORE 3.1
appsettings.json in . NET CORE 3.1 no longer exists, has been integrated into . csproj. I would like to know how to configure my Connection string, the console project in . net core 3.1 is created…
-
0
votes1
answer34
viewsList of JS objects in the C# MVC Controller does not appear in the Request.Cookies
I’m putting the following Cookie: document.cookie = "Teste=" + '[{"Id":20,"Nome":"Prato Feito","Valor":12.5,"Quantidade":1,"Imagem":"/images/ImgEmpty/noImg.jpg","Descricao":"Batata Palha, Cebola,…
-
0
votes0
answers50
viewsPass datatable to storedprocedure with Dapper . net core
I have a proc with the following parameters @TabelaIdsCompras TipoTabelaIdGenerico READONLY, @TabelaIdsProds TipoTabelaIdGenerico READONLY And I have my datatables: DataTable tableIdsProd= new…
-
0
votes1
answer49
viewsHow to format number string with . net core?
I need to format this number string, which is returned from an api: As I wish: 83,951,583. Página Razor: <h3>Mundo</h3> <div class="card bg-primary text-white mb-3" style="max-width:…
-
0
votes1
answer30
viewsRegex Data Annotation no dotnet core
to consuming an external api and one of the properties has hyphen: position-number. How can I put a note so that I can receive this amount? I am trying this way: [Regularexpression(@" [a-za-Z''-'…
-
0
votes1
answer137
viewsmvc application with visual studio code, Connection Strings
I am using Visual Studio Code with the extension mssql on linux and need to get the Connection String from a database I’ve already created, but I’m not getting. The teacher of the course that I am…
-
0
votes0
answers370
viewsConfigure Startup.Cs in Asp.Net Core
Hello, I am unable to configure my Startup.Cs to run my application in . Net Core. The following error is being executed: An error occurred while Starting the application. Invalidoperationexception:…
-
0
votes1
answer33
viewsEntityframework - Error table or view does not exist
I have a table in oracle that can only be accessed this way sms."User", when mapping the entity, I did so: builder.ToTable("sms.Usuario") When running the project and seeing the log, I see that the…
-
0
votes0
answers81
viewsProblem importing a . net framework project into a . net core project
hello, I’m creating a . net core application but I need to use a . net framework project. i can import it without any error but at runtime an exception is fired. The Exception says that it was not…
-
0
votes0
answers96
viewsWin32exception: The network path was not found
I am getting the following error in my application that is hosted on aws Sqlexception: A network-Related or instance-specific error occurred while establishing a Connection to SQL Server. The server…
-
0
votes0
answers42
viewsKeep redirecting the user until he completes a specific task
I’m developing an app to manage a condo. What I need is that after the user logs in he is redirected to the condominium registration screen (caso ele não tenha nenhum condomínio cadastrado ainda)…
-
0
votes2
answers1155
viewsHow to convert dd/MM/yyyy HH:mm:ss to yyyy-MM-dd HH:mm:ss
If I try to convert the date this way in Visual Studio works, but when I deploy the API (this already published) responds error 500. string added = "10/09/2018 10:20:11"; added =…
-
0
votes1
answer141
viewsI cannot create a Windows Form using the . net core
I’m migrating my project from . net Framework pro. net core. I installed Visual Studio Community 2019 and packages from . net core (including . net core 3.0). But I cannot create a windows form with…
-
0
votes1
answer59
viewsHow to use the . Sqlquery expression of EF in Efcore?
I’m refactoring a code and I’m having that doubt. public class MovimentoManualListRepository : RepositoryBase<MovimentoManualList>, IMovimentoManualListRepository { ConsultarContext _context;…
-
0
votes1
answer152
viewsJSON Customized for Dataannotations - Asp.Net Core Web Api
Good afternoon! I have a Web API in . Net Core, where I have the following request class for a POST route: public class CreateAgentRequest { [Required] public Agent Agent { get; set; } } With…
-
0
votes0
answers40
viewsAPI in . NET Core - api does not find connection string from appsettings.json
I did all the development on a windows machine but after almost a week I was able to deploy on a Ubuntu 18.04 machine and set the settings to access via https. But now I came across the following…
-
0
votes1
answer360
viewsAppsettings.json generating with incorrect settings
Good morning! I am working on an API . Net Core 3.1. This API is divided into 3 environments, DEV, Homologation and Production. I have 4 configuration files, Appsettings.json,…
-
0
votes0
answers187
viewsError executing add-Migration . Entity Framework Core
I am using version 2.2.4 of Ef core and version 3.0.5 preview of . net core sdk The mistake is : Unable to create an object of type 'AppDbContext'. For the different patterns supported at design…
-
0
votes0
answers41
viewsUsing SDK and . NET Core Preview
When trying to Create a Project in Visual Studio(Console App[.NET Core]) returns the following error: When making the changes as requested the error persists I restarted Visual Studio several times…
.net-coreasked 4 years, 8 months ago Bernardo Manoel Machado 1 -
0
votes1
answer213
viewsError installing . NET Core on Linux Mint
When trying to install . NET Core on Linux Mint using Snap command sudo snap install dotnet-sdk --classic, at the end of the package installation, it is displayed: "dotnet-sdk 3.1.401 from Microsoft…
-
0
votes1
answer44
viewsMongodb.Drive fails to filter an Object Array with Elemmatch
I have a document in mongoDB with this training: { "_id" : NumberLong(21), "_t" : "Detail", "DeletionDate" : null, "CreationDate" : null, "UpdateDate" : null, "Accounts" : [ { "Bank" : "123",…
-
0
votes0
answers22
viewsOracle 19 User Interface Authentication using ODP.Net Core
We are developing an . Net Core 3.1 application that connects to an Oracle 19 database. During authentication with an Oracle User Enterprise we are receiving the following error: "ORA-01017: invalid…
-
0
votes0
answers21
viewsReturn xml with 406, Net Core 2.2, with Formatfilter?
I’m trying to make a comeback in mine Controller with FormatFilter .xml, but I get the 406. Controller: [HttpGet("xml/loja/{id}/{format}"), FormatFilter] [Produces("application/xml")]…
-
0
votes1
answer37
viewsASPNET Core - Error 500 when posting a method that returns a Partialview with only one object
I have a method in my controller called ListagemTarefasEmDesenvolvimento() that returns me a PartialView. However, when I call this method via ajax, the server gives me a status error 500. Below is…
-
0
votes1
answer38
viewsHow to show the data 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 don’t know how to show the data on the front end. I am using REFIT…
-
0
votes1
answer209
viewsNullreferenceexception: Object Reference not set to an instance of an Object. How to resolve?
I am developing an application that consumes data from an API and shows to users, but I am facing an exception: NullReferenceException: Object reference not set to an instance of an object. How do I…
-
0
votes1
answer105
viewsUse of unassigned local variable. How to resolve?
I’m developing a site that requests an api and shows the data to users, but I’m having problems: Use of unassigned local variable 'value' Use of unassigned local variable 'date' To better…
-
0
votes1
answer145
viewsGenerate PDF and attach to send email c#
Good afternoon guys, I have a modal, where the user can send an email, in this modal, I loaded a HTML, so that I can generate the PDF and attach to send in the email. But I’ve seen several articles…
-
0
votes1
answer85
viewsEncrypt and decrypt
I took this code here to encrypt and decrypt a Id of the type `Guid: public static string EncryptString(string text, string keyString) { var key = Encoding.UTF8.GetBytes(keyString); using (var…
-
0
votes0
answers12
viewsHow to remove extra return tags added by Soapcore?
When using Soapcore no . NET Core 3.1 to incorporate SOAP behavior in my application everything happens as expected, with the exception of the return of two extra tags that inherit the service name…
-
0
votes0
answers24
viewsEntityframework Core 5 does not connect to SQL Server 2008
I installed dotnet core 5 on Ubuntu 21.04. I created a webapi project with VS Code and managed to run everything smoothly. I installed EF5 to the project and am trying to connect to SQL Server 2008…
sql-server linux ubuntu .net-core entity-framework-5asked 3 years, 6 months ago Joandreiy Cordeiro 381 -
0
votes0
answers9
viewsProblem running video. net core
Talk Guys, it’s all right? I’m building an intranet portal in my work on. net core, and I need to add some videos that were posted on another company intranet portal. I have both the possibility of…
-
0
votes0
answers15
viewsValidation of Google User Token in the back end
I’m facing a problem and I’ve already lost hours on forums and on google certification, but I can’t find the solution. I have the following scenario: A front-end that is from a third company logs in…
-
0
votes1
answer37
viewsUse of attributes in C#
I am facing a situation where in a large part of the methods of my API I need to send a request for another API to account for calls and so invoice them. Currently this code is contained in these…
-
-1
votes2
answers2204
viewsHow to create a C# executable with . NET Core?
I’m developing an introduction material to programming using . NET Core. I have read the documentation regarding the creation and execution of projects for the web, but I haven’t found anything that…
-
-1
votes2
answers177
views -
-1
votes3
answers121
viewsDataannotations problem in string fields[]
I need help validating a field string[], because whenever I send this empty field, it returns error, even if it is in the correct format: This is the field:…
-
-1
votes1
answer36
viewsReference problem
I am studying . net-core and am trying to make a system for a hospital using standard DDD and . net-core. Just when I started creating my templates and views, I came across a reference problem when…
-
-1
votes2
answers154
viewsHow to create an "Area" in MVC in . net core 3.1?
The path to creating an Area no longer appears in . net core 3.1 Path: Project > Right Click > Add > Area
-
-1
votes1
answer30
views.NET Core MVC with jQuery Vertical Accordion Menu
I am using the jQuery vertical accordion menu from the following template: https://templatemag.com/demo/Dashio/ However, the operation does not work as in it. Clicking on a menu <li> <a…