Questions tagged [c#]
C# (pronounced "see sharp") is a high-level, statically typed, multi-paradigm programming language developed by Microsoft. C# code usually targets Microsoft's .NET ecosystem, which include .NET, .NET Framework, .NET MAUI, and Xamarin among others. Use this tag for questions about code written in C# or about C#'s formal specification.
10
questions with bounties
0
votes
1
answer
110
views
+100
Unable to cast object of type 'Server.Circuits.RemoteNavigationManager' to type 'WebView.Services.WebViewNavigationManager'
Trying to move Blazor Web App to Hybrid result in exception on application start:
blazor.webview.js:1
Unable to cast object of type
'Microsoft.AspNetCore.Components.Server.Circuits....
0
votes
1
answer
33
views
+50
Rebus UseSqlServerInLeaseMode Obsolete
I have some code that is using the Obsolete version of UseSqlServerInLeaseMode when adding a Rebus service to my app.
The obsolete version (below) has several parameters, all (but the last) of which ...
0
votes
1
answer
58
views
+50
How to create multiple businessobject within one businessobject in XAF?
So here is what I am trying to achieve :
I am trying to create what is called Quick Production Fiche that includes multiple items created with same fiche . Example:
LOGICALREF | NAME | MAINPRODREF ...
0
votes
2
answers
70
views
+150
System.Globalization.CultureTypes.FrameworkCultures obsolete
When I call
System.Globalization.CultureInfo.GetCultures(System.Globalization.CultureTypes.FrameworkCultures).Where(c => c.Name.EndsWith( "CH"))
I get the result:
de-CH
fr-CH
it-CH
but ...
1
vote
1
answer
95
views
+100
How to sign Excel file programmatically in c# application
I have some long-existing code that uses Microsoft.Office.Interop.Excel.Application to manipulate Excel files, and then serves those files to client browsers in response to HTTP requests. This ...
4
votes
1
answer
142
views
+50
How to perform integration test on ASP.NET Core API controller endpoint that requires authentication and validation of antiforgery tokens
Description
I have an ASP.NET Core API controller endpoint that requires:
an authenticated user, and
validation of antiforgery tokens
I want to perform an integration test on this endpoint.
Problem
...
2
votes
2
answers
114
views
+50
How to Require Authentication for Each Browser Instance with ASP.NET Core?
Our application is in ASP.NET Core (.NET 6) using a MVC architecture with an authentication model that creates an "auth" cookie. After a user logs into the application with a Browser (...
1
vote
2
answers
95
views
+50
Passing two parameters (IFormFile and a string) with JSON to C#
Versions:
ASP.NET and Web Tools - 17.10.341.11210
C# Tools - 4.10.0-3.24312.19+
JQuery - 3.3.1.js
JS - 2.8.3.js
I'm trying to pass an IFormFile and a string from a JSON file select and a string input.
...
2
votes
0
answers
3k
views
+200
how to resolve "ORA-06508: PL/SQL: could not find program unit being called" without recycle IIS application pool
I have an Oracle package that compiles successfully. However, after package change when I try to use this package, I get the error:
ORA-06508: PL/SQL: could not find program unit being called
This ...
0
votes
1
answer
85
views
+100
How do I extend or override UserManager.FindByEmail() to have it return only what I want?
My login method is below and you'll see I have to call my user again after I fetch it with _userManager.FindByEmailAsync() because there are a couple of fields Points and Tokens that are calculated as ...