Async with Data Access Classes
Hello everyone and thanks for the help in advance. I have a Core 3.1 web application using EF Core for DB access. I want to create an insert class that receives a set of parameters that in turn...
View Articlehow to inject service to custom modelbinder as a dependency
I have a generic custom ModelBinder class that has a reference to a HTMLSanitizer service to sanitise the string values. I want to use this service as a dependency instaed of tightly coupling with my...
View ArticleTrying to upload an image but get error: DirectoryNotFoundException: Could...
I have a method that is supposed to upload images to a directory in wwwroot. But i get the following error:DirectoryNotFoundException: Could not find a part of the path...
View ArticleForgot Password Email
Hello all,I am having problems sending an email when a user has forgotten their password.After entering their email address and clicking on the submit button their are redirected to the...
View ArticleA quick oauth2 openid connect question
Hii have an spa where no user is logged in but needs to be authorised.Does that mean i have to use oauth2, or can i use openid connect with no user.since i won't have a subject i think it has to be...
View ArticleUnable to access the navigation property of a newly created object
I am working on an asp.net core MVC framework + entity framework. where i got those model classes:-public partial class Submission { public Submission() { SubmissionQuestionSubmission = new...
View ArticleSeverity Code Description Project File Line Suppression State Error Can't...
If you get this error when attempting to run a debug session or build within Visual Studio 2019 using ASP.NET Core 3.1, then run the following command:Run powershell as Administrator:and runnpm...
View ArticleCan not add New Controller in asp.net core Application
Hi,I have an asp.net core web application and it was working fine.suddenly it is not working fine.if I try to add a controller there is an errorthere was an error running the selected code...
View ArticleError In Upload Large File
Hi, i upload a file (200 mb) but during upload show this message in chrome console and upload stop it,Failed to load resource: net::ERR_CONNECTION_RESET and set session for 1 day options.IdleTimeout...
View ArticleWhy should I publish an ASP.Net Core project to deploy on Linux server?
I have a completed project created by ASP.Net Core 3.1 on my PC using VS 2019 on windows. Let's call it "Source Project". and I can publish it to a folder while target framework is .NetCore-3.1 and...
View ArticleCore 2.0, RestApi and WebService
when i do a test request on my pc (win10), the json key's must match the field in my request class (whether is start with small or capital letter).this isn't a problem when i upload it to a server :...
View ArticleCan I ask identity to login by email or phonenumber?
var result = await _signInManager.PasswordSignInAsync(UserName, Password, RememberMe, lockoutOnFailure: false);I want to pass in the phonenumber in the username parameter
View ArticleUse Resources File(.resx) In Jquery Or Javascript In Asp.net Core
Hi,i have website with 3 language i must show message for any language like this : if (lang == "en") { alert("update data successfully"); } else if (lang == "fa") { alert("اطلاعات با موفقیت ویرایش...
View ArticleRedirect in Razor pages with custom PageRouteModel
Hello, I made a custom convention for my razor pages so that the url of every pages looks like : https://localhost/somekey/Index instead of https://localhost/IndexBecause of that, I can't make links...
View Articlehow can I integrate flippdf into the html page
Is there anyone having experience with the project in asp.net core , integrating flip-pdf to create the magazine. Please can you advise me how we can integrate the flip-pdf in to the html please help
View Articlepopulate dropdown on view from another model
I have a view that I need to display a drop down. The data will come from a different model that what the view is using. How can I display that data in my drop down from that model? view:@model...
View ArticleSingleOrDefaultAsync + Result Vs SingleOrDefault
Inside my asp.net core MVC 3.1; Is there any differences between using using SingleOrDefaultAsync + Result, as follow:-var result = _context.Settings.SingleOrDefaultAsync(a => a.Name.ToLower() ==...
View ArticleDecryption Issue - CryptographicException: The length of the data to decrypt...
Hello, I am running into an issue while decrypting a string. I get a SAML assertion and i pull the cipher data and store it in a string variable. Using my private key i need to decrypt the message....
View ArticleProvided token was meant for different claims-based user. 400 bad request...
I tried to create a defense against CSRF attacks based on Microsoft's tutorial. Since I have a Web API project, I use JWT authentication, dividing the level of user access based on their role. This...
View ArticleAsync with Data Access Classes
Hello everyone and thanks for the help in advance. I have a Core 3.1 web application using EF Core for DB access. I want to create an insert class that receives a set of parameters that in turn...
View Article