Category "asp.net-core"

Hiding Azure CDN url

Is there any way to hide the Azure CDN Url in the browser. We have developed the application using ASP.Net Core 2 with Angular 5, also is there any helper class

How to directly set response body to a file stream in ASP.NET Core middleware?

Sample code below to write a file stream to Response.Body in an ASP.NET Core middleware doesn't work (emits empty response): public Task Invoke(HttpContext con

Host ASP (.NET 6) in a Windows Service

I am currently hosting an ASP.NET (.NET 5) application in a Windows Service using WebHost and WebHostBuilder. .NET 6 introduced WebApplication and WebApplicatio

How to set json serializer settings in asp.net core 3?

json serializer settings for legacy asp.net core applications were set by adding AddMvc().AddJsonOptions(), but I don't use AddMvc() in asp.net core 3. So how c

onclick method not working in Blazor server-side razor component

I am building a sample razor component, and I can not get my button onclick method to fire. When I click the button nothing happens at all. I have even placed a

Blazor @attribute [Authorize] tag is not working

I have a working .NET Core 3.0 MVC website, using AzureAD for authentication, this all works fine. I have started to migrate some of the front-end pages to Blaz

Displaying website image testing vs. production

I am currently working on updating a .NET Core website which currently has image tags displaying from a URL like: <img src="https://page.website.com/images/

MQTTnet Connection Issue with HiveMQ Cloud

I am new to the MQTT world and I am trying to create a .Net 5.0 application that connects to a HiveMQ Cloud Broker. I have created a free broker and I am able t

split json response in Qt

I have created a Restful Web Service in ASP.NET and would like to use it in my own Qt project. I can post to and get the data from my Web Service in the SoapUi

Problem with configuring ssl certificates in asp .net core API

I have the following certificates Certificates I want to configure my asp .net core web API to use these certificates in order to use https redirection. I am us

Problem with configuring ssl certificates in asp .net core API

I have the following certificates Certificates I want to configure my asp .net core web API to use these certificates in order to use https redirection. I am us

How to access HttpContext and Request in RequireAssersion?

I'm trying to create a custom authorization policy. Let's say I want the URL to contain a token. For example: https://example.com/customer/list?token=2nHxltsDOj

Using resx resources in .NET Core 1.0

I am attempting to use a resource(.resx) file in an ASP.NET Core project. I had it working in rc1 using a namedResource, but can't seem to get it working in RTM

How to add project reference to ASP.NET Core 1.0 MVC project

I have a ASP.NET Core 1.0 MVC app in solution X and I have some common projects (.net 4.5.2 class libs) in solution Y. I want to reference the projects in solu

How to cancel .Net Core Web API request using Angular?

I have the following two applications Angular 6/7 App .Net Core Web API I am making GET request to API using Angular's HttpClient as shown below this.subscrip

Using 'UseMvc' to configure MVC is not supported while using Endpoint Routing

I had an Asp.Net core 2.2 project. Recently, I changed the version from .net core 2.2 to .net core 3.0 Preview 8. After this change I see this warning message

How to use jquery in ASP.​NET Core

I created a ASP.NET core template and wrote a jquery script. When I look at the page I see that jquery is loaded into the page, but the script doesn’t run

Why ASP Net Core 2.2 do not release memory?

I'm testing ASP Net Core 2.2 using default project made from: Visual Studio > File > New > Project > ASP NET Core Web Application > Next > Cr

How to return a specific status code and no contents from Controller?

I want the example controller below to return a status code 418 with no contents. Setting the status code is easy enough but then it seems like there is somethi

How do I solve a "view not found" exception in asp.net core mvc project

I'm trying to create a ASP.NET Core MVC test app running on OSX using VS Code. I'm getting a 'view not found' exception when accessing the default Home/index (o