Data dodania Pytanie
2017-01-11 15:01 Convert a Short[2] to Int32 in C# »
I have a short array in c# and I need to convert two elements in an Int32. The code I wrote is the following uint pesoparz = (Convert.ToUInt16(values...
(6) odpowiedzi
2017-01-11 14:01 The name <object name> does not exists in the current context »
Most questions are related with old version of ASP.NET MVC. My question is related to latest .NET Core build on Framework 4.6. I created a console app...
(1) odpowiedzi
2017-01-11 12:01 Store List in memory accessible to all users »
So I want to keep a list in memory, with a get and post method. All users must be able to post and read from the same list. I've looked into HttpC...
(2) odpowiedzi
2017-01-11 10:01 Assign value directly to class variable »
I don't know if this is that easy nobody is looking for that, but I didn't found anything... I want to do the following: public class foo { str...
(2) odpowiedzi
2017-01-11 08:01 How to generate new CSRF token per request/Form in ASP .net »
How to generate new CSRF token for each request or for each form in a session. I Have tried below code where it generates CSRF token per session. But ...
(0) odpowiedzi
2017-01-11 06:01 How to generate Asp.net User identity when testing WebApi controllers »
I am using Web API 2. In web api controller I have used GetUserId method to generate user id using Asp.net Identity. I have to write MS unit test for...
(1) odpowiedzi
2017-01-11 05:01 DateTime To Be NULL when the value is DateTime.MinValue or it is Null »
In my console app I am attempting to format to HHmmss -> I am sure it is due to my data types but how can I have this be NULL when NULL and not displa...
(4) odpowiedzi
2017-01-11 02:01 Displaying current username in _Layout view »
I am wanting to display the current ApplicationUsers Firstname+Lastname on my navigation bar on my _Layout view. I've found that you can pass your vie...
(1) odpowiedzi
2017-01-10 21:01 PredicateBuilder.New vs PredicateBuilder.True »
I am using PredicateBuilder to create a search/filter section in my action. Here it is: [HttpPost] public ActionResult Test(int? cty, string...
(1) odpowiedzi
2017-01-10 21:01 How to read values from the querystring with ASP.NET Core? »
I'm building one RESTful API using ASP.NET Core MVC and I want to use querystring parameters to specify filtering and paging on a resource that return...
(3) odpowiedzi
2017-01-10 16:01 Visual Studio Intellisense List is Empty »
When I write a code in a certain project, Intellisense window is popping up but the list is empty (it's like the items are invisible) and when I try t...
(0) odpowiedzi
2017-01-10 15:01 Getting PUT and DELETE verbs in WebAPI2 to work on IIS 8.5 »
I am attempting to publish code to my company test web server and I'm getting a multitude of errors returned from IIS when attempting to call any meth...
(2) odpowiedzi
2017-01-10 13:01 What is C# order of execution in function call with ref? »
So I have just caught this bug in our code: class A { public int a; } var x = new A(); x.a = 1; A qwe(ref A t) { t = new A(); t.a = 2; ...
(1) odpowiedzi
2017-01-10 13:01 Passing Custom Object from VB6 to Web-APi and get returned xml message »
I am having a problem passing a custom object from vb6 to a web-api. In debug mode I can see that the correct Action method is being called in the Web...
(0) odpowiedzi
2017-01-10 12:01 Using Sections from Layout page - not getting displayed »
I have defined a Section in my _Layout.cshtml page. @RenderSection("xx", false) Thereafter, I am trying to display this section on Create.cshtml. T...
(0) odpowiedzi
2017-01-10 08:01 C# Implicit Operator not working with reflection »
I am working on a requirement where in I need to check my ASP.NET Model Property for a value 000000.If the value is 000000 then it should be displayed...
(2) odpowiedzi
2017-01-09 21:01 ASP.NET Core - Error handling send email and present error page »
I have the following code in my startup.cs to email any errors in the application: app.UseExceptionHandler( options => { //options...
(1) odpowiedzi
2017-01-09 21:01 Calling an API action from another API, reading the json response and adding some extra properties to it »
I have a .netcore web api(localApi) that calls another web api(remoteApi). remoteApi returns json and my goal is to add a new property to that json an...
(1) odpowiedzi
2017-01-09 18:01 Authentication not working in subdirectories of Wordpress blog installed in IIS8.5 »
I have a Wordpress blog installed in a IIS 8.5 machine and I'm using forms authentication using the following: <authentication mode="Forms"> ...
(1) odpowiedzi
2017-01-09 15:01 C#- ASP.NET ViewModel have null reference but have values »
I have a problem with render View with Razor. I have a interesting warnings : An exception of type 'System.NullReferenceException' occurred in Ap...
(1) odpowiedzi
2017-01-09 14:01 SQL > Linq to Sql, SQL Query works, Linq to SQL returns empty data set »
I have this SQL query which works: select sum(dbos.Points) as Points, dboseasons.Year from dbo.StatLines dbos inner join dbo.Games dbog on d...
(1) odpowiedzi
2017-01-09 14:01 Unable to get Selenium Grid 3.0.1 running on multiple instances of Chrome »
I have recently moved from Selenium Grid 2.48 to 3.0.1 but I am having problems getting tests to run on multiple instances of Chrome. It appears that...
(1) odpowiedzi
2017-01-09 13:01 Link to related data in Group Header Razor View »
Hi I have the following list view grouped by a Name so that I can display that name in the group header. I want to be able to put a link next to the ...
(0) odpowiedzi
2017-01-09 10:01 Sonar analysis of Razor .cshtml files »
Is there any way to analysis Razor .cshtml files that are largely made of just html? I have many pages which are just vanilla html but have the file ...
(0) odpowiedzi
2017-01-09 09:01 How to debug "Not enough storage is available to process this command" »
We've started to experience Not enough storage available to process this command. The application is WPF, the exception starts to pop up after some ho...
(2) odpowiedzi
2017-01-09 09:01 Calculating bitwise inversion of char »
I am trying to reverse engineering a serial port device that uses hdlc for its packet format.Based on the documentation, the packet should contain a b...
(3) odpowiedzi
2017-01-09 09:01 Using Protobuf in .Net Core with .proto files »
I'm looking into using Protobuf to send data between my Microservices, and I'm using the C# support in Google.ProtoBuf and not ProtoBuf-Net, since I w...
(1) odpowiedzi
2017-01-09 07:01 Dapper multi-mapping Async extension »
Below is my extension for multi mapping (one to many relationship) in dapper public static IEnumerable<TParent> QueryParentChild<TParent, T...
(1) odpowiedzi
2017-01-08 22:01 Check whether array is in another array, but in order and elements can repeat »
So I need to check whether an array contains elements of another array but in the same order. Both arrays are sorted and the elements can be duplicate...
(3) odpowiedzi
2017-01-08 20:01 ListBox not updated via DataSource »
I have a ListBox which has its DataSource set to a BindingList. BindingList<PairDiff> pairList = new BindingList<PairDiff>(); pairList.Ra...
(2) odpowiedzi
2017-01-08 18:01 Oracle Stored Procedure with User Defined Type in C# »
I am trying to use a stored procedure for variable data refcursor; execute MyPkg(to_date('2010-08-11','yyyy-MM-dd'), TEXT_ARRAY('tempa','tempb'), :d...
(1) odpowiedzi
2017-01-08 18:01 How to use multiple GET action in a WebApi? »
Well I am actually trying to learn the WebApi and suppose if i have a scenario where i have two get methods like this CONTROLLER public class Employ...
(2) odpowiedzi
2017-01-08 17:01 Reusing The dbcontext »
I have seperated my business logic classes from the controllers so that controllers contain as little business logic as possible. But since I want to ...
(1) odpowiedzi
2017-01-08 16:01 Must I Initialize derived variables by constructor? »
Is it possible to initialize the variable like this: class A { public int variable; } class B : A { variable = 123; } instead of using contructor l...
(1) odpowiedzi
2017-01-08 15:01 Model emptied after returning view »
I'm new to ASP and programing in general, so I'm probably doing something fundamentally wrong but here it goes: Everytime I return a View in my contro...
(2) odpowiedzi