C# 7.1 can't be published
I have ASP.NET Core C# web application. I made some changes that now use C# 7.1 features. I changed project version, so it compiles and runs fine. However, when I try to the project, I am getting an ...
- Modified
- 27 Jan at 13:45
C# Attribute hell - one class shared between mobile and server on two different SQL platforms
We share a single poco's with - - - Problem is the shared classes have become a mess. ``` [PrimaryKey, AutoIncrement] public int Id { get; set; } #if __MOBILE__ [Indexed] #else ...
- Modified
- 22 Dec at 16:13
How do I use HttpClient PostAsync parameters properly?
So I am working on writing an extension class for my project using HttpClient since I am moving over from HttpWebRequest. When doing the POST request, how do I send a normal string as a parameter? No...
- Modified
- 22 Dec at 16:13
How does the hard-coded ApplicationInsightsResourceId impact the gathering of AI data from resources in varying production levels?
I have an application to which I am trying to add in Azure Application Insights telemetry. I've been reading how I can modify the InstrumentationKey at runtime, to select a different telemetry target...
- Modified
- 20 Jun at 09:12
Optional property class in typescript
I'm new to typescript. What is the utility of optional properties in typescript? And what is the difference between: ``` a?: number; a: number | undefined; ```
- Modified
- 9 Jan at 21:15
How to make Sonarqube exclude a .NET (C#) project from coverage measures
Sonarqube allows for individual files to be excluded from code coverage by adding patterns in the key. This can be done on a project level by adding them in the UI and even in a .csproj file by speci...
- Modified
- 22 Dec at 09:37
What exactly happens when you call an async method without the await keyword?
I have a web server and there is a periodic job merges and send records (lots of request logs). ``` Task.Run(() => { while (true) { try { MergeAndPutRecords(); ...
- Modified
- 26 Jul at 17:3
Angular File Upload
I'm a beginner with Angular, I want to know how to create Angular 5 , I'm trying to find any tutorial or doc, but I don't see anything anywhere. Any idea for this? And I tried [ng4-files](https://git...
- Modified
- 7 Jul at 06:0
Ways to secure an anonymous Web API request
I have a (NOT ASP.NET Core) single page application with on the front end. My client (browser) talks to server through ASP.NET Web APIs. Now, the web application is on but . There is no login/ us...
- Modified
- 31 Dec at 15:30
'react-scripts' is not recognized as an internal or external command
I've got a maven project, within which is JavaScript project cloned as a git sub-module. So the directory structure looks like `mavenapp/src/main/javascript/[npm project files]` Inside my package.json...
- Modified
- 27 Aug at 08:14
Dynamically compile a class in App_Code while pre-compiling the rest of the project/library
ASP.NET has specicial application folders like [App_Code](https://msdn.microsoft.com/en-us/library/ex526337.aspx) which: > Contains source code for shared classes and business objects (for example, ....
- Modified
- 24 Dec at 16:14
How to configure "Shorten command line" method for whole project in IntelliJ
When I run tests I get the error "Command line is too long". It works if I set the "Shorten command line" method in the Run/Debug configuration to "JAR manifest" for the specific method or class, but...
- Modified
- 27 Nov at 04:3
What does Debug.WriteLine() in C# do?
I was wondering what `Debug.WriteLine()` does. I see it all the time in many different codes, but I don't get what it's supposed to do. What I found out so far: > "Writes information about the debug t...
- Modified
- 6 May at 00:54
Asp.net core 2 Prefix Routing
How to create prefixed routing for MVC CRUD operation. I am working on an application that requires admin and front-end. For the admin I want all route to point to `localhost:5000/admin/....` I have ...
- Modified
- 21 Dec at 12:3
Difference between client and server time ServiceStack
I have a web service, built on ServiceStack. It serves protobuf-net requests from window form users. I would simply like to know how to automatically get the user's machine Current Time (for every se...
- Modified
- 21 Dec at 13:36
What's the difference between sizeof(T) and Unsafe.SizeOf<T>()?
First of all, a small disclaimer before the actual question: > I know there are a lot of closed/duplicate questions regarding the difference between the `sizeof` operator and the `Marshal.SizeOf<T>` m...
- Modified
- 1 Aug at 18:21
System.ArgumentNullException: Value cannot be null, Parameter name: implementationInstance
I deployed .NET core mvc application in IIS, when I run app, the page show 502.5 error, I run command in powershell "dotnet D:\deploy\WebApp\WebApp.dll" ,this follow show detail error content: I know ...
- Modified
- 11 Sep at 11:21
How to access Anaconda command prompt in Windows 10 (64-bit)
I had to install the 64-bit version of Anaconda with python 3.5 in Windows 10. I followed the default settings (`AppData/Continuum/Anaconda3`). However, after installation, I am unsure how to access t...
Find max value of a column in laravel
The problem started because I have a table (Clientes), in which the primary key is not auto-incremental. I want to select the max value stored in a column database. Like this select, but with eloque...
How to get DbSet from entity name in EF Core / .NET Core 2.0
I have a `DbContext` with several `DbSet<T>` properties: ``` public virtual DbSet<A> A { get; set; } public virtual DbSet<B> B { get; set; } public virtual DbSet<C> C { get; set; } ... ``` In certa...
- Modified
- 10 Jun at 18:44
Selenium can't find chromedriver.exe
We're upgrading to .NET Core, and we have a crawling engine that uses Selenium for some tasks. We use `chromedriver.exe` and it works just fine in .NET 4.6.1. For .NET Core, we created a console app...
C# and dotnet 4.7.1 not adding custom certificate for TLS 1.2 calls
I have the following C# code, constructing an https call with a custom certificate. When using Tls 1.1, the call works fine. When using Tls 1.2 the call breaks. I using curl, using tls 1.2 works fine ...
- Modified
- 15 Jan at 07:45
JsonServiceClient returns reponse with correct attribute but empty value
I am trying to make a JSON request on an external service, that would look like this : GET request : ``` https://remotehost/path/mycount?foo=C&bar=21 ``` response : ``` {"count":1000} ``` for t...
- Modified
- 20 Dec at 11:10
Does injecting ILogger<T> create a new logger each time?
On the logging samples in [the documentation](https://learn.microsoft.com/en-us/aspnet/core/fundamentals/logging/?tabs=aspnetcore2x), there is an example how to inject a logger into a controller: ```...
- Modified
- 20 Dec at 08:38
Access Controller from ExceptionFilterAttribute in ASP.NET Core
With ASP.Net Core 2, how could you get access to the Controller instance that an ExceptionFilterAttribute is applied to? Is there a better way to acheive shared "base" controller properties and metho...
- Modified
- 8 Aug at 21:48