.NET 4.7 was originally released by Microsoft in June of 2017. It is a followup to .NET-4.6 and was included in the Windows 10 Creators Update.
Questions tagged [.net-4.7]
109 questions
2
votes
2 answers
Given json as a response but not sure how to parse it
I am using this code to attempt to parse my response back from the payment gateway:
var responseMessage = client.PostAsJsonAsync("transaction", transData).Result;
var response = responseMessage.Content.ReadAsStringAsync().Result;
…

ErocM
- 4,505
- 24
- 94
- 161
2
votes
1 answer
Puppeteer renders blank pages when not setting breakpoints
I'm using the latest version of PuppeteerSharp and I'm having an issue with blank pages being rendered when not setting a break point.
It would seem the code is not "awaiting" properly if I just let the logic go through without interrupting…

Francis Ducharme
- 4,848
- 6
- 43
- 81
2
votes
1 answer
Finding out where unobservedTaskException is thrown: stacktrace is null
I have a large C# appication using third party libraries and somewhere in the application a task is run which is not awaited and throws an exception.
So I added an event handler to…

Boris Mulder
- 308
- 2
- 14
2
votes
1 answer
Is it possible to add packages for "InternalsVisibleTo" at the command line or via a config file?
We have some methods that are internal but that people may need visible in test projects (and only test projects). To enable that, we had to add a bunch of InternalsVisibleTo statements at the top of a class. This is a library that may be used by…

Don Rhummy
- 24,730
- 42
- 175
- 330
2
votes
1 answer
Why is Visual Studio 2017 using TLS 1.0?
New install of Visual Studio 2017 Enterprise on a Windows 7 box.
Http requests in an NUnit test project (targeting .NET 4.7) are using TLS 1.0 and failing because the server requires 1.1 or better.
Yet the same test project (targeting .NET 4.6.1)…

agentnega
- 3,478
- 1
- 25
- 31
2
votes
0 answers
How to configure a CacheStoreProvider in ASP.NET?
In .NET 4.7, they have introduced a feature to plug any cache store as the default object cache implementation. However, I can't find any documentation from Microsoft, any help or even a blog on how to configure any cache store other than…

Faisal
- 4,054
- 6
- 34
- 55
2
votes
1 answer
Why latest .net 4.7 adds an invalid configsection to my web.config?
I am having an issue with an asp.net app where the web.config is updated and reloaded dynamically.
The following code is used to save the appsettings section in web.config:
public static void SetWebConfigValue(string keyValue, string value,…

BigONotation
- 4,406
- 5
- 43
- 72
2
votes
1 answer
Can I use "Roslyn" in Visual Studio 2017 with .NET 4.7?
I've upgraded my project with scripting capabilities and also Microsoft.CodeAnalysis nuget and it downloaded hundred of dependent System.* packages. Before it was only Microsoft.CodeAnalysis.Common, CSharp, CSharp.Workspaces, etc. What is happening?…

SmartK8
- 2,616
- 1
- 29
- 37
1
vote
2 answers
How to unit test static readonly HttpClient?
I'd like to unit test the following class.
How can I mock the HttpClient when it's used as a static readonly field in a static class?
This question doesn't help as the OP is using an instance field for the HttpClient.
Here's my class:
using…

David Klempfner
- 8,700
- 20
- 73
- 153
1
vote
0 answers
C# get files with multiple wildcard within multiple sub-folders named after dates
I have multiple folder named after the year\month\days. It's in a Azure blob storage if that change anything, I already have the code that download files from the blob…

Bradford1138
- 65
- 1
- 1
- 7
1
vote
0 answers
Can not Start Process on certain PC
Process proc = new Process();
proc.StartInfo.FileName = @"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe";
proc.StartInfo.Arguments = "web.whatsapp.com --new-window --remote-debugging-port=9222 --user-data-dir=\"Chrome…

Bhavya Gupta
- 186
- 2
- 12
1
vote
0 answers
What is the relationship between ServicePointManager.DefaultConnectionLimit and system.net connectionManagement maxconnection?
Do these two settings refer to the same limit or seperate limits? (don't fixate on the number, I put that in at random)
System.Net.ServicePointManager.DefaultConnectionLimit = 20;
The above property which can be set in code,
and the optional…

Andrew M
- 9,149
- 6
- 44
- 63
1
vote
3 answers
Determine if a variable is of a lazy type
Quick question - is there any 'prettier' way to determine if a variable was lazily initialized than:
var paramType = param.GetType();
if (paramType.FullName.Contains("System.Lazy"))
{
...
}
I know it's not something really recommended to be…

brovar
- 811
- 4
- 10
- 25
1
vote
1 answer
localhost this site can't be reached running web application in visual studio
I open my solution in VS2019, select the web application and press F5 to run in the debugger
The browser is set to IIS Express (Google Chrome)
localhost:51872 opens in Chrome with a message
This site can't be reached.
The connection was reset…

Kirsten
- 15,730
- 41
- 179
- 318
1
vote
1 answer
WebServer file logs sometimes are missing after upgrading WebSite's project from .NET framework 3.5 to 4.7
hope to get an answer or at least some kind of clue to a weird problem we are having with our web-servers.
As part of web-server's normal activity, we log some key interactions into a file log. The file log is nothing extraordinary, its a simple…

George
- 2,165
- 2
- 22
- 34