tagged [.net]

How can I list all of the configuration sources or properties in ASP.NET Core?

How can I list all of the configuration sources or properties in ASP.NET Core? I want to ensure that a particular configuration property is being read from a configuration source. I was going to print...

28 Jun at 16:36

How to set .NET Core in #if statement for compilation

How to set .NET Core in #if statement for compilation I created a multi-targeted framework project. I use something like this: But I can't find a wildcard for .NET Core. I tried: But it is not valid s...

What are the difference using app.Run and app.UseEndpoints in ASP.NET Core?

What are the difference using app.Run and app.UseEndpoints in ASP.NET Core? I'm using ASP.NET Core and am trying to work out the difference between `app.Run()` and `app.UseEndpoints()`. Are there some...

How can I check if a user is in any one of a few different roles with MVC4 Simple membership?

How can I check if a user is in any one of a few different roles with MVC4 Simple membership? I understand that a good way to check if an user is in a role is: However How can I check if my user is in...

Localization in external class libraries in ASP.NET Core

Localization in external class libraries in ASP.NET Core I have two projects: - - How can I add localization with `IStringLocalizer` to ? Where must be `.resx` files located?

How to fix obsolete ILoggerFactory methods?

How to fix obsolete ILoggerFactory methods? I upgraded my project to .NET Core 2.2.x and got an obsolete warning regarding the following code - both lines: The suggest

Migrate existing Microsoft.AspNet.Identity DB (EF 6) to Microsoft.AspNetCore.Identity (EF Core)

Migrate existing Microsoft.AspNet.Identity DB (EF 6) to Microsoft.AspNetCore.Identity (EF Core) I am working on an application (APS.net MVC) which uses . Now I want to revamp my application to APS.net...

ASP.NET MVC - Getting QueryString values

ASP.NET MVC - Getting QueryString values Under ASP.NET MVC are you supposed to pick up QueryString params the same way you do in ASP.NET WebForms? or does the `[AcceptVerbs(HttpVerbs.Get)]` declaratio...

15 May at 13:51

When using Trusted_Connection=true and SQL Server authentication, will this affect performance?

When using Trusted_Connection=true and SQL Server authentication, will this affect performance? If a connection string specifies `Trusted_Connection=true` with SQL Server authentication mode, will per...

.net Core Quartz Dependency Injection

.net Core Quartz Dependency Injection How can I configure Quartz in core to use dependency injection? I using standard .net core Dependency mechanism. In constructor of class that implements , I need ...

What is .AspNetCore.Antiforgery.xxxxxxx cookie in .Net Core?

What is .AspNetCore.Antiforgery.xxxxxxx cookie in .Net Core? I was trying to use ValidateAntiForgeryToken in .Net Core but I was getting .AspNetCore.Antiforgery.xxxxxxx cookie is missing. What is this...

What is a CLR class?

What is a CLR class? I googled CLR and found out what it is from wikipedia, but I wanted to know what a CLR class or more specifically a CLR entity type is (especially in ASP.NET).

23 Feb at 07:31

Get all role names in ASP.NET MVC5 Identity system

Get all role names in ASP.NET MVC5 Identity system MVC5 uses a new Identity System. How can I get all role names? I try do access it via `IdentityStore` but without success.

How to get absolute path in ASP.Net Core alternative way for Server.MapPath

How to get absolute path in ASP.Net Core alternative way for Server.MapPath How to get absolute path in ASP net core alternative way for `Server.MapPath` I have tried to use `IHostingEnvironment` but ...

How can I know if a non-required RenderSection exists?

How can I know if a non-required RenderSection exists? Is there any way to know in the `Omitted code` part if the RenderSection `Sidebar` exists or not?

How do I access HttpContext.Current in Task.Factory.StartNew?

How do I access HttpContext.Current in Task.Factory.StartNew? I want to access HttpContext.Current in my asp.net application within How can I fix this error?

19 May at 05:3

Change Layout(Master Page) of view in ASP.NET MVC without recreate it

Change Layout(Master Page) of view in ASP.NET MVC without recreate it I'm using ASP.NET MVC 3 with Razor views. When you want to create a view you can choose a layout (master page) for your view, or l...

Email Confirmation with MVC 5 and Asp.net Identity

Email Confirmation with MVC 5 and Asp.net Identity I have been searching, but have not found any documentation on how to implement Email confirmation with MVC 5 using the new ASP.net Identity. There d...

ASP.NET Identity: get all users in a role

ASP.NET Identity: get all users in a role How to obtain a list of all users in a role? Before it was possible with Roles.GetUsersInRole, but with new Identity I can't find anything like this.

c# contains case insensitive search

c# contains case insensitive search I have the following code How do I made the where clause case insensitive?

13 Apr at 07:44

How to get object using Httpclient with response Ok in Web Api

How to get object using Httpclient with response Ok in Web Api my web api like I am using HTTPClient to request web api as mentioned below. ``` var client = new HttpClient(); string json = JsonConvert...

Allow anonymouos access to healthcheck endpoint when authentication fallback policy is set in ASP.NET Core 3

Allow anonymouos access to healthcheck endpoint when authentication fallback policy is set in ASP.NET Core 3 asp.net core 3 allows to set to make the endpoints secure by default: ``` services.AddAutho...

How to set ID and Text in html.label helper in mvc2

How to set ID and Text in html.label helper in mvc2 I want to set ID and Text attribute in html.label helper in mvc2 Plz help me out..

28 Aug at 07:25

Exception using System.IdentityModel.Tokens.Jwt 5.0.0.127 in Web Api 2 built on .Net 4.6

Exception using System.IdentityModel.Tokens.Jwt 5.0.0.127 in Web Api 2 built on .Net 4.6 I have updated my existing Web Api project to use the latest System.IdenityModel.Tokens.Jwt package and I am ge...

How to get the database context in a controller

How to get the database context in a controller I am trying all day to figure out to get the `ApplicationDbContext` in the `ManageController.cs` of a default MVC 6 project. I went online and Googled a...