Uncompiled partial view doesn't inherit from ViewImports
I moved a part of a view into a partial view. --- _ViewImports.cshtml ``` @using AsonCore.Helpers @using AsonCore.Models @namespace AsonCore.Pages @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHe...
- Modified
- 10 Jun at 22:4
When using services.AddHttpClient, where is the HttpClient created?
I am trying to understand how `HttpClient` has been implemented for Captcha in Nop Commerce and for the sake of testability how creating new instance of `HttpClient` has been manage in Nop Commerce pr...
- Modified
- 6 Jun at 21:33
What does the [Intrinsic] attribute in C# do?
A quick Google search for "instrinsic attribute c#" only returns articles about other attributes, such as `[Serializable]`. Apparently these are called "intrinsic attributes". However, there is also...
- Modified
- 31 May at 04:44
ServiceStack: Adding Blazor support?
I have tried adding ServiceStack-references to a client-side Blazor project, but I run into problems after adding ServiceStack.HttpClient via NuGet. Currently, VS2019 will tell me that: > Cannot fin...
- Modified
- 30 May at 23:6
CheckWeb Global.asax.cs 'TemplatePagesFeature' does not contain a definition for 'TemplatesAdminRole'
``` Plugins.Add(new TemplatePagesFeature { MetadataDebugAdminRole = RoleNames.AllowAnyUser, TemplatesAdminRole = RoleNames.AllowAnon, }); ``` ...
- Modified
- 30 May at 22:35
ServiceStack: Installing 'ServiceStack.HttpClient' in a Blazor project adds hundreds of dependencies?
I am doing some testing with Blazor, and since its C# I thought I could add the ServiceStack.HttpClient to use when talking to the backend. However, when I saw that dependencies that NuGet was about t...
- Modified
- 20 Jun at 09:12
Bug with adjusting RTF in Winforms when using Windows-wide beta UTF-8 support feature
I think I've found a bug in Windows or .NET and am looking for a workaround. To reproduce the problem, first enable the Windows feature "Beta: Use Unicode UTF-8 for worldwide language support". [](...
- Modified
- 3 Jun at 00:13
How to add roles to claims in IdentityServer4?
I am new to IdentityServer and I have been struggling with this issue all day. So much so that I'm almost about to give up on this. I know this question has been asked over and over again and I have t...
- Modified
- 30 May at 18:33
await with null propagation System.NullReferenceException
I have the following code: ``` await _user?.DisposeAsync(); ``` `Visual Studio` highlights this code, saying 'Possible NullReferenceException' by the way, without `await` `Visual Studio` doesn't s...
- Modified
- 30 May at 14:52
How to add Json Formatters to MvcCore?
I'm following the next [tutorial of IdentityServer4 implementation for API][1] , but I can't call the method `AddJsonFormatters()` to `services.AddMvcCore()`. I'm currently configuring the API from an...
- Modified
- 17 Jul at 08:37
JsonConverter equivalent in using System.Text.Json
I'm starting to migrate some code I have from `Newtonsoft.Json` to `System.Text.Json` in a .net Core 3.0 app. I migrated the properties from `[JsonProperty("id")]` to `[JsonPropertyName("id")]` b...
- Modified
- 25 Nov at 23:21
How to set the Anaconda virtual environment when working with IronPython?
I want to run a python script in C# using IronPython. It works fine except IronPython is using my base Python installation instead of the Anaconda environment. I've tried running the script with a...
- Modified
- 29 May at 10:55
Asp.net core 2.2 slow upon first request
The first request takes time to hit the server API method because it pre-building the services in a start-up task can anyone suggest me to reduce the initial latency of my first request after publishe...
- Modified
- 29 May at 09:32
How to deserialize JSON to IList<KeyValuePair<string, object>> with whitespaces in key?
I have a big problem with deserializing my JSON to an object. It should be deserialized to `IList<KeyValuePair<string, object>>` the problem is that the keys have white spaces. ``` "spec": { ...
- Modified
- 29 May at 09:37
Running Powershell from .Net Core - Could not load file or assembly Microsoft.Management.Infrastructure
I have been trying to run a powershell script from a .Net Core Web app (not discussing best practices here ;) ) with the following code: ``` string command = @"& """c:\\my Folder\\myScript.ps1"""; ...
- Modified
- 6 Jun at 08:27
How to use ServiceStack's ProxyFeature when POST with URL Parameters, but empty body?
I'm working on service using ServiceStack (5.5.0) and ProxyFeature plugin. So this one (let me call it ProxyService) will work as proxy to other services. My problem comes when I'm trying to make prox...
- Modified
- 28 May at 12:46
Hide swagger bad response example model in net core 2.2
I upgrade my netcore 2.1 project to 2.2 and i have a problem with my swagger page. Previously in swagger bad response it only show "Bad Request" without the model. But after i upgraded to net core 2...
- Modified
- 28 May at 11:58
Entity Framework Core - Take(1), Single(), First()... Not Working with Oracle Provider (ORA-00933: SQL command not properly ended)
I'm using ef core(2.2.4) with oracle database oracleProvider: Oracle.EntityFrameworkCore(2.18.0-beta3) this code: ``` IQueryable<KeyInfo> queryable = context .KeyInfos ...
- Modified
- 3 Apr at 11:18
Should I dispose of X509Certificate2?
I'm using IdentityServer4 and I want to load signing certificate from file. For example, ``` var certificate = new X509Certificate2( path, password, X509KeyStorageFlags.Ephe...
- Modified
- 17 Jan at 10:2
Is there a way to turn off the DLL loading messages when running C# in vscode via vsdbg?
I am an experienced C# developer but new to C# in VSCode and on Mac. When I debug my C# console application, (which is not much more than a Hello World at this point), I am presented with with pages...
- Modified
- 28 May at 05:50
Transactionscope throwing exception this platform does not support distributed transactions while opening connection object
TransactionScope is throwing a exception in .net core 2.2 In this example I created a `scope of TransactioScop`. Opening SQL transaction for one database which is working fine. After the first transac...
- Modified
- 30 Nov at 15:11
origin 'http://localhost:4200' has been blocked by CORS policy in Angular7
I want to use of [http://5.160.2.148:8091/api/trainTicketing/city/findAll](http://5.160.2.148:8091/api/trainTicketing/city/findAll) rest for get cities in my angular project. I used version 7.2.15 of ...
- Modified
- 27 May at 15:1
Hangfire causing locks in SQL Server
We are using Hangfire 1.7.2 within our ASP.NET Web project with SQL Server 2016. We have around 150 sites on our server, with each site using Hangfire 1.7.2. We noticed that when we upgraded these sit...
- Modified
- 28 May at 09:18
EntityFrameworkCore SQLite in-memory db tables are not created
For integration tests I am using an `EntityFrameworkCore` `SQLite` in-memory db and creating its schema as per Microsoft docs, but when I attempt to seed data an exception is thrown that tables do not...
- Modified
- 31 May at 14:36
Cannot access 'variable_name' before initialization
When using reactive variables by declaring them using the `$:` syntax, you get the following error. `Cannot access 'variable_name' before initialization` Here is the code: ``` <script> import { l...
- Modified
- 7 Aug at 17:29