Skip to main content

Questions tagged [.net]

Do NOT use for questions about .NET Core - use [.net-core] instead. The .NET framework is a software framework designed mainly for the Microsoft Windows operating system. It includes an implementation of the Base Class Library, Common Language Runtime (commonly referred to as CLR), Common Type System (commonly referred to as CTS) and Dynamic Language Runtime. It supports many programming languages, including C#, VB.NET, F# and C++/CLI.

Filter by
Sorted by
Tagged with
0 votes
1 answer
15 views

Detect array type in source generator

I'm writing a source generator that processes my model classes and adds some custom serialisation code for them. The model classes can have all sorts of property types. I'm currently interested in the ...
ygoe's user avatar
  • 19.7k
0 votes
0 answers
11 views

Microsoft.Exchange.WebServices.Data.ServiceRequestException: 'The request failed. The remote server returned an error: (401) Unauthorized.' in c#

I am reading mails from Exchange server by using c# with below code i am getting an error like Microsoft.Exchange.WebServices.Data.ServiceRequestException: 'The request failed. The remote server ...
peter's user avatar
  • 8,538
0 votes
0 answers
29 views

The checkboxes that I created in listbox don't exist in the C# code

I created multiple checkboxes inside a listbox, but when I try to use these checkboxes in the C# code, it can't find them, but a checkbox outside the listbox is found normally. This is the XAML of the ...
Mostafa Sedik's user avatar
-1 votes
0 answers
17 views

Azure DevOps Self Hosted Agent Timeout | Dotnet Restore

My Azure pipeline was stuck in the dotnet restore task for about an hour and I cannot see any log as you can see in the screenshot. I am using an Ubuntu self-hosted agent. I tried to use the mshosted ...
user26363253's user avatar
0 votes
0 answers
8 views

how to use next-auth with a custom .NET backend

Basically i will create an e-commerce website i'am the front end and my friend will do the backend I want to use next-auth for that after some search i can't find something to teach how to use next-...
Yousef Saeed's user avatar
0 votes
0 answers
8 views

.NET 8 Angular and ASP.Net Core proxy config

I am working with the ASP.Net Core and Angular first time, so maybe the problem is easy to solve but I have not found a solution yet. When the solution is create with the default visual studio ...
julianuslemurrex's user avatar
0 votes
0 answers
19 views

Storing tree structures where a node can be in multiple trees

I am trying to find a way to build a model in Entity Framework to represent Courses and Lessons, where each course can have multiple Courses and lessons within it. However i also want to make it so ...
Mr_Oppenheimer's user avatar
0 votes
2 answers
37 views

How to Type cast to the base template class in c#

C# experts , Please look in to the below code and please let me know what is the best way to typecast to the parent template processor class . This doesn't work , does it require a explicit type cast ...
user1570697's user avatar
1 vote
1 answer
36 views

Detect nullable enum type in source generator

I'm writing a source generator that processes my model classes and adds some custom serialisation code for them. The model classes can have all sorts of property types. I'm currently interested in the ...
ygoe's user avatar
  • 19.7k
-3 votes
0 answers
10 views

Not able to debug a .NET Console App in Ubuntu 22 LTS

