lesscode

0

votes
0

answer
3

views

How do we extract Serilog .ForContext() objects logged to Elasticsearch, using ElasticClient (NEST)?

We are looking to better centralize, structure and search our logs using the ELK stack. We are currently logging to a database table, and we have an EventLog POCO that captures the fields required to populate those rows. Our first stab at getting this data into Elasticsearch was to simply log the ev...
lesscode
2

votes
7

answer
5.8k

views

Aggregate GREATEST in T-SQL

My SQL is rusty -- I have a simple requirement to calculate the sum of the greater of two column values: CREATE TABLE [dbo].[Test] ( column1 int NOT NULL, column2 int NOT NULL ); insert into Test (column1, column2) values (2,3) insert into Test (column1, column2) values (6,3) insert into Test (colu...
lesscode
4

votes
2

answer
1.5k

views

VS2010 LNK1181 when rebuilding project with dependency

I have a solution with two C++ (CLR) projects. One project references the other, so the Project Dependencies and Build Order correctly reflect that. Both projects target the same output folder. The dependent project has the dependency configured with Copy Local: false. If I 'Rebuild' the dependency...
lesscode
4

votes
1

answer
5.8k

views

SQLite: How do I connect to an in-memory, shared cache database?

I'm trying out the in-memory shared cache feature of SQLite 3.7.13, via the ADO.NET provider. The following connect string works, but yields a non-shared-cache db: Data Source=:memory: When I try any of these: Data Source=:memory:?cache=shared Data Source=file::memory:?cache=shared Data Source=file:...
lesscode
2

votes
1

answer
500

views

In a TFS build definition, can a variable be defined in terms of another variable?

I have a working MSBuild file with certain targets that I want to run in a TFS build. The targets rely on certain environment variables and MSBuild properties being already defined. I have a 'Variables' tab in my TFS build definition editor where I can ostensibly set the values of variables so that...
lesscode
7

votes
1

answer
2.2k

views

How can I coerce XmlWriter to handle namespaces correctly?

I want to use XmlWriter to write something like this (all in one namespace): but the closest I can seem to get is this: using this code: using System; using System.Text; using System.Xml; namespace ConsoleApplication1 { internal class Program { private const string ns = 'http://tempuri.org/nsA'; pri...
lesscode
2

votes
3

answer
361

views

Why do these two date formats differ?

I'm trying to produce just the day number in a WPF text block, without leading zeroes and without extra space padding (which throws off the layout). The first produces the day number with a space, the second produces the entire date. According to the docs, 'd' should produce the day (1-31). string.F...
lesscode
2

votes
1

answer
728

views

IIS: No Session being handed out, but only in production

I've reproduced this in a simple project - details below. It's a WCF service in ASP.NET compatibility mode. What I'm seeing is that when run on the dev machine (Win7), a HTTP session id is available inside the service operation (HttpContext.Current.Session is non-null). But when deployed to the serv...
lesscode
2

votes
2

answer
5.8k

views

How do I get IE to open a file with its associated application?

MSTest produces an XML file with a .trx extension containing test results. If I have a .trx file on a machine without Visual Studio installed, I get prompted to 'Use the Web Service...' or 'Select from a list...', which is expected. If I have a .trx file on my development machine and I open it, it o...
lesscode
2

votes
1

answer
319

views

Visual Studio Azure build definition: what exactly is a 'Webspace'?

I'm trying to setup a solution in Visual Studio Online to deploy to an Azure website. I've configured the website in Azure, downloaded the subscription file, and I'm now trying to figure out how to configure the build definition. Most of this screen seems straightforward, but in section 6 (Deploymen...
lesscode
7

votes
2

answer
7.6k

views

WCF: How do I trace message bodies?

I'm trying to diagnose a WCF service that is self-hosted in a relatively simple service host process (Service.exe). I have Service.exe.config configured thus: When I look at the resulting svclog file, I see many trace events being logged (I expected only the first message to be logged), and none of...
lesscode
4

votes
2

answer
277

views

Is it possible to get Code Coverage Analysis on an Interop Assembly?

I've asked this question over on the MSDN forums also and haven't found a resolution: http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=3686852&SiteID=1 The basic problem here as I see it is that an interop assembly doesn't actually contain any IL that can be instrumented (except for maybe a few...
lesscode
1

votes
2

answer
428

views

What would be another term for an Application Service?

I'm working on a proposal and prototype for a re-architecture of a complex system. It's an n-Tier distributed architecture that broadly follows the principles of DDD and has elements of Jeffery Palermo's Onion Architecture, especially the separation of the core concept of Domain Model/Services (thes...
lesscode