.net core console application forbidden access to https://..., a certificate...
Hi pals,I have a .net core console application and want to make a call to an API, hosted on an SSL-enabled endpoint. I have installed the certificate on my local machine, but still cannot call the api!...
View ArticleHow to customize an operation object response?
What I am trying to do here is to custom a response object for my repository/service methods internally. I am talking about something like IdentityResult. public class IdentityResult { public...
View ArticleCan't get validation message on int property
I have a model with this property:[Required] [Range(1, 3, ErrorMessage = "This question needs to be set before you continue!")] public int Question4 { get; set; }but when the user submits the form i...
View ArticleSSL redirection does not work
I've implemented the example in this article https://docs.microsoft.com/en-us/aspnet/core/security/enforcing-ssl?view=aspnetcore-2.1&tabs=visual-studioBut when I try to go to the webside I get...
View ArticleIssue WCF Web Service Asp.net core
Hi all!I used WCF Web Service Asp.net core with error, please can you help me?System.NullReferenceException: Object reference not set to an instance of an object.My code:public void GetRelationShip() {...
View Article~/connect/token is not bein called properly
Hi,My application is not being logged in. I am using the following source code.https://github.com/emonney/QuickAppand then upgraded the same source in angular 6, install angular material 6 and tried...
View Article[Razor Pages] Return partial view from code-behind?
My issue is straight-forward -- I have a list of items on my Index page. When I click the 'edit' button next to an item, a modal window needs to pop up with a partial view form where I can edit the...
View Articlehow to redirect to an action of other controller insde FileResult action
How to redirect to an action of other controller insde FileResult action, See the sample code below, If invalid user, not show the file, go to a message controller to show a message, and exit the...
View ArticleNeed to create a route that executes on return from OAuth 2.0 server
Hello,I created an Asp.Net Core 2.0 client website, running locally, that makes a call to an OAuth 2.0 server. The server returns a302 Redirect response, but the method on the client never executes.Is...
View Articlenew version something is wrong in nuget package 2.1.0 for ASP.NET Core 2.1...
Hello I have just upgraded my test project and I had got this error (when I was trying login) . Microsoft.AspNetCore.All 2.1.0 - Microsoft.VisualStudio.Web.CodeGeneration.Design - 2.1.0If I downgrade...
View ArticleWhat is the proper way of using async/await?
I apologize for the long code,this is my scenario. My application user table has one to one relationship with patient registry table. the following controller handles saving an object that contains...
View ArticleWindows Authentication for .NET Core 2 and Angular 5
My front-end is running on localhost:4200 and back-end on localhost:5000 I have setup Windows Authentication on the back-end and front-end as belowProgram.cspublic class Program { public static void...
View ArticleKeeping modelstate - Is this bad practice?
So I have a web app where I have just one view where you can create and view all the entries for, for an example a "status"I have this method to load public IActionResult Status() { StatusViewModel vm...
View ArticleProtect Web API - Best Method
HelloIs JWT over https the best way to protect the web api or there are more secured ways?The user will login using phone number and the phone number will be validated using OTP sent via SMS, only...
View ArticleIHostedServices and site IP address
With .NET Core 2.1 and ASP.NET Core, you can have multiple IHostedServices running at the same time as the WebHost.How would you determine the IP address that the WebSite is bound too from one of the...
View ArticleTransaction Scope with Dapper in .Net Core Project
Hello, I have an ASp.net Core project . Also I use Dapper as ORM in Data Access Layer . How Can I Implement Transaction Scope in .net Core ? Thanks, Ibrahim
View ArticleBest Practices on WebApi Localization
Hello:I have a Visual Studio solution with ASPNetCore API and .Net Standard Libraries.In .Net Standard Libraries I have some view model classes to use on server and client side (WPF Application).I'm...
View ArticleDependency injection in Xunit project
Hello,I am working on an ASP.Net Core MVC Web application.My Solution contains 2 projects: One for the application and a second project, dedicated to unit tests.I have added a reference to application...
View ArticleSeparate project for asp.net core tests
I am working on an asp.net core mvc application.I have created 2 projects in the same solution:My web application. An Xunit Test project I have read this is a good practice to put tests in a separate...
View ArticleHow to queue method execution in asp.net core
I created messenger which uses AT commands and GSM modem to communicate but if many users send and receive messages at one time then AT commands will overlap and that will cause a lot of problems so I...
View Article