Questions tagged [.net-4.8]

For questions specific to the usage and features of version 4.8 of Microsoft's .Net framework.

Filter by
Sorted by
Tagged with
0 votes
0 answers
35 views

How to pin an app to the start menu Win 11

I would like to pin an app to the Win 11 Start Menu in a C# program. Having searched on StackOverflow I found this (How to create start menu shortcut) which worked in that it created a shortcut in the ...
Mike Gibbs's user avatar
2 votes
1 answer
55 views

Authentication Issue: .NET Core 6 and .NET Framework 4.8 Applications Sharing Common AspNet Identity Tables

I have two applications: one targeting .NET Core 6, and the other targeting .NET Framework 4.8. Both applications share a common SQL database with ASP.NET Identity tables. However, the application ...
Darshan Faldu's user avatar
0 votes
2 answers
57 views

.Net 4.8 is not automatically working with TLS1.2 Azure storage

I have an old C# win forms project (.Net 4) working with azure storage. I recently updated the project to .Net 4.8 (Visual Studio 2015...) and the azure storage to V2 using TLS1.2. Unfortunately I ...
becky's user avatar
  • 307
0 votes
1 answer
57 views

No relevant source lines - Source file could not be opened ('Unspecified error ')

I am running a 32-bit ASP.NET application using .NET Framework 4.8. I am getting the following error when starting the application: error CS1504: Source file 'c:\Windows\Microsoft.NET\Framework\v4.0....
balti's user avatar
  • 25
1 vote
0 answers
15 views

SignalR - replacing the default implementations for IGroupManager and IHubConnectionContext

We have a single-tenant .net 4.8 SignalR app which we should rewrite to be multitenant. The app has a hundreds of hubs. In order to make it multitenant, we have to change all the group names that we ...
tananas's user avatar
  • 43
0 votes
1 answer
70 views

Why is the .NET Framework 4.8.1 Runtime Offline Installer significantly smaller than the 4.8.0 release?

I downloaded the .NET Framework 4.8 and 4.8.1 Runtime Offline installers from the links below. It seems strange that 4.8.1 is significantly smaller (by 44 Megabytes). .Net Framework 4.8.1 = 77 Mbs ....
LT Dan's user avatar
  • 269
-2 votes
0 answers
19 views

Workflow Foundation properties show red squigglies in VS2022

I am an absolute beginner with Workflow Foundation 4 and am trying a simple "Hello World" example for the first time (from a book) that generates strange behavior. Here's what I've done in ...
LKeene's user avatar
  • 633
0 votes
1 answer
57 views

Log retries in Azure.Storage.Blob

I want to update a very old C# WinForms project which uses Microsoft.WindowsAzure.Storage library to use the "newest" possible Azure storage library Azure.Storage. I'm using .Net Framework 4....
becky's user avatar
  • 307
0 votes
0 answers
17 views

What are the steps for Samsung Pay integration with Cybersource on Web?

As per the documentation on the Samsung Pay Developer site, the integration for the Samsung Pay SDK is for Android but can be done on a web framework i.e. Angular in my case. Samsung Pay web payment ...
Arhum Junaid's user avatar
0 votes
2 answers
39 views

How WCF binary formating works?

I have some client and server that communicates via WCF services. I need to create "proxy" between them to filtrate responses. I've managed to create small .NET 8.0 application that accepts ...
sergei anisimov's user avatar
1 vote
0 answers
100 views

How to optimize list of long running operations in C# (parallelism) (.NET 4.8) [closed]

I have a long list of data that needs to be processed. var dataList = getData(); // list of > 5000 items foreach (var data in dataList) { // this takes about 1.5 seconds await ...
thomas's user avatar
  • 1,427
0 votes
1 answer
63 views

VS 2022 keep refering to old code of class library even after changing code

I have a solution with multiple projects inside. The first is a class library, the others are the console application and a unit test project. The problem is the first time I ran the console app or ...
supnep's user avatar
  • 49
0 votes
0 answers
22 views

