Could not find Microsoft.DiaSymReader.Native.x86.dll

I'm trying to build a project in Rider using Mono and I can keep on getting this error: > Error CS0041: Unexpected error writing debug information -- 'Windows PDB writer is not available -- could n...

23 May at 12:8

Authorization has been denied for this request - New Web API Project

I just created new Web API project (using MVC) in visual studio 2015 and for the testing purpose, I ran that project but ended up below error. After running the project, it brings up Home Page correc...

15 Aug at 21:50

Adding an image in UWP?

I have been looking online for hours trying to find a way to insert a simple image into my Universal Windows Application. All the tutorials I have found so far have been too confusing or just don't wo...

15 Aug at 18:54

"Build failed" on Database First Scaffold-DbContext

I'm trying to generate classes from a database (EntityFramework's database first approach). For convenience, I'm more or less walking along with this tutorial: [https://docs.efproject.net/en/latest/p...

15 Aug at 18:49

ServiceStack doesn't auto-wire and register AppSettings

ServiceStack (4.0.62) doesn't register and auto-wire AppSettings property. I even don't know how to debug this situation, maybe somebody can explain it. So, I have ServiceStack-based self-hosted con...

15 Aug at 18:34

sequence contains no elements Error Max()

I am Getting: > sequence contains no elements ``` private int? GetPrecedingSibling(int? contentid,int? templateid) { var value = _sequenceTemplateItemService.Query(e => e.templateId == templatei...

15 Aug at 13:51

What is a proper way of writing entity POCO classes in Entity Framework Core?

EF Core has a "code first mentality" by default, i.e. it is supposed to be used in a code-first manner, and even though database-first approach is supported, it is described as nothing more than rever...

Model-bind interface property with Web API

I have a command looking like: ``` public interface ICommand { // Just a marker interface } public interface IUserAware { Guid UserId { get; set; } } public class CreateSomething : ICommand...

18 Aug at 09:44

How to Setup a readonly property with Moq?

I am trying to unit test using Moq. Here is the example code: ``` public class ConcreteClass { private readonly FirstPropery firstProperty; private readonly SecondProperty secondProperty; ...

20 Apr at 09:53

Google Sheets API returns "The caller does not have permission" when using server key

I've generated a server key in the API Manager and attempted to execute the following on my Mac: ``` curl 'https://sheets.googleapis.com/v4/spreadsheets/MySheetID?ranges=A1:B5&key=TheServerKeyIGenera...

Using Ormlite to Group query conditions

I'm trying to generate the SQL query which looks something like this: ``` SELECT * FROM Contact Where UserId = @UserId AND (FirstName = 'John' OR Surname = 'Smith') ``` This is what I can do: ``` ...

16 Aug at 23:34

debugger is looking for executioncontext.cs, how to fix?

I am debugging this code and getting a strange "source not found" page that is looking for this class called ExecutionContext.cs when the debugger lands on the Jtoken line. > `ExecutionContext.cs` no...

Fetching distinct values on a column using Spark DataFrame

Using Spark 1.6.1 version I need to fetch distinct values on a column and then perform some specific transformation on top of it. The column contains more than 50 million records and can grow larger. ...

access cookie in _Layout.cshtml in ASP.NET Core

I'm trying to store an authentication-key into my cookies when login succeeded: ``` HttpContext.Response.Cookies.Append("Bearer", accessToken, cookieMonsterOptions); ``` So in the controller-class ...

How to get `DOM Element` in Angular 2?

I have a component that has a `<p>` element. It's `(click)` event will change it into a `<textarea>`. So, the user can edit the data. My question is: - `textarea`- `.focus()`- `document.getElemenntByI...

9 Sep at 01:41

How do I return JSON from an Azure Function

I am playing with [Azure Functions](https://azure.microsoft.com/en-us/services/functions/). However, I feel like I'm stumped on something pretty simple. I'm trying to figure out how to return some bas...

12 Jan at 13:27

Xpath: select div that contains class AND whose specific child element contains text

With the help of [this SO question](https://stackoverflow.com/questions/19503721/xpath-find-a-node-whose-class-attribute-matches-a-value-and-whose-text-contains) I have an almost working xpath: ``` /...

23 May at 12:10

Does it make sense to use MetadataType to enforce validations in case of Code First?

I seem to understand the reason behind taking help of `MetadataTypeAttribute` to [Add Validation to the Model](http://www.asp.net/mvc/overview/getting-started/database-first-development/enhancing-data...

Verify host key with pysftp

I am writing a program using pysftp, and it wants to verify the SSH host Key against `C:\Users\JohnCalvin\.ssh\known_hosts`. Using PuTTY, the terminal program is saving it to the Registry `[HKEY_CURRE...

13 Apr at 19:55

How to open Visual Studio Code with admin privileges to make effect of the installed extensions

I have Ubuntu 16.04 and I have to download the C# extension for Visual Studio Code, once I installed it, It doesn't make effect. Then, vscode give me and advice that I should open vscode with admin pr...

23 Apr at 15:0

ServiceStack Razor Intellisense not working in SelfHost

I have ServiceStack.Razor referenced. Following razor file works great: ``` @model ServiceStack.Host.Operation @Model.Name ``` but IntelliSense (and R# code analysis) shows error: Referencing M...

23 May at 12:0

Chrome dev tools fails to show response even the content returned has header Content-Type:text/html; charset=UTF-8

Why does my Chrome developer tools show > Failed to show response data in response when the content returned is of type text/html? What is the alternative to see the returned response in developer too...

Add property to an array of objects

I have an array of objects as shown below ``` Object {Results:Array[2]} Results:Array[2] [0-1] 0:Object id=1 name: "Rick" 1:Object id=2 name:'david' ``` I...

Accessing AspNetRequest

I have a global filters which adds a token to the request.Items collection which subsequent filters can also access. The problem I am having is when trying to get a hold of the request.Items when I a...

12 Aug at 16:37

Value cannot be null. Parameter name: items (in Dropdown List) ASP.NET MVC5

I have problem in my code. I'm using the registration form which comes with MVC5 , I added a field "Role" as a Dropdownlist to assign a role to the user while creating a new user. like in the below im...

1 Jul at 18:34