Questions tagged [.net-4.6]

.NET 4.6 (previously called .NET 4.5.3) is the latest framework release from Microsoft. It is a followup to .NET-4.5.2 which brings new features to both infrastructure (Roslyn, the compiler as a service) and new language features for both VB.net and C#

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

Equivalent encryption with method CryptoJS.AES.encrypt in c#

I want to encrypt in c# exactly like in Node.Js which this method in Node.js does: let encrypted = CryptoJS.AES.encrypt(JSON.stringify(text), passPhrase).toString() So I could encrypt in c# and be ...
maryam mohammadbagheri's user avatar
0 votes
1 answer
14 views

LibVLCSharp - Play file from zip archive

I'm trying to improve some of my already-existing app in WinForms, that uses libvlcsharp to play locally storaged files. I need to add support for playing file (usually h264 mp4) inside zip. I can ...
BartekC's user avatar
1 vote
3 answers
441 views

What changes are needed for .NET framework upgrade from 4.6 to 4.8

I am working on project upgrade for the 1st time. I have a solution built upon 4.6 version of .NET framework. When I opened it very first time in VS 2022, I got a dialog box saying upgrade to 4.8 and ...
dotnetlearner's user avatar
0 votes
0 answers
76 views

After migrating .NET 4.6x to .NET Core 6. same code is producing "Padding is invalid and cannot be removed .net core migration."

After migrating our encryption project (library) from .NET Framework 4.6x to .NET Core 6, we are getting the error Padding is invalid and cannot be removed.. The code is the same, with the same ...
Tyson Gibby's user avatar
  • 3,092
1 vote
1 answer
65 views

What is the lifetime/scope of ClientInterceptorContext in .NET?

I have a .NET gRPC client on .net 4.6.2 using Grpc.Core library. I've registered gRPC channel as singleton to reuse it following [this recommendation].(https://learn.microsoft.com/en-us/aspnet/core/...
Pavel Voronin's user avatar
0 votes
1 answer
30 views

Dictionary input parameter of a WCF method not receiving the value

I declared a method like this: public int MyFunc(int x1, Dictionary<string, string> x2 , string x3 , Guid x4) and I sended a request from Postman with this body: { "x1" : "1&...
maryam mohammadbagheri's user avatar
0 votes
0 answers
61 views

DbSet query with AsExpandable() and async throws InvalidOperationException (IDbAsyncEnumerable)

I'm trying to run an async query based on an Expression<Func<>>: Expression<Func<IDbUserRightsInfo, bool>> expression = u => u.MarketingType == eUserMarketingType.Internal; ...
Stephane Mathis's user avatar
0 votes
2 answers
100 views

Is it possible to use ROPC to update profile if sign-in was done using Authorization Code with MFA?

We're in the process of migrating our authentication process from ROPC to Authorization Code with MFA. We currently use ROPC for Sign Up, Sign In, Reset Password, Forgot Password, and Profile Edit. ...
Kiran Ramaswamy's user avatar
2 votes
0 answers
126 views

Error 500.19 in server with IIS 10 after deployment a new version of a web services

I had a Web Service running in net 3.5 (I know, so old) and I migrate it to Net 4.6. I completed the migration in local, but when I deploy the web services in the server I get an 500.19 error. I ...
Kenzo_Gilead's user avatar
  • 2,267
1 vote
1 answer
100 views

Uncaught ReferenceError: mozRTCSessionDescription is not defined

I have an ASP.NET MVC app (.NET Framework 4.6.2) which has a front end on Knockout.js it also uses signalR. The app was working fine until we upgraded Firefox to version 113.0 and 113.0.1. The app ...
IntelligentCancer's user avatar
1 vote
1 answer
85 views

Binding named tuple to XAML DataGrid

In my WPF application, I have a lot of view models that, now, require a "property-value" like grid. I'm trying to build a generic purpose view model that can be "injected" in ...
IssamTP's user avatar
  • 2,412
0 votes
0 answers
38 views

The simpleType 'serviceNameType' has already been declared in my web.config

I have a WCF api with my web.config that I'm attempting to publish to our web server. I am getting this message on my web.config: My web.debug.config and web.release.config are empty. This is all ...
ErocM's user avatar
  • 4,525
1 vote
1 answer
443 views

How can I setup .NET Framework 4.6.1 for MSBuild on GitHub Actions?

When I use the latest setup-dotnet, I get an error: MSB3644: The reference assemblies for .NETFramework,Version=v4.6.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) ...
3urjnjsdcxsa654's user avatar
0 votes
1 answer
203 views

