Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [.net-6.0]

For questions about Microsoft's .NET application development framework that are specific to version 6.0+ of the framework. Use only If your question are version-specific

0 votes
1 answer
30 views

Unable to send a local image that isn't under wwwroot to openai using its new .NET library

I have an ASP.NET Core 6 Web API with the new official library from OpenAI (https://github.com/openai/openai-dotnet). What I'm trying to do, is to use a local image file to OpenAI. The file isn't ...
Moshe Az's user avatar
0 votes
0 answers
26 views

Any pitfalls in upgrading a WPF application from .Net 6 to .Net 8?

We're looking to upgrade some large WPF solutions from .Net 6 to 8, and my understanding is that the process should be straightforward (changing the projects' target framework). But are there any ...
Andrew Stephens's user avatar
0 votes
0 answers
42 views

Populate a many to one relationship and how to show data input only once but increment if the date in the input are the same

I am currently working on a web project that required user to input a group of value for each person in a department per day then display it in two other index for day and month. I'm having problems ...
Trung Đặng Đức's user avatar
-1 votes
1 answer
46 views

C# WPF Change Text Event From TextBox

i have a problem. I made a new class called "LetterBox" this class inherits from TextBox everything is working for now. But here comes the problem: I need the Event or Function that "...
Aquedus's user avatar
  • 23
0 votes
1 answer
29 views

Can't load System.Net.WebHeaderCollection

.net 6.0 project, it throw the exception can't find a dll version 6. this is the error: System.AggregateException: One or more errors occurred. (Could not load file or assembly 'System.Net....
user2282331's user avatar
0 votes
0 answers
20 views

AsyncWebserver_Teensy returns invalid status line

Problem My teensy is connected to 4 Serial devices and I use the Webserver provide access to them over a local network. I have a Raspberry Pi that is requesting data from the Webserver in multiple ...
Marius's user avatar
  • 23
0 votes
1 answer
75 views

403 from Azure only in a specific endpoint with specific version of the API

We developed a middleware service Web API app in .NET 6 with several endpoints and deployed it to Azure. We get a strange error with an endpoint that implements a POST method. If we change the version ...
oiradIta's user avatar
0 votes
3 answers
84 views

How to let HostedService run after host started?

I have a .NET 6 console app. Program.cs code: using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; using System.Threading; using ...
ahdung's user avatar
  • 379
0 votes
0 answers
33 views

In one of the cshtml files,namespaces can not be found

I am using visual studio 2022 .net 6. All the other cshtml files within the same project are not showing any issues. Only in one cshtml file, the namespaces are not able to be found. All the ...
Hchavan's user avatar
0 votes
1 answer
51 views

How to populate CreateGroupViewModel

I'm having trouble with inputting value into a ViewModel as it keep returning null after the value is inputted via cshtml. Value I input in cshtml After hitting confirm CreateViewModel.cs public ...
Trung Đặng Đức's user avatar
0 votes
0 answers
31 views

I am trying to use gRPC between .NET 6.0 as a service and .NET 4.7 as Client side. I am getting an error on the Client side it doesnt support HTTP2

I have a solution built on .NET 6.0 and I want to use its functions from another solution restricted to .NET 4.7. I am getting an error when using GRPC on the client. The first trial was on .NET 6.0 ...
Seif Elkady's user avatar
0 votes
0 answers
25 views

How to version web models and service layer in .net 6.0 API? [closed]

We recently started writing REST API in our API project and implemented API versioning using asp.versioning package. We are currently only versioning controllers and service layer. The problem is with ...
Aswin Francis's user avatar
0 votes
0 answers
62 views

Microsoft.AspNetCore.Server.Kestrel.Core vulnerability issue - fix

what is the latest version of "Microsoft.AspNetCore.Server.Kestrel.Core" in the series of 6 like Version="6. * . *" In nuget gallery it is not available any thing later than v2.2.0 ...
pingpong2020's user avatar
0 votes
0 answers
48 views

BinaryFormatter exception when trying to Get non-existing preference key in SettingsProperty in System.Configuration.ConfigurationManager

using System.Configuration; var provider = new LocalFileSettingsProvider(); var context = new SettingsContext(); var attributes = new SettingsAttributeDictionary(); var attr = new ...
Balle's user avatar
  • 67
0 votes
1 answer
84 views

How does ObservableCollection/INotifyPropertyChange work when object is changed

I have a situation where in one view model some properties on an object are updated. In another view model, I subscribe to a message and then update a collection with this new object, e.g.: ...
WSC's user avatar
  • 978
