Questions tagged as '.net-core'

0
answers

Session is null

I'm trying to set a session, but it always gets null, see: public class AutenticacaoModel : PageModelBase { public void OnGet() { HttpContext.Session.SetString("Teste", "Quero ver esse valor"); } { public class IndexModel...
asked by 28.07.2018 / 02:46
0
answers

Image storage in mongodb

I'm developing a mobile app on react where there will be multiple profiles, with up to 5 photos each. Our api currently is made in aspnet core 2.0 and we use mongodb as database. My question is the following, what is the best way to accomplish t...
asked by 31.05.2018 / 23:46
1
answer

Connect to the database using .Net Core 2

I am studying .Net Core 2 and I am not able to connect to the database. My appsettings.json looks like this: "ConnectionStrings": { "DefaultConnection": "Server=FAYOL\SQLEXPRESS;Database=Pagamento;Trusted_Connection=True;MultipleActive...
asked by 25.05.2018 / 21:19
0
answers

Generate reports in ASPNET CORE MVC

Is there any solution to generate reports in ASPNET CORE 2.0 MVC applications without needing a report server? I did some searching and did not find much on the subject.     
asked by 27.04.2018 / 14:55
0
answers

Azure 401 Error in API Asp .Net Core Publication

I published an API in Azure, but any method I try to access from the error:    {"statusCode": 401, "message": "Access denied due to missing   subscription key. Make sure to include subscription key when making   requests to an API. "} I j...
asked by 07.04.2018 / 17:52
1
answer

Get the value of custom attributes in .NET CORE 2.0 aspnet-identity

I'm using Identity with aspnet core 2.0 and I needed to add the nuCPF attribute in the ApplicationUser table. In the controller I am getting the user data as follows: [Controller: ClientController ) public ClienteController(UserMan...
asked by 22.01.2018 / 12:45
0
answers

How to get application settings in static classes in AspNet Core 1.1

In the web project of my application I have appsettings.json : { "Foo": "Exemplo" }, And I have a class that reflects this setting: public class FooSettings { public string Foo { get; set; } } In startup.cs I read and log to...
asked by 22.06.2017 / 01:36
1
answer

"dotnet run" command too slow

When I run the dotnet run command via the command line in my ASP.NET Core project I have to wait for 8 to 10 seconds until I can access the browser to test any changes. I downloaded Visual Studio 2017, I run the application quietly if I start...
asked by 02.04.2017 / 17:37
0
answers

How to use EF Core with inheritance correctly and capture foreign key objects?

I'm using the Entity Framework Core, and I have a template that uses inheritance. I use the TPH (Table Per Hierarchy) standard that maps me all classes of the same super class in the same table and uses a discriminator column to distinguish them...
asked by 10.03.2018 / 14:57
3
answers

DataAnnotations problem in string [] fields

I need an help to validate a string[] field, since whenever I send this empty field, it returns error, even though it is in the correct format: The field is this: [RegularExpression(@"^(([A-Za-z0-9]+_+)|([A-Za-z0-9]+\-+)|([A-Za-z...
asked by 19.09.2018 / 21:19