Data dodania Pytanie
2017-08-01 18:08 Apply 'numerical' sort to odd data structure with multiple decimal points / periods »
I've got an ASP.NET application that's pulling data from an Oracle table into a GridView. I have absolutely no control over the Oracle data, it is wh...
(1) odpowiedzi
2017-08-01 15:08 How to create a method to return 1 or 0 without using conditions? »
I was asked a question in an interview to return 1 if provided 0 and return 0 if provided 1 without using conditions i.e if, ternary etc Just to give...
(15) odpowiedzi
2017-08-01 15:08 Using tag-helper validation for list items »
I've seen this question, which seems to cover exactly what I want to do, but for some reason the solution presented there doesn't work for me. I have...
(1) odpowiedzi
2017-08-01 14:08 SimpleInjector verifies OK, but throws Parameterless constructor error on first request »
I've created a .NET 4.5 WebApi app and I'm attempting to use SimpleInjector. Everything seems to register OK - when I do container.Verify(), my WebAp...
(1) odpowiedzi
2017-08-01 11:08 Constraint length of Text in TextBox by its encoded representation »
I have a TextBox in WPF. I want to restrict the length of the text in the TextBox. There is an easy way to restrict the number of characters by the pr...
(2) odpowiedzi
2017-08-01 11:08 Async controller returning too soon »
The idea here is to run some long running methods concurrently, 5 at a time. When 15 of them are done (3 blocks of 5), I should return from the contro...
(0) odpowiedzi
2017-08-01 01:08 Serialization Failed for application/xml in Webapi »
I have Updated the Question, Please see under Update 1 I am getting an error when my WebAPI tries to return the data in XML format. The JSON format w...
(1) odpowiedzi
2017-07-31 18:07 asp.net-core 2.0 preview2 IdentityServiceOptions no longer exists »
With the lastest build asp.net-core 2.0 preview2 I am now getting an error that IdentityServiceOptions doesn't exist. It was part of the namespace: M...
(1) odpowiedzi
2017-07-31 17:07 Receiving FileActionResult between Services »
I have a route returning a pdf file as a FileActionResult: [HttpGet] [Route("getPdf")] public async Task<IHttpActionResult> GetPdf() { retu...
(0) odpowiedzi
2017-07-31 16:07 Accessing certain instance of a Winform control »
In this program im writing I use a function to create multiple instances of a PictureBox. This is the code: public void serverCard() { //Definit...
(2) odpowiedzi
2017-07-31 15:07 Get the POST data back on Web API »
I have a Web API server that runs in c#. The httpget methods works perfectly, but I am too new to Web Api to get the post to work, and my searches tha...
(3) odpowiedzi
2017-07-31 14:07 Assign Viewbag to js variable throws an exception »
I want to assign viewbag to my javascript variable to compare some value from model <script> var uid = "..."; // this retrieves some varia...
(2) odpowiedzi
2017-07-31 12:07 Pass a Model property as a parameter to an Url.Action »
I'm developing an ASP.NET MVC 5 app with C# and .NET Framework 4.7. I'm having troubles trying to pass parameters with Url.Action. When I use this: ...
(2) odpowiedzi
2017-07-31 09:07 What is the difference between these two variations of collection initialiser expressions? »
I've been using C# for a while, but recently noticed that the behaviour of one of my unit tests changed depending on which variation of collection ini...
(1) odpowiedzi
2017-07-31 08:07 How to restart IIS on remote windows server from windows 7 client machine? »
I am trying to restart iis remotely (Windows Servr 2012) from my local machine (Windows 7). The below command in command line doesn't work to restart ...
(4) odpowiedzi
2017-07-31 04:07 WebApi: Per Request Per Action DbSession using IoC, how? »
Our existing database deployment has a single 'master' and a read-only replica. Using ASP.NET's Web API2 and an IoC container I want to create control...
(1) odpowiedzi
2017-07-30 20:07 How to remove Escape characters from WebAPI »
I have to work with an old product that takes strings as the response from calling outside websites. Its not JSON or XML types. Even though the data...
(2) odpowiedzi
2017-07-30 17:07 Implement IDbConnection in .Net Core »
I have a .Net core web application and .net core library. When using Dapper, I need to pass in a concrete class that inherits from IDbConnection. The ...
(1) odpowiedzi
2017-07-30 16:07 ASP.NET Core Custom Policy Based Authorization - unclear »
OK, Custom Policy Based Authorization in ASP.NET Core. I kinda of understood the idea of this new identity framework, but still not 100% clear what yo...
(2) odpowiedzi
2017-07-30 08:07 How to make a button display to a textbox in cshtml? »
I have a few days to figure out how to retrieve information from a textbox, click a button to save to an array, and then click a button to display it ...
(0) odpowiedzi
2017-07-30 05:07 Is it possible to intersect Request.Headers with another list? »
I am attempting to intersect a list of headers: var validHeaders = Request.Headers.ToArray().Intersect(ValidHeaders.List); Where ValidHeaders are d...
(1) odpowiedzi
2017-07-30 02:07 ASP.NET MVC return View() hangs »
Hello everyone I am trying to fix an annoying issue that I am having with ASP.NET MVC. I have created a new web application and I am noticing that ev...
(0) odpowiedzi
2017-07-30 01:07 Deserializing list objects, properties returning as null »
I'm trying to POST data to an API which should accept a List<UpdatePointHistory>. The size of the list is correct but the properties of the obje...
(1) odpowiedzi
2017-07-29 21:07 Post Array Json to .net core web api controller »
I have this code [HttpPost("[action]")] public IActionResult Add([FromBody] Player player) { PlayerService.Add(player); P...
(1) odpowiedzi
2017-07-29 15:07 Absolute build patch in exeptions on self-contained .Net Core application »
I published and deployed self-contained .Net Core 1.1 application to Debian 8. When i runing my application and throw unhandled exception i see (by Us...
(0) odpowiedzi
2017-07-29 13:07 View in class library - solution explorer show error but compiles without problems »
After a lot of difficulties I managed to get my razor views to build, and IntelliSense to work properly in my C# class library but I'm running into an...
(1) odpowiedzi
2017-07-29 11:07 Console Application with Message Pump »
I'm trying to write a console application (C# .NET) that makes use of un-managed code in a 3rd party DLL. The external assembly makes extensive use o...
(0) odpowiedzi
2017-07-29 08:07 Application Service code in WebAPI »
We are starting a new project and trying to implement some concepts from Domain driven design. We are planning to have following layers: Web Interfa...
(2) odpowiedzi
2017-07-29 07:07 separate first middle last name C# »
Goal: parse name when user enters name, and have a message box display with first middle and last name. Right now it only works when you type in three...
(4) odpowiedzi
2017-07-29 05:07 How do I use C# to get the path to chrome.exe on Windows? »
I want to launch chrome from my automated test framework so that I can test my server-side ASP.NET code. What's the best way to determine the locatio...
(2) odpowiedzi
2017-07-29 04:07 Why this compiler error when mixing C# ValueTuple and dynamic »
When using ValueTuple and dynamic object, I received this weird CS8133 error. I am passing dynamic object as input and taking ValueTuple as output. Wh...
(1) odpowiedzi
2017-07-28 23:07 How to use Rx.Nex extension ForEachAsync with async action »
I have code which streams data down from SQL and writes it to a different store. The code is approximately this: using (var cmd = new SqlCommand("sel...
(3) odpowiedzi
2017-07-28 19:07 What "neutral culture" breaks DateTime.TryParse()? »
I have the following code snippet DateTime date1; CultureInfo neutralCulture = new CultureInfo("fr"); bool isNeutral = neutralCulture.IsNeutralCultur...
(1) odpowiedzi
2017-07-28 19:07 Unable to copy file .exe in Visual Studio 2017 »
I have an asp.net core project that references .NET Framework and I'm using Visual Studio 2017 Enterprise. When I try to build my solution, I came acr...
(1) odpowiedzi
2017-07-28 17:07 Batched Media Upload to Azure Blob Storage through WebApi »
My web app currently allows users to upload media one-at-a-time using the following: var fd = new FormData(document.forms[0]); fd.append("media", blo...
(2) odpowiedzi