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

Problems signing in with userManager.

I am using the default authentication to signup a user and it works well. But when I try to signin with that newly created account I get a failed notification thatresult.Succeeded is false.I am very...

View Article


Fixing an ambiguous refrerence

Hi, OverviewTo learn ASP.NET Core I decided to come up with a sample learning project for managing 'Tasks'.  The name of my project is 'AspNetCore1Lab' mentioned in the error below.  I created my db...

View Article


Upgrade from .Net Core 2.2 to 3.0 gives Internal Server Error for SignInManager

Hello,    So I upgraded from my MVC from .NetCore  2.2 to 3.0.  After making the required changes to the Startup.cs and Program.cs, then all the models and controllers.  I ran a build and had no...

View Article

CORS still blocking my web api calls - dotnet core 3.1

Hi,CORs keeps blocking my web api calls. I have a dotnet core 3.1 web api project which I cant access at all when debugging.My startup file looks like this  public class Startup { public...

View Article

Create Sepreate Resource Library For Localization In .Net Core

Hi, And i Want Use localization in sepreate class library but how to do itand use for other layers 

View Article


localization In .Net Core

Hi,  i use IViewLocalizer  and i have duplicate text in most views that i duplicate it in any resources file how can i set a common resources file for all view ?  

View Article

SqlException: Invalid column name 'SemesterId'. after model modified ,...

public class Subject{ public int Id {get;set;} public string Name { get; set; } public string Code { get; set; } public int Units {get;set;} public string StaId { get; set; } public string SemId{ get;...

View Article

ASP.NET 3.0 : ArgumentException: Options.ClientId must be provided (Parameter...

I have ASP.NET 3.0 Application, Below is my code When I hit breakpoint I can see my client Id is not null still it results into errorvar Test = new OpenIdConnectOptions(); Test.Authority = "XXXXXX"...

View Article


How to upload image through dot net core web api along with other data?

Hi guys,I want to add an image along with other data using dot net core web api as backend and Angular 7 as front end. Image has to go in a folder and it's path has to be stored in Sql server database....

View Article


Getting the raw Controller Route

I have this method in my controller i want to log to the db the usage so I'm using the http verb and controller route for the primary keymy method is using UpdateUsageCounter(Request.Method.ToString(),...

View Article

MQTT Authentification in Asp .Net Core 3.1

Hello can anyone advise how to implement Authentification(username and password FROM DB level) in MQTT platform, currently have few ideas in mind:1. Authenticate on every message received from client,...

View Article

User Roles and Authentication.

Currently spending my time at home building an Application in MVC ASP.Net Core for a college assignment. I've managed to get both a login and registration form working and I'm now looking at User Roles...

View Article

ASP.NET Core 3.1 : System.NotSupportedException: Unsupported expression

I am having ASP.NET Core 3.1 Application with Moq 14.3, Below is the code for reference and Error I am getting  IDictionary<object, object> Properties = new Dictionary<object, object>();...

View Article


Custom AuthorizeAttribute in ASP.Net Core which returns HttpStatusCode and...

Hi everyone,I'm porting my project from ASP.NET 4 WEB API 2 to ASP.NET Core.The problem I'm facing now is the Authorization. I don't know how to port my ApiAuthorizeAttribute to ASP.NET Core. Here is...

View Article

Image may be NSFW.
Clik here to view.

Adding a column to AspNetUserRoles table in ASP NET Core 3.0

Hello everybody,I created the tables through Migration to manage the security of my mvc core project.I would need to be able toinsert an additional field in the AspNetUserRoles table in order to manage...

View Article


how to add [Something] Above a property

HiI have a property(s) I want to but a thingy above it like [NeedThis]so[NeedThis] public stirng MyProperty {get;set;}then i need a method which gets all the properties with this.I know in entity...

View Article

Alternate Code for Discoveryresponse ASP.NET Core 3.1

I am using Identity Model 4.1.1, want to upgrade by core 2.1 code to core 3.1string document = $"{{\"endpoint\": \"{URL}\"}}"; var discResponse = new DiscoveryResponse(HttpStatusCode.OK, "", document);

View Article


How can I access the controller of _Layout.cshtml?

Recently, I have a project which needs to show the shop in the user's city in the footer of every page.In my opinion, I will get the IP of the user, and get the IP location from some third-party API....

View Article

How to a . (period) in a http bind variable

I have been working with C# MVC for while now but hadn't come across this scenario because my original project utilised database first development. I have the following:Model Class:public partial class...

View Article

Image may be NSFW.
Clik here to view.

Localization For Models in Domain Classes & VIews From ResourceLibarary

Hi, This My Solution ,now i can just define my fildes(text to translate) models,views and ....  in ShareResource.resx .how to set localization for models & Views for seprate layer (Domain Classes)...

View Article
Browsing all 9386 articles
Browse latest View live