Serilog With API App in Azure
I've integrated Serilog into WebApi project developed with Asp.Net Core 2.0 This is the configuration code in `Program.cs`: ``` Log.Logger = new LoggerConfiguration() .Enrich.FromLogContext()...
- Modified
- 8 Oct at 09:20
ambiguity in package references version
In a project, there are several references to Ninject library which have their version, and the unit test fails, this is the error : > Message: System.IO.FileLoadException : Could not load file or as...
- Modified
- 3 Apr at 11:17
What is the default user and password for elasticsearch?
I have [installed Elastic with Docker](https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html): ``` docker run -p 9200:9200 \ -p 9300:9300 \ -e "discovery.ty...
- Modified
- 27 Jan at 09:1
How to get the value from DapperRow in a query that returns a single result
I've done the following SQL query: ``` SELECT SUM(SI.UnitaryValue) as Amount FROM Services as S INNER JOIN ServicesItems as SI ON S.ServiceId = SI.ServiceId WHERE S.ServiceId = @ID" ``` In...
- Modified
- 7 Oct at 09:21
Angular - ng: command not found
I'm trying to learn Angular and my knowledge in terminal is beginner. After I installed Angular and then type `ng new my-project`. I get the response `ng: command not found`. I've seen other posts tha...
- Modified
- 24 Dec at 20:23
The *deps.json file in .NET Core
What is the purpose of *deps.json file in .NET Core? What is the reason to store references in such file and not in assembly manifest(as in standalone .NET Framework)? Using Ildasm i checked that ass...
- Modified
- 7 Oct at 15:46
Can I merge table rows in markdown
Is there a way to create merged rows in a column of table in markdown files like ReadMe.md files? Something like this: [](https://i.stack.imgur.com/Z4k5w.png)
- Modified
- 7 Oct at 15:35
How do I target .NET Standard 2.0 in a freshly created .NET Core 2.0 web app?
I've just created a fresh project using `dotnet new web`. My Google-foo may be failing me, but I didn't find anything relating to my answer (please link to another SO answer, or relevant documentation...
- Modified
- 7 Oct at 14:14
What are the ways to secure Azure functions
I have written 5 Azure functions in Azure Portal using c#. Below are the steps to install my application:- - - - - - Above process will be executed on the Customer Edge node. The authorization u...
- Modified
- 7 Oct at 07:50
What are hidden dependencies?
Could someone please give me an example of a hidden dependency. I've googled it, and found results like this: > "A visible dependency is a dependency that developers can see from a class's interfa...
- Modified
- 7 Oct at 03:56
How to display multiple images in one figure correctly?
I am trying to display 20 random images on a single Figure. The images are indeed displayed, but they are overlaid. I am using: ``` import numpy as np import matplotlib.pyplot as plt w=10 h=10 fig=pl...
- Modified
- 8 Oct at 05:4
How to import a csv-file into a data array?
I have a line of code in a script that imports data from a text file with lots of spaces between values into an array for use later. ``` textfile = open('file.txt') data = [] for line in textfile: ...
- Modified
- 7 Oct at 01:49
Uncaught SyntaxError: Unexpected token u in JSON at position 0
Only at the checkout and on individual product pages I am getting the following error in the console log: ``` VM35594:1 Uncaught SyntaxError: Unexpected token u in JSON at position 0 at JSON.pars...
- Modified
- 15 Oct at 19:22
Can I teach ReSharper a custom null check?
ReSharper is clever enough to know that a `string.Format` requires a not-null `format` argument so it warns me about it when I simply write ``` _message = string.Format(messageFormat, args); ``` wher...
C# dotnet pass data from middleware/filter to controller method
We are developing a multi-hosting platform where we can register new clients based on the url passed to our application. However currently we wanted to create a middleware/filter to validate our clien...
- Modified
- 6 May at 00:58
C# ValueTuple properties naming
I'm trying ValueTuple Class in C#, and i have a doubt about properties naming, let's see: If instantiate a ValueTuple declaring the object like this: `var tuple1 = (Name: "Name1", Age: 25);` We can na...
- Modified
- 5 May at 15:0
how to remove json object key and value.?
I have a json object as shown below. where i want to delete the "otherIndustry" entry and its value by using below code which doesn't worked. ``` var updatedjsonobj = delete myjsonobj['otherIndustry'...
- Modified
- 6 Oct at 07:8
Invalid Switch syntax builds successfully?
Could someone please help enlighten me? I went to check-in some changes to TFS and my check-in was rejected. It prompted me to take a look at a switch statement I had edited. What I've found is ...
- Modified
- 5 Oct at 19:49
How to use switch statement inside a React component?
I have a React component, and inside the `render` method of the component I have something like this: ``` render() { return ( <div> <div> // removed for brevit...
- Modified
- 5 Oct at 19:1
Pandas error in Python: columns must be same length as key
I am webscraping some data from a few websites, and using pandas to modify it. On the first few chunks of data it worked well, but later I get this error message: ``` Traceback(most recent call last...
- Modified
- 24 Jul at 18:47
RestSharp Timeout not working
I have a restsharp client and request set up like this: ``` var request = new RestRequest(); request.Method = Method.POST; request.AddParameter("application/json", jsonBody, ParameterType.RequestBody...
- Modified
- 5 Oct at 11:47
Serilog is logging type rather than object content
I'm new to Serilog - trying it out to see if it will help. I'm using Serilog v2 and Serilog.Sinks.MsSqlServer v5 I have the following console app code: I would have expected the details of Person to b...
An existing connection was forcibly closed by the remote host in production environment
When calling my servicestack api from one of our production servers, using our web application, I get this exception: IOException: Unable to read data from the transport connection: An existing conne...
- Modified
- 5 Oct at 08:32
Convert Word doc and docx format to PDF in .NET Core without Microsoft.Office.Interop
I need to display Word `.doc` and `.docx` files in a browser. There's no real client-side way to do this and these documents can't be shared with Google docs or Microsoft Office 365 for legal reasons....
Swashbuckle: Make non-nullable properties required
Using Swashbuckle.AspNetCore in an ASP.NET Core webapp, we have response types like: ``` public class DateRange { [JsonConverter(typeof(IsoDateConverter))] public DateTime StartDate {get; set...
- Modified
- 11 Oct at 12:34