0 votes
0 answers
20 views

How to use the intelmkl.redist.win Nuget package in an .NET 6 project with Excel.DNA?

I am working on a .NET 6 project and using Excel-DNA (version 1.8.0). I want to integrate some functionality from Intel MKL. Intel provides a NuGet package for redistributing the native libraries, ...
Freakazoid's user avatar
0 votes
1 answer
37 views

How to create a custom object from a register page

I want to create a Department object that doesn't exist yet an assign it a AppUser along side a Person object then add it to database during the registration process with .net 6.0 ef identity ...
Trung Đặng Đức's user avatar
0 votes
0 answers
29 views

ASP.NET Core 6 Web API : password popup on new server

We are moving to a new Windows Server 2022 and when using Swagger, some users are experiencing a popup window asking for username and password when trying to run an operation. Others are able to run ...
Webbert's user avatar
  • 63
0 votes
1 answer
52 views

WebOptimizer cache busting not working on Azure

I am using ASP.NET Core Web Optimizer. It has cache busting feature that will append a unique string to the end of script or CSS links. A sample of the appended string is like this: ....script.js?v=...
Ashutosh Gupta's user avatar
1 vote
1 answer
40 views

How to insert a custom object into an User using foreign key

I'm currently having problem with displaying a custom object property because the program doesn't seem to insert the associated value from the table with appropriate foreign key. Here are the codes ...
Trung Đặng Đức's user avatar
1 vote
1 answer
61 views

Rebuild skip all project in Visual Studio 2022

I do not understand why Visual Studio skips all the projects to do rebuild of the solution. The output console only shows that the projects were skipped. I have tried deleting the bin, obj and .vs ...
rub's user avatar
  • 13
0 votes
1 answer
41 views

How to use razor renderer in .NET 6?

In my .NET 4.8 Web API application, I take an externally received HTML formatted string and convert it to a .cshtml file using Razor Engine, then append it to my page with JavaScript. I do this using ...
Emre Ceylan's user avatar
0 votes
2 answers
85 views

Need help to replace a switch in C#

I have a console application in .NET 6 that receives one argument, and based on that, has to decide which operation will be executed. At first, I had all the operations as static methods and ...
DevSurferPTPXO's user avatar
0 votes
2 answers
46 views

How to use Enumerable.Aggregate without getting CS0411 error

There are two DTO records: public record struct DateHour(int Hour, double? Value); private record struct HourSnapshot(uint TotalSeconds, double? Value); I have another method which works with enum. I ...
Anthony Voronkov's user avatar
0 votes
0 answers
61 views

Found multiple publish output files with the same relative path. while publising ASP.NET Core 6 project

In .NET Core 6 where when publishing with Web Deploy via Visual Studio 2022, I get the following error: Error: found multiple publish output files with the same relative path: There is no issues ...
Hemanth Reddy's user avatar
0 votes
1 answer
23 views

AppKit.NsWindow error on .NetMAC OS application after migration from Xamarin.MAC

I have Xamarin.MAC native application built with C# language. Since the Xamarin support is stopped, I have to migrate it to .Net MAC OS. But I am not seeing the AppKit.Window in the .Net MAC OS. In ...
Roshil K's user avatar
  • 2,683
1 vote
1 answer
63 views

Is it possible to use ProtectedLocalStorage without regular .NET Core?

Seems like an obvious upgrade from regular localstorage, but I've only seen it used with Blazor. I'm using ASP.NET Core 6.0 MVC. Should I just put this in my program.cs? builder.Services.AddScoped<...
andreaskev's user avatar
0 votes
0 answers
61 views

ASP.NET Core 6.0 Web API : cannot context switch to another account to start an executable

I have an ASP.NET Core 6.0 Web API that runs on IIS 7. The application pool is running under an account local to the machine but not the local system, call it 'local-system-web-account'. I am trying ...
Josh's user avatar
  • 10.5k
1 vote
1 answer
49 views

Unexpected System.BadImageFormatException: Index not found That is Fixed with Restart

I have an ASP.NET Core 6 MVC web application hosted on IIS that all of a sudden started throwing the following exception: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of ...
Sal's user avatar
  • 5,478
-1 votes
1 answer
53 views

EntityFramework pretends to have updated a row but it doesn't

I wrote an InsertOrUpdate() method which uses my EntityFramework dbcontext and I want the method to be able to receive an object and then either insert a new row or update an existing one if it exists ...
Val's user avatar
  • 1,657

15 30 50 per page
1
2 3 4 5
198