Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

asp.net-core

How should I inject a DbContext instance into an IHostedService?

September 3, 2022 by Magenaut

Cannot consume scoped service ‘Microsoft.EntityFrameworkCore.DbContextOptions’ from singleton ‘Microsoft.Extensions.Hosting.IHostedService’.

Categories ASP.NET, Q&A Tags .net, .net-core, asp.net, asp.net-core, c# Leave a comment

What is the equivalent of Server.MapPath in ASP.NET Core?

September 3, 2022 by Magenaut

I have this line in some code I want to copy into my controller, but the compiler complains that

Categories ASP.NET, Q&A Tags asp.net, asp.net-core, asp.net-core-mvc, asp.net-mvc Leave a comment

Parse and modify a query string in .NET Core

September 2, 2022 by Magenaut

I am given an absolute URI that contains a query string. I’m looking to safely append a value to the query string, and change an existing parameter.

Categories ASP.NET, Q&A Tags asp.net, asp.net-core, c# Leave a comment

Custom Authentication in ASP.Net-Core

September 2, 2022 by Magenaut

I am working on a web app that needs to integrate with an existing user database. I would still like to use the [Authorize] attributes, but I don’t want to use the Identity framework. If I did want to use the Identity framework I would add something like this in the startup.cs file:

Categories ASP.NET, Q&A Tags asp.net, asp.net-core, asp.net-core-mvc, authentication, c# Leave a comment

How do I get the kestrel web server to listen to non-localhost requests?

September 2, 2022 by Magenaut

I’ve deployed my c#, asp.net 5, mvc 6 app to a windows 2008 server. I’ve fired up dnx web and it is listening to port 5000 and works fine when accessing from local computer.

Categories ASP.NET, Q&A Tags asp.net, asp.net-core, c#, dnx, kestrel-http-server Leave a comment

The specified CGI application encountered an error and the server terminated the process

September 2, 2022 by Magenaut

I am hosting a asp.net 5 application on azure, the code is complied for beta8, the application runs fine on the local environment and when i publish the code on the azure site. i get a common error “The specified CGI application encountered an error and the server terminated the process.”

Categories ASP.NET, Q&A Tags asp.net, asp.net-core, azure Leave a comment

Return PDF to the Browser using ASP.NET Core

September 2, 2022 by Magenaut

I created the Wep API in ASP.Net core to return the PDF. Here is my code:

Categories ASP.NET, Q&A Tags asp.net, asp.net-core, file Leave a comment

OAuth Authorization Service in ASP.NET Core

September 2, 2022 by Magenaut

In Web API 2, you used to be able to create an endpoint to issue a token by setting up an OAuth Authorization Server via middleware like below:

Categories ASP.NET, Q&A Tags asp.net, asp.net-core, asp.net-core-mvc, oauth Leave a comment

How to create roles in ASP.NET Core and assign them to users?

September 2, 2022 by Magenaut

I am using the ASP.NET Core default website template and have the authentication selected as “Individual User Accounts”. How can I create roles and assign it to users so that I can use the roles in a controller to filter access?

Categories ASP.NET, Q&A Tags asp.net, asp.net-core, asp.net-identity-3, asp.net-mvc, c# Leave a comment

.NET Core Identity Server 4 Authentication VS Identity Authentication

September 2, 2022 by Magenaut

I’m trying to understand the proper way to do authentication in ASP.NET Core. I’ve looked at several Resource (Most of which are out dated).

Categories ASP.NET, Q&A Tags asp.net, asp.net-core, authentication, c#, openid-connect Leave a comment
Older posts
Newer posts
← Previous Page1 … Page25 Page26 Page27 … Page47 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress