Data dodania Pytanie
2017-12-02 15:12 FromBody does not bind Inherited Id »
The customer class is inheriting from Entity in which the "Id" property is available. But whenever I post a JSON object to my controller all the prope...
(1) odpowiedzi
2017-12-02 14:12 The resource cannot be find - .net web api »
I've been trying for a while to make an rest api endpoint. However, when I test, it says that "The resource cannot be found." in the web browser. Thi...
(1) odpowiedzi
2017-12-02 13:12 C# async/await progress reporting is not in expected order »
I am experimenting with async/await and progress reporting and therefore have written an async file copy method that reports progress after every copi...
(1) odpowiedzi
2017-12-02 09:12 Executing the foreach block at the same time for all items? »
I have this foreach loop that changes the Image's Source for four images (in a Xamarin Forms app): int i = 0; Device.StartTimer(TimeSpan....
(0) odpowiedzi
2017-12-02 08:12 Exporting checkbox data to excel using jQuery datatables »
I have an <ASP:GridView> with few columns with boolean values returned from SQL Server. I am using datatables plugin looks good but when I expor...
(1) odpowiedzi
2017-12-02 05:12 How do I add Jwt authentication from IdentityServer4 and Auth0 in an ASP.NET Core 2.0 web api? »
We have need to utilize JWT tokens coming from IdentityServer4 typically, but also from Auth0 for more complex SSO scenarios to authorize access to an...
(1) odpowiedzi
2017-12-02 03:12 Best Practices: Adding a CLI to Existing Windows Service in .NET / Core »
I'm wondering if anyone has any recommendations for the best way to implement a command line interface to an existing Windows service. Ideally, the ...
(1) odpowiedzi
2017-12-02 00:12 Binding an appsettings.json section to a list of POCO »
Given these two classes public class SerilogSubLoggerConfigurations { public List<SerilogSubLoggerConfiguration> SerilogConfigurations { ge...
(1) odpowiedzi
2017-12-01 20:12 Validating HttpRequestMessage body »
I have a web api and I wanted to validate the request coming in. Currently I have this in my web api controller: public HttpResponseMessage GetSomet...
(1) odpowiedzi
2017-12-01 18:12 Can I use Javascript (with @ syntax) from partial into the main view? »
Apologies if I'm using the wrong terminology, I'm fairly new to this technology. I have a view which we'll call MainView.cshtml: <div> @Rend...
(2) odpowiedzi
2017-12-01 14:12 Null Check Operator still returns a null value »
I'm trying to get all of the generic service from my dependency injector who implement a type protected List<ServiceDescriptor> GetGenericSer...
(2) odpowiedzi
2017-12-01 11:12 Why is code behavior different in release & debug mode? »
Consider the following code: private static void Main(string[] args) { var ar = new double[] { 100 }; FillTo(ref ar, 5); ...
(2) odpowiedzi
2017-12-01 10:12 Shooting a projectile towards mouse location in Unity »
I'm in the process of creating a 2D game where the player needs to click to shoot. Wherever the mouse cursor is on the screen is the direction to whic...
(1) odpowiedzi
2017-12-01 09:12 Web api return values for async methods »
I'm a bit confused with HttpResponseMessage and Task<HttpResponseMessage>. If I'm using the HttpClient method PostAsync() to post data I need t...
(1) odpowiedzi
2017-12-01 07:12 How to debug dotnet.exe when it doesn't find a DLL? »
I have an ASP.NET MVC Core 2.0 application, and when I build it, the output DLL files are created in bin\Debug\netcoreapp2.0. When I publish it using...
(0) odpowiedzi
2017-12-01 05:12 Why does this fail when I don't use the ToList method in a for loop? »
I am wondering why if I change the line "sub = sub.SelectMany(x => x.Next(i)).ToList();" to "sub = sub.SelectMany(x => x.Next(i));" I...
(1) odpowiedzi
2017-12-01 01:12 Validator ignoring MaxLength attributes »
Problem: I am trying to manually Validate some c# objects, and the Validator is ignoring string length related validations. Test Case: extending this...
(1) odpowiedzi
2017-12-01 00:12 .NET Console SignalR Client vs .NET Core SignalR Server »
I need to exchange data between a .NET Console and an ASP.NET Core 2.0 applications. The second already hosts a SignalR server: public class MyHub : ...
(0) odpowiedzi
2017-11-30 23:11 Calling C++ Code with a struct from C# »
I was given a third party library that wraps unmanaged C++ code into a C# api, one of the functions has a parameter that appears to be a struct from t...
(1) odpowiedzi
2017-11-30 22:11 Return error code instead of message in ASP.NET Identity API »
I am building a ASP.NET Web API endpoint for creating managing users. This is a REST interface and I'd like to return error codes when something goes ...
(0) odpowiedzi
2017-11-30 18:11 How to stop on the Sign Up Form when web page performs Postback? »
I'm working on my final year project. In which: I have Login and Signup forms on one page (WebForm): When user click on anchor Sign Up the DropDown ...
(2) odpowiedzi
2017-11-30 16:11 MVC AddJsonOptions ReferenceLoopHandling configuration not applied »
I have an ASP.NET Core 2 API C# project used by another ASP.NET Core 2 / Angular 2 application. I've configured the API project MVC service JSON optio...
(1) odpowiedzi
2017-11-30 16:11 C# ASP.NET Core Serilog add class name and method to log »
I recently added logging to my ASP.Net Core project. Currently the log writes to a .txt file in this format: {Timestamp:yyyy-MM-dd HH:mm:ss.fff zz...
(2) odpowiedzi
2017-11-30 16:11 C# Web API Route Prefix »
I have a web api that runs in a WPF C# application. I have used Owin to implement it. If I send request by using /api prefix then it works as I expect...
(2) odpowiedzi
2017-11-30 08:11 VS debug issue, who can help me to explain this below? »
A piece of C# code var isTrue = (new List<int>{1,2,3} is IEnumerable<object>); I got result false in code execution, but when I copy t...
(1) odpowiedzi
2017-11-30 05:11 Could not load type mvc c# »
Has anyone experienced an issue which the view could not load a type from the assembly since you've moved the type to a different namespace on the sam...
(0) odpowiedzi
2017-11-30 03:11 Trouble converting Serilog Configuration code line to json configuration »
I found a post where the blogger explained how to filter by LogEvent level to a separate file for Serilog configuration. I am doing all my Serilog con...
(1) odpowiedzi
2017-11-30 01:11 Why is this loop intentionally not optimized? »
https://github.com/ASP-NET-MVC/aspnetwebstack/blob/master/src/System.Web.Helpers/Crypto.cs#L159 // Compares two byte arrays for equality. The method ...
(1) odpowiedzi
2017-11-29 23:11 Correct way of streaming a CSV of unknown size from memory »
I have a database that has a table with just over 2 million records of about 20 columns. The user is able to query the database and limit the number o...
(0) odpowiedzi
2017-11-29 19:11 Adding dependency as DLL or adding as a project »
We have an application written in asp.net mvc. Now we have written common db context & entities module (2 projects/class library) which are requ...
(3) odpowiedzi
2017-11-29 18:11 Pass raw html for button into column of jquery datatable from controller »
I have a controller that returns a generic DataTable to a View. I want to display this table as a jquery datatable. One of the columns has an html b...
(1) odpowiedzi
2017-11-29 15:11 Executing multiple SQL commands INSERT and SELECT using SQL Reader and Response.Write »
Response.Write("text"); is rendering on my page load but when I click my button, it does not print. I am trying to carry out two INSERT commands and ...
(1) odpowiedzi
2017-11-29 11:11 Instances of scoped services between subsequent requests »
After learning about scoped/singleton/transient services here, I'm trying to understand why this code doesn't work. It's written in ASP.NET Core 2. s...
(0) odpowiedzi
2017-11-29 09:11 WPF locking workstation programmatically »
I am trying to automate workstation locking after the occurence of a WPF event. The solution is supposed to work for both x64 and x86 architectures. ...
(1) odpowiedzi
2017-11-29 07:11 Split string on basis of "/" »
I have a string: string s = "1/09/2017 12:00:00 AM"; Output I want to show is 1/09/17 (basically short date). And if string s ="30/09/2017 12...
(5) odpowiedzi