Microsoft interop to Word does not work after uprade to Office 365

I had Word templates in my database that are used for mail merge. I used Office 2013 when I created this code with .Net 4.6: Object theTemplateFile = theWordFileName = Path.Combine(Path.GetTempPath()...
JeroenZenM's user avatar
0 votes
0 answers
120 views

How to get DebugDiag to show method names in the stack trace?

I am trying to get to the bottom of a crash in a .NET 4.61 web application running under IIS. I got Windows to generate memory dump on crash. I then loaded the .dmp file into DebugDiag and added ...
AngryHacker's user avatar
1 vote
0 answers
17 views

From .NET 4.0 add reference to assembly in .NET 4.6

Visual Studio 2019 allows in the .NET 4.0 project Tests.Test_4_0.vbproj to add a reference to the .NET 4.6 assembly Tests.Test_4_6.dll. The editor allows to call methods of class Test1 in the .NET 4.6 ...
Alex's user avatar
  • 461
0 votes
1 answer
1k views

Which Rest sharp version should I use to support a legacy .Net framework application built on version 4.6.1

I have and application that is build using .net framework 4.6.1.0. I can't upgrade it. I have to create an assembly file for this application that gets loaded dynamically. This assembly must be able ...
Saurav's user avatar
  • 592
1 vote
0 answers
107 views

net 6 load assemblies at runtim to AppDomain.CurrentDomain

The goal is to migrate a .net 4.6 FullFramework lib to .netStandard /.net6. There is one app that is using a typegrabber, so it is looking in its executing folder for *.dll and tries to load them into ...
KnApP993's user avatar
1 vote
1 answer
215 views

How do I fix missing NuGet references?

I'm using Visual Studio Professional 2017, version 15.6.6. A co-worker gave me a solution which he says I should be able to open and rebuild without any problems. There seems to be something wrong ...
boilers222's user avatar
  • 1,911
0 votes
1 answer
378 views

Passing the servername/Ldap inside "DirectoryEntry" Vs "PrincipalContext"

I have this action method inside my ASP.NET MVC-5 .net 4.6:- public ActionResult UsersInfo2() { List<DomainContext> results = new List<DomainContext>(); ...
John John's user avatar
0 votes
1 answer
99 views

What is the DI equivalent for NInject DI?

I am currently migrating from .net4.6 which uses NInject modules. My target is to use .net6 core and its native DI. While doing so I came across a statement from NInject for which I am wondering if ...
Arun Prakash Nagendran's user avatar
1 vote
0 answers
1k views

Memory leak when using async/await with CancellationTokenSource

I have inherited an app and investigating it for memory leak issues. It's a C# .NET Framework 4.6 application that uses a lot of async/await. I think the issue is because of the thread is not being ...
Yoshimori's user avatar
1 vote
1 answer
514 views

Dependency Injection Involving Struct types

I have a class as shown below, public class AccessToken : IAuthToken { /// <summary> /// Initializes a new instance of the <see cref="AccessToken"/> class. /// </...
Arun Prakash Nagendran's user avatar
0 votes
0 answers
80 views

The relative virtual path is not allowed here C#

I'm having issues with this piece of C# code var localPath = $"Images\\AgencyWatermarkPaid\\watermarkpaid{invoice.AgencyId}.png"; string targetOutputFile = Path.Combine(...
user2721794's user avatar
1 vote
0 answers
33 views

Reference type in EF query causing strange OR (1 = 0) in WHERE clause

I have the following setup: private IQueryable<ManagementCreditorEntity> CreateQuery(ExternalId creditorId) { //_creditorManagedPropertyDbContext is of type ICreditorManagedPropertyDbContext ...
David Klempfner's user avatar
2 votes
2 answers
315 views

Calling an API 20 times to generate a list, best practice?

The case is that I call an API once to get a list of tenants, then for each tenant I must call again to get a list of usages for the tenant. Unfortunately there is no way to get usages for all tenants ...
hans nordblad's user avatar
1 vote
0 answers
838 views

How to configure an httpclient using Autofac and Polly in old 4.6.1 .Net framework

There is a legacy app that uses an httpClient to interact with Web API backend. I would like to configure several httpClients in Autofac DI container. The configuration must include timeouts, Polly (...
Oblomingo's user avatar
  • 678
6 votes
1 answer
3k views

How to use DependencyInjection in BenchmarkDotNet?

I'd like to use BenchmarkDotNet on some legacy code I'm working with right now. It is written in C# Net462. It is a big, old and complex system and I'd like to Benchmark some methods inside some ...
cicerosf's user avatar
1 vote
0 answers
214 views

Add OpenTelemetry to a .Net Framework 4.6 Console Application

I am trying to add Open Telemetry logging to a .NET Framework 4.6 console application. I have found many examples for .net core but not .NET Framework 4.6 Are there any examples ?
George Mavritsakis's user avatar
0 votes
0 answers
194 views

Why does GlobalConfiguration.Configure not apply the authorization attribute to the MVC controllers?

I have a asp.net mvc project (.NET 4.6.1) which also has a web api in the same project. The api folder has got the web api controllers. The Controllers folder next to the api has got all mvc ...
variable's user avatar
  • 8,642
0 votes
1 answer
526 views

NServiceBus sending message to one endpoint and waiting for reply in another

I'm using NServiceBus with RabbitMQ in my project. I have two services that don't know about each other and don't share anything. service1 publishes request messages to endpoint1 (queue1) and service2 ...
Nikita Kondratev's user avatar
1 vote
1 answer
91 views

What IIS authentication needs enabling for custom authentication?

I have developed a .NET MVC website with .net identity for authentication. When I deploy this onto IIS, then should I enable only anonymous authentication so that the website handles the ...
variable's user avatar
  • 8,642
1 vote
0 answers
649 views

System.IO.Compression Reference issue

I am working on .NET framework 4.6 Web API application. My app is working on my machine and I was able to build it in my local but when I push it to our Azure Dev OPS CI, I got this build error. Error ...
ramdev's user avatar
  • 159
3 votes
2 answers
647 views

GitHub Action with .NET Framework 4

Is it possible to create a GitHub Action for building an old .NET 4 based app? I've created such pipeline: name: EZRep Build on: push: branches: master jobs: build: runs-on: windows-...
Vololodymyr's user avatar
  • 2,056
0 votes
1 answer
298 views

The type forwarder for type 'System.ComponentModel.INotifyPropertyChanging' in assembly 'System' causes a cycle

I am working on upgrading WPF application which is built using .Net Framework 4.6 to .Net 6. While upgrading a few assemblies, I encountered this strange issue - The type forwarder for type 'System....
Anil C's user avatar
  • 1,045
0 votes
0 answers
89 views

sql exception "physical connection is not usable" on a specific column in specific table

I have a winforms desktop app. It works on the server computer, where the db is, but on another computer, with win 8.1, it throws the error only when selecting 2 specific columns from 2 tables. First ...
Maria's user avatar
  • 81
0 votes
0 answers
2k views

Verify JWT Token data with C#

I am trying to verify a JWT token signed with RSA256 in C#. The token was created on the server side in Javascript with the jwt library called Jose-jwt. I am veryfing the token in a WinForms app ...
tutiplain's user avatar
  • 1,441
0 votes
0 answers
185 views

VBC.exe to build standalone dlls in "newer" .net frameworks. (4.6 specifically)

I am working on upgrading an older "compiler" we have, which basically converts a spreadsheet into a .vb file, and then compiles it into a .net library. It uses vbc.exe to compile the .vb ...
Jake's user avatar
  • 19
1 vote
1 answer
106 views

Google Dialogflow does not install for .net v4.6 from nuget

I am trying to install Google DialogFlow from nuget in .net v4.6. But it does not install. And I have to use .net v4.6 coz I have an integration with workflow foundation. Severity Code ...
Majedur's user avatar
  • 2,934
0 votes
1 answer
263 views

Exception handling in Always-running tasks

After countless hours of testing,searching, and asking question i'm still stuck on 'always-running' tasks, or does that not exist in async io/ parallell programming? currently I have a program that ...
Technology Researcher's user avatar
0 votes
1 answer
849 views

Using System.Management on Linux

I am creating a console .NET 5.0 app to communicate with a KUKA Robot using dll's provided within their WorkVisual software. These dll's were built with .NET Framework 4.6. On Windows everything works ...
Igor Jędrzejczak's user avatar
0 votes
1 answer
223 views

ServicePointManager.SecurityProtocol multiple protocol performance

Using .net 4.6 When setting multiple protocols to access an api will trying all protocols affect the latency of the call ? example: ervicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | ...
Lior Gal's user avatar
0 votes
1 answer
2k views

Url redirect from Web.config in .Net application

I have ASP.Net web application hosted in Azure App service. I would like to redirect the URL to another URL from Web.config. For example, the below urls https://www.example.com/Products and ...
AskMe's user avatar
  • 2,535
0 votes
1 answer
284 views

C# Swashbuckle.Net45 didn't show controllers on Swagger UI

I have add Swashbuckle.Net45 (Swagger) to my C# (.NET 4.6) 2 different web projects. on one everything working great on another I don't see any controller on Swagger-UI. as I know the configuration ...
Michael Ivno's user avatar
0 votes
1 answer
67 views

VB.net Navigating Text Adventure Game

I am working on a text adventure game. The goal of this program is to display three options and a textbox. The user can select one of the options by entering the corresponding number into a text box, ...
Spring93's user avatar
1 vote
0 answers
1k views

HttpClient - Single Instance across the app or static instance at controller level

In our .NET API, we were creating the HttpClient instances in each controller action. As the application should have a single instance of HttpClient for each HTTP endpoint it consumes. We have got a ...
A J Qarshi's user avatar
  • 2,842
1 vote
0 answers
224 views

SqlDataReader doesn`t obey Cancellation requested while reading large row

Please consider this code sample: const int timeoutInSeconds = 60; // 1 minute static readonly CancellationTokenSource tokenSource = new CancellationTokenSource(); public ...
aismagilov's user avatar
0 votes
0 answers
47 views

Avoid controls flickering while resizing them by code (.NET 4.6.1)

I tried searching the site but didn't find any solution to my problem. I would like to dynamically change my controls size inside the form and see only the final result without flickering issues. I ...
Matteo TeoMan Mangano's user avatar
0 votes
1 answer
190 views

Entity Framework 6.4 supports Second level (L2) result caching?

I would like to know whether EF 6.4 supports second revel caching (result caching - not query caching) without extending with a third-party library like EntityFramework.Cache or NCache.
TJay's user avatar
  • 63
2 votes
0 answers
242 views

How debug .NET Framework in Visual Studio

I have some problem with dynamic compile C# code. I have some provider property in my class: static CSharpCodeProvider provider = new CSharpCodeProvider(new Dictionary<string, string>() { { &...
lgabryel's user avatar
  • 109

1
2 3 4 5
9