ASP.NET Web API : iterating over sections of multipart/form-data

ASP.NET Core has a library class for iterating multi-part forms MultipartReader. I would like to iterate multi-part forms in an older ASP.NET Web API (.NET 4.8) in a similar fashion. There is ...
JHJ's user avatar
  • 313
0 votes
0 answers
13 views

Visual Studio 2022 + .NET Upgrade Assistant - Cant Import Controls After Conversion From .NET Framework

We are in the process of trying to salvage an old package for current use in a WinForms application being converted from .NET Framework to .NET 6+ using the .NET Upgrade Assistant This package was an ...
Dray's user avatar
  • 1
2 votes
1 answer
69 views

Autofac - dynamic instantiation: passing constructor manually

I use dynamic instantiation in AutoFac: public class X: I_X { public X(String p1, String p2) { ... } } public class A: I_A { public A(Func<String, ...
Duke's user avatar
  • 43
0 votes
0 answers
14 views

How does one retrieve the extended properties of a file such as the Subject/Author in .Net framework 4.8?

I am trying to locate my msi from the windows cache location and have tried the below... private static string LocateMyMsi() { var msiCacheDir = $@"{Environment.GetFolderPath(Environment....
lee23's user avatar
  • 419
0 votes
1 answer
21 views

Resolving Microsoft Logger with Unity throws error

I am using .NET 4.8. and I registered Microsoft.Logger with unity injection: var factory = new LoggerFactory(); factory.AddLog4Net("log4net.config"); container.RegisterInstance<...
pakerinjo's user avatar
0 votes
1 answer
78 views

Azure DevOps build pipeline for ASP NET Core WebService project (.NET 6 + .NET Framework 4.8)

I have the task to configure Azure DevOps build pipeline for ASP NET project. It is a legacy solution using WCF and WPF with many projects inside it. The Service layer and the Repository layer + most ...
MiroslavDinev's user avatar
0 votes
1 answer
82 views

DropDown greyed out in Visual Studio Windows Forms (.Net Framework 4.8)

I'm building a program in Windows Forms C#, in which you can choose between different options, and a DropDown component would be the perfect option, however for some reason it's greyed out and it ...
EdBloodedge's user avatar
0 votes
1 answer
85 views

.Net Standard Library With Nuget Packages Used in .Net Framework Project

I'm currently working with two projects: a .NET Standard 2.0 class library and a .NET Framework 4.6.2 console application. In my .NET Standard library, I'm using the System.Diagnostics.EventLog ...
Sahin's user avatar
  • 1,151
0 votes
1 answer
31 views

Below is a code to determine which process launched the application. This code works only 10% of the time. Remaining 90%, GDI+ Access Violation Error

private string parentProcessName() { var processId = Process.GetCurrentProcess().Id; var queryFromId = string.Format("SELECT ParentProcessId FROM Win32_Process WHERE ProcessId = {0}",...
VerpinZal's user avatar
  • 103
0 votes
1 answer
135 views

I have a deadlock between 2 threads, and I am really not sure why there's a deadlock

All, Software/Tech: Winforms application on .net framework 4.8 Build Configuration: Debug Build Synchronization construct used where deadlock occurs: Monitor using a privately scoped object to the ...
ActiveX's user avatar
  • 1,071
0 votes
0 answers
36 views

How to return status code 200 instead of 403 the default URL of my asp net framework application

In a net core application I can use the MapGet to return status code 200 and a message. example: public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IHostApplicationLifetime ...
CHARIS MEGALOS's user avatar
0 votes
0 answers
48 views

Unexpected error when refencing an F# project from a C# project

The following 3 .net projects P2.fsproj <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>net4.8</TargetFramework> <...
Franco Tiveron's user avatar
0 votes
0 answers
22 views

HttpSessionStateBase Session in ASP.NET MVC is null when accessing site from an iframe

I am setting a few variables up when the page loads. Example: UserId. I then access this data later by using Session["UserId"] and this works when I load the page by itself. However, when I ...
Scott Anderson's user avatar
0 votes
0 answers
36 views

CSV file upload form UI and unable to save content in azure blob

In Angualr UI : - IN UI application - we just upload an .csv File with 10K rows (in UI just browse the .csv file path and click Upload button) and from UI below service is being called (FileSaveToBlob)...
user17824023's user avatar
0 votes
1 answer
94 views

error msg NETSDK1129:Publish target is not supported without specifying a target framework, project is targeting multiple frameworks

I am getting this error while building a CI pipeline in Azure devOps The error message NETSDK1129: The 'Publish' target is not supported without specifying a target framework suggests that your ...
Mayur Panchale's user avatar
0 votes
1 answer
61 views

How to retrieve a MemoryTarget Logs property in a thread-safe manner in NLog while it is being written to

I'm using a MemoryTarget Logger in my code which will be fed from another thread. From time to time, I need to provide the logs to some webapi calls, so I need to retrieve the content of the Logs ...
Jean-Baptiste Zeller's user avatar
1 vote
0 answers
56 views

Unable to Resolve Microsoft.VisualBasic.dll Reference in .NET Standard 2.0 Project After Migrating from .NET Framework 4.8

I've recently migrated a VB.NET class library from .NET Framework 4.8 to .NET Standard 2.0. Post-migration, I'm encountering a persistent build error related to Microsoft.VisualBasic.dll. Despite not ...
Pita's user avatar
  • 11
0 votes
2 answers
42 views

different between init vs get only property? [duplicate]

What are the differences between init vs get only property in C#? Sample: public class person { public string Name { get; init; } public string Family { get; } } I tried to ...
Roohallah Azizi's user avatar
0 votes
0 answers
17 views

Adding WPF Page file type in Excel VSTO project

I am building Excel VSTO project as Excel add-in. I made new form which hosts UserControl. This user control should contain two pages (nested in Frame), so I can navigate between them, however it ...
Davor Cacic's user avatar
1 vote
0 answers
24 views

C# ContextMenuScript cause GCHandle leak and Memory Leak in .Net Framework

I developed an application in .net framework 4.8, it can show, switch and close different .net displays via commands with many controls inside of the display again and again, I cannot hold them in ...
Atlas Liu's user avatar
0 votes
1 answer
82 views

.net Framework csproj regenerates after file deletion

I'm trying to change my .NET framework project to include all the files with the following rule: <ItemGroup> <Compile Include="**\*.cs"/> <Compile Remove="bin\**\*...
Maor Arnon's user avatar
0 votes
1 answer
41 views

WPF app loads a plugin with a window well first time, but fails to show the window second time

The app implements plugins by loading assemblies. The plugins can be loaded multiple times and it works pretty straightforwardly, until I show a window from within the plugin. It works for a first ...
Alex Netkachov's user avatar
0 votes
0 answers
23 views

JwtSecurityTokenHandler.ValidateToken throws StackoverflowException

I have the following configuration for my .Net Framework API : public void Configuration(IAppBuilder app) { ... app.UseJwtBearerAuthentication( new ...
AnthonyDa's user avatar
  • 513
0 votes
2 answers
42 views

Could not load file or assembly 'netstandard' from FW 4.8 console app

I have an older console app that targets .NET Framework 4.8. It loads a few Nugets that all support .NET Standard 2.0 as well as 2.1. The console app builds just fine but I get this runtime error as ...
Jonas Rembratt's user avatar
0 votes
0 answers
25 views

Why is cache-control header set to private even when I set it to a different value?

I'm using .NET Framework 4.8 with MVC and trying to set HttpResponseMessage's cacheControl header to public, max-age=300. My Approach is the following [HttpGet] public HttpResponseMessage Get() ...
uwon's user avatar
  • 47
0 votes
1 answer
83 views

ApplicationInsights - prevent samples of quick successful requests

I have an application hooked up to application insights and we have decent amount of requests. The vast majority are sub 80ms but we have a few which are >300ms. The issue i have is that when we ...
Andy's user avatar
  • 3
0 votes
0 answers
30 views

Connecting to MS Graph using TLS1.2 - SecurityProtocol resets from TLS1.2 when server is rebooted

I have a C# program which is installed on Windows Server 2016, and connects to Exchange Online via MS Graph. However, the program stops working for several hours whenever the server is rebooted. ...
PaulH's user avatar
  • 1
0 votes
0 answers
33 views

IHttpContextAccessor.HttpContext is null WebForms

I've been trying to use IHttpContextAccessor.HttpContext to read the current HttpContext when I call an API from .NET Framework 4.8 to .NET Core. I've put added it into the service: services....
Manib's user avatar
  • 1
0 votes
0 answers
20 views

How do I setup DI for EntityFramework 6 on ASP.NET webapi (not core)

I'm working on an ASP.NET webapi app targeting .NET Framework 4.8.1. I've setup DI using Microsoft.Extensions.DependencyInjection. I setup DI for all controller, Serilog and MediatR. All that works ...
JHJ's user avatar
  • 313
0 votes
0 answers
41 views

Implementing Windows Authentication in Web Api using .Net 4.8 (Not Core)

I have an existing Web Api project build with .Net 4.8. In production, I have both Web Api and Angular based web site deployed in IIS in Windows 2022. The database, SQL Server 2017, is running on ...
Sri's user avatar
  • 1
0 votes
2 answers
67 views

Subtract from date in NLog configuration

I've configured NLog to archive the log files every day. It works, but the name of the created subdirectory for the archived log files contain the actual date, instead of the archived log's date. If ...
tamas's user avatar
  • 1
0 votes
0 answers
94 views

How to find out if any Dll is part of .NET Framework 4.8?

There are many NuGet packages starting with System. or Microsoft. prefixes. Some of these are genuinely part of the .Net Framework, but many are NOT. I am looking for a quick and reliable way to check ...
tomwaitforitmy's user avatar
0 votes
0 answers
36 views

Is ef6 compatible with the most recent version of mariadb?

My application is using currently using .netframework 4.8.1, ef6 v 6.4.4, mysql.data.entityframework as the relevant packages, our database is currently using mysql 5.7, I was able to get app working ...
Nicholas Giacobbe's user avatar
0 votes
1 answer
89 views

References in new SDK-Style project format require hint path?

Conditions I am trying to migrate from the old project format to the new SDK-style .csproj format. See e.g. https://netexplorer.hashnode.dev/migrating-to-an-sdk-style-project .NetFramework 4.8 ...
tomwaitforitmy's user avatar
1 vote
0 answers
90 views

Managed Bootstraper Application (for .Net Framework ) for Wix Toolset v4 Bundle

Been struggling for days to find a working example for a Managed BA for Wix Toolset v4. Most of them are in v3. I have exactly the same issue with this existing question here, and some similar ...
rikuna's user avatar
  • 11
0 votes
1 answer
135 views

Is there a way to sort strings according to Excel's string sorting logic in Ascending order without writing custom code?

I am having a Infragistics XamComboEditor which needs its values to be sorted according to Excel's ascending sorting logic. It is bound to an ObservableDictionary<int, string> with ...
Dox's user avatar
  • 1
2 votes
1 answer
79 views

Weird String.StartsWith and .Contains behaviour after upgrade from .NET Framework 4.8 to .NET 6 [duplicate]

We are currently updating an application from .Net Framework 4.8 to .NET 6 and there is one particular thing that has me puzzled: "MyString".StartsWith("\x01"); In .Net Framework ...
Tim A's user avatar
  • 33
0 votes
1 answer
157 views

Integrating Azure B2C Authentication with .NET Framework 4.6.2

I'm working on a legacy project that uses .NET Framework 4.6.2, and I need to integrate Azure AD B2C for user authentication. While I've successfully set up Azure B2C and implemented the ...
ice_hell's user avatar

1
2 3 4 5
22