I have below json file { "version": "0.2.0", "configurations": [ { "name": ".NET Core Launch (console)", "type": "coreclr", "...
Abhishek Kumar's user avatar
0 votes
0 answers
14 views

How to encrypt my key when persisting it to my AWS management secrets?

I stored in my AWS Management Secrets my secret key to my JWT Token that i'm using for the Log in of my app. Also , i'm connecting to an IAM account where i can retrieve my secret key for the JWT ...
Misu Stefan's user avatar
2 votes
1 answer
35 views

Can anyone help me how to initialize object folders in vba

I have a problem case 1: downloadFolder = "C:\Users\ACER\AppData\Local\Temp\" If Not shellApp.Namespace(downloadFolder) Is Nothing Then MsgBox "Success" Else MsgBox &...
chens11111010001's user avatar
0 votes
0 answers
10 views

.NET MAUI Blazor Hybrid Bluetooth

I am trying to make a simple chat app using Bluetooth in .NET MAIU Blazor Hybrid, which should work for android, if possible also for windows. Is there any one to help me with this? I try a lot of ...
Ihsan Sadat's user avatar
1 vote
1 answer
25 views

.NET Core SDK/runtime 2.2 and 3.0 are now End of Life(EOL) and have been removed from all hosted agents

Updated my application to .NET 8. Getting an error in Azure pipeline. YAML looks like this steps: - task: UseDotNet@2 displayName: 'Install .NET Core runtime' inputs: packageType: &...
user2645738's user avatar
0 votes
0 answers
9 views

Authentication in SOAP header using C# and SOAP UI

I'm currently working on integrating a SOAP service into my C# application and I'm having trouble implementing authentication using SOAP headers. I just want to read the username and password from the ...
Remy Sader's user avatar
0 votes
0 answers
8 views

How to manage session state using a custom session ID in ASP.NET Web API?

I am developing an ASP.NET Web API application where I need to manage session state based on a session ID sent from an Angular application. The session ID should be created if it does not exist, and ...
Meir's user avatar
  • 61
-1 votes
0 answers
20 views

Is there anyway to use YoloV8 in winform application. Net framework 4.7?

I have a c# winform project, based on .net framework 4.7. I want to know if is there anyway to use Yolov8 in winform application (.net framework 4.7). Whenever I add the reference to my project, I get ...
payam mohammadi's user avatar
0 votes
1 answer
34 views

C# Exception Messages & Performance: is the exception message string created even if the exception is not thrown?

This might smell like micro-optimization - but in this case, I'm running a loop tens of millions of times and performance is critical (and a significant issue at the moment). In this scenario, during ...
Sean's user avatar
  • 624
0 votes
0 answers
20 views

What Machine Type does 0xEC20 indicate in a PE file?

In the Windows PE file (Portable Executable) file format, the 16-bit field right after the PE\0\0 signature of the PE header is the "Machine Type" field. Microsoft currently lists about 30 ...
hippietrail's user avatar
  • 16.7k
-2 votes
0 answers
31 views

What are the steps to package and push a .net 2.0 standard library as a nuget package in Azure DevOps build pipeline?

This is what i have so far: - job: Library pool: vmImage: ubuntu-latest steps: - task: NuGetToolInstaller@1 - task: NuGetCommand@2 inputs: command: 'restore' ...
Davia's user avatar
  • 109
0 votes
0 answers
13 views

BOOTSTRAP_ERROR [closed]

I have errors with my bootstrap, the styles are not applied, but when I forcefully empty the cache they work, but if I restart it without cache the styles are lost. Imagen con estiloimagen sin estilo ...
Adriana 's user avatar
0 votes
0 answers
6 views

Using AzureB2C Invite flow prevents EnableTokenAcquisitionToCallDownstreamApi from working. Can I use two custom policies?

I'm trying to work with AzureB2C's invite flow from their samples (https://github.com/azure-ad-b2c/samples/tree/master/policies/invite) I have setup the two custom policies B2C_1A_InvitePolicy ...
Tomas McGuinness's user avatar
0 votes
0 answers
16 views

How to integrate 'Around' logic in Dynamic Proxy Generation and conditionally call 'Before' and 'After'?

I have a project for Dynamic Proxy Generation with DLR using the following structure: ProxyGenerator.cs using System.Dynamic; using System.Linq.Expressions; using System.Runtime.InteropServices....
0 votes
0 answers
34 views

How to set debug environment variables for ASP.NET Web API project on .NET 4.8?

I am building an ASP.NET Web API project on .NET 4.8 and also deploying it to Azure. I use Environment.GetEnvironmentVariable to get variable values. In Azure, this is easy to configure because they ...
omega's user avatar
  • 42.9k
-1 votes
1 answer
70 views

C# proper (and easy) implementation for changing `using` statements?

I've recently stubled across a seemingly very simple problem I can't wrap my head around: I am currently building a simple tool to access some USB Oscilloscopes. Language Version is C#7.3 Following ...
L T's user avatar
  • 1
0 votes
1 answer
16 views

Can you force IIS Windows Security (NTLM) to request full domain username and password - not Windows Hello?

Can you force IIS Windows Security (NTLM) to request full domain username and password - not Windows Hello? Since the domain administrators have moved to Windows Hello for clients and switched from on-...
Matt's user avatar
  • 26.6k
1 vote
1 answer
16 views

How could I filter APM events on sentry for ASP.NET?

In my ASP.NET app, we are using sentry to log errors, but we want to filter all the APM messages. I was intending to filter it using the following approaches: options.SetBeforeSendTransaction((...
ThiRoss's user avatar
  • 165
0 votes
0 answers
16 views

x64 and x86 folder is missing in PublishBuildArtifact@1 in Azure CI Pipeline

The solutions contain MVC Web App in .Net Framework 4.7.1. The service layer library project and API are in .Net Core 6.0 Azure CI pipeline use windows-2019 and CI published zip artifact has x64 and ...
user3497702's user avatar
1 vote
2 answers
23 views

.NET Core 8 - Flurl not using the current user credentials for the default proxy

I am building a .NET Core 8 app that sends an HTTP request to a REST API using Flurl. When I manually set the proxy with my credentials, it works fine. However, when I don't set my credentials, the ...
Théo Uzan's user avatar
0 votes
0 answers
22 views

FIX Bitstamp logon message (MsgType = 'A') doesn't work

I'm using FIX 4.4, could anyone tell me what would be the correct FIX string to send to the Bitstamp exchange for authentication? After authentication do you receive a confirmation message from the ...
Mattia Labriola's user avatar
0 votes
0 answers
12 views

How to log directly to Grafana Loki using Serilog with OpenTelemetry

I want to log from Serilog directly to Grafana Loki (no collector) using OpenTelemetry. Logging without OpenTelemetry to grafana works: .WriteTo.GrafanaLoki("http://localhost:3100", labels: ...
user963935's user avatar
0 votes
0 answers
9 views

Nuget .NET peer dependencies

Nuget has the concept of peer dependancy, like Node and NPM (https://nodejs.org/en/blog/npm/peer-dependencies)? I have a library with dependancy from Flurl, used for HTTP requests. It produce this ...
Daniele Tentoni's user avatar
0 votes
0 answers
24 views

How to Invoke complete CLI onto the GUI Output text Box using C# (.NET Framework)

I Have done CLI invoking to my program, by these lines of codes Invoke((Action)(() => textBoxOutput.AppendText(Environment.NewLine + e.Data))) I am getting output on my GUI Output text Box, But it ...
Varun R's user avatar
-1 votes
1 answer
35 views

.NET 8 API with SQL Server: Error During Login Process

I am using .NET 8 to create an API that connects to a SQL Server. My connection string is as follows: configuration["ConnectionStrings:DBConnection"] = "Data Source=\"MYIP, MYPORT\\...
Sergio González's user avatar
1 vote
1 answer
23 views

C# TcpClient Networkstream read timeout - Recognize a String from ReadAsync (Telnet)

I am connecting to a remote Telnet Server using TcpClient and Networkstream, as long as the expected answer is delivered from the server everything works fine - however I would like to add a timeout, ...
Manuel's user avatar
  • 645
1 vote
1 answer
55 views

PadRight with length of 4 gives very long result

var value = "0".PadRight('4', '0'); Console.WriteLine(value); The result of this is 0000000000000000000000000000000000000000000000000000 in both my project and .NET Fiddle. Can someone ...
Parrotmaster's user avatar
0 votes
0 answers
14 views

OxyPlot graph not always displayed in WPF app

I have some buttons in my app, which are redirecting to view with OxyPlot graph. After updating OxyPlot version, graph doesn't appear. Only after reopening the view it becomes visible. However, this ...
Oleksa Kachmarskyi's user avatar
1 vote
2 answers
112 views

Dictionary is having duplicate keys

Can a Dictionary have duplicate keys? Or is there something else, I am missing? Here is the code Dictionary initialization is at class level. StoredPoints.Keys Count = 4 [0]: "SN6J1701_B" [...
Malik Rizwan's user avatar
0 votes
0 answers
6 views

Enterprise logging 5.0 file rename

I am new to Microsoft enterprise library logging and i am using one in my current project. I see it is creating new files on the first logging entry renaming old by adding todays time stamp. How can i ...
Ashwini Kolekar's user avatar
0 votes
0 answers
15 views

Subcribing to an event in a method called from a gRPC stream method does not work

I'm trying to understand why my code is not working in the context of a gRPC streaming method. public override async Task Stream(...) { await _myService.DoSomeSubscription(); } When calling ...
Bogdan Pătrăucean's user avatar
0 votes
0 answers
26 views

Hosting a .NET Minimal API in Azure Function

I want to integrate my minimal ASP.NET Core APIs into an Azure Function. While I can do this using the Amazon.Lambda.AspNetCoreServer.Hosting 1.7.0 package in AWS, I'm currently unable to find a way ...
user2462353's user avatar
0 votes
0 answers
33 views

Pagination on the result from multiple collection .net

I am trying to add offset pagination( input is pagesize and limit) on combined result which is aggregating multiple collections. Earlier I had only limit on the reponse. Below is the code for the API ...
Divya Vyas's user avatar
-1 votes
0 answers
16 views

How to do performance test of a windows .net application [closed]

I have to do performance testing of a windows application just to check whenever we add a data in it where it is taking time and and show the detailed reports of it. Jmeter is not helping in this as I ...
Siddharth Rawat's user avatar
0 votes
0 answers
18 views

modifying OpenAPI schema names with Microsoft.Azure.WebJobs.Extensions.OpenApi

How can I influence the generated names for OpenAPI schemas when using the NuGet package Microsoft.Azure.WebJobs.Extensions.OpenApi 1.5.1? I'm creating an Azure Function using c# and .NET 8. I've set ...
Daniel Schmid's user avatar
0 votes
1 answer
21 views

'Could not load type "System.IO.Directory" from assembly "System.Runtime, Version = 4.0.0.0"'

I am trying to create a .dll file using C# and then execute the function in Python using pythonnet. However, I am encountering the following error: System.TypeLoadException: Could not load type '...
Rodo's user avatar
  • 1
1 vote
4 answers
93 views

How to ensure a specific method is called after method chaining in C#?

I'm trying to create an API in C# that uses method chaining. I want to ensure that at the end of the chain, a specific method (e.g., Throw()) is called. If this method is not called, an exception ...
Andrey Namikaze's user avatar
3 votes
1 answer
59 views

Use of NETStandard 2.0 in NET 8.0 project, conflicts with NETStandard 2.1

I have migrated to NET 8.0 all my NET 4.6.2 projects, except one that's a VTSO Add-in project (Office). Since Web Office addins is the only option offered in NET Core and doesn't have all the features ...
Bru's user avatar
  • 59
0 votes
0 answers
12 views

Is there an accepted way to use System.IO classes on a OneDrive file?

This is a question I've been curious about for years. It's not blocking me at all; I'd just like to know the answer. I have some .NET Framework apps for personal use that want to read and write text ...
David Brooks's user avatar
-1 votes
0 answers
20 views

.NET launch profile issues on Mac with VS Code

when I entered 'dotnet build', it shows 'Build Success'. And then, if I enter 'dotnet run' there are an error message like that: The launch profile "(Default)" could not be applied. A usable ...
suyoori's user avatar
-1 votes
2 answers
50 views

Optimal Way to Filter Nested Dictionary by Property Value in C# [closed]

I would like to know if there another way to filter dictionnary public class location { public Dictionary<int, Dictionary<int, Dictionary<int, location>>> Example{ get; set; } } ...
Adoulou's user avatar
  • 35

1
2 3 4 5
6785