Data dodania Pytanie
2017-10-06 16:10 Adding Rich Cards data to my dotnet application cause it to crash »
I am trying to add Rich Cards to my dotnet application. So, if I try to add this: <script type="application/ld+json"> { "@context": "http:/...
(1) odpowiedzi
2017-10-06 16:10 Chrome appending -- to end of filename »
string fileName = "test.txt"; byte[] docBytes = getDocumentBytes(); return File(docBytes, System.Net.Mime.MediaTypeNames.Application.Octet, fileName)...
(1) odpowiedzi
2017-10-06 15:10 Strange deadlock situation in ASP.NET Core Controller »
In my ASP.NET Core application I have a a seemingly very simple action. It awaits some value from an asynchronous method and then returns it as an OK-...
(1) odpowiedzi
2017-10-06 15:10 Should an interface expose properties of an object or the object itself »
I was wondering, what is the best practice for designing an interface with a specific intent? For example, say I want to implement an interface to mar...
(1) odpowiedzi
2017-10-06 12:10 Single .NET Core Razor C# functions in all Views »
I know there is a way to ad c# functions inside a view and call them by using @functions{ ... } method inside my view, but is there a way to create a ...
(2) odpowiedzi
2017-10-06 12:10 The underlying provider failed on Open iis »
I am working on asp.net web api, when I run my project on micro soft visual studio built in server every thing work fine, but when i host it on local ...
(2) odpowiedzi
2017-10-06 11:10 Can I teach ReSharper a custom null check? »
ReSharper is clever enough to know that a string.Format requires a not-null format argument so it warns me about it when I simply write _message = st...
(1) odpowiedzi
2017-10-06 10:10 Accessing MVC DI Service inside other services »
I am constructing a HealthAPI Class Library Which provides a list of statistics to our HealthMonitor Service. I have successfully got this working, T...
(2) odpowiedzi
2017-10-06 08:10 Share connection string between many applications »
I'm developing a solution with C# and .NET Framework 4.7. The solution has a ASP.NET Web MVC application and a Windows Service. Both connect to the s...
(1) odpowiedzi
2017-10-05 22:10 Calling api function in c# »
I'm trying to make a call to a url to get a json object returned. I have an example in coldfusion i am trying to use to base it off of. Test For IPC...
(1) odpowiedzi
2017-10-05 21:10 Invalid Switch syntax builds successfully? »
Could someone please help enlighten me? I went to check-in some changes to TFS and my check-in was rejected. It prompted me to take a look at a swi...
(1) odpowiedzi
2017-10-05 20:10 new operator returning null - C# »
I have this code: public ObjectModel.Path GetPath(int pathid) { var path = this.DbContext.Paths.Find(pathid); var app = GetApplicationById(pa...
(1) odpowiedzi
2017-10-05 19:10 Is this considered reflection? »
I had a job interview today and I was asked, if the code below is a good example/case of using reflection in C#: public abstract class Level{ pu...
(3) odpowiedzi
2017-10-05 18:10 Consuming asp.net web.api json not working »
I'm trying to consume my web api which returns JSON format from my asp.net mvc web application. As my JSON format has root node (the way i filled with...
(1) odpowiedzi
2017-10-05 17:10 Html.RadioButtonFor check box doesn't work »
I tried different scenarios to make the first radio button ("Yes") to be checked by default, but none of them seems to be working. I know that i can s...
(0) odpowiedzi
2017-10-05 16:10 Ajax.BeginForm with 4 arguments not finding the action method »
I have a weird case and I wanted your enlightenment. I have two controllers. One Person Controller for general Person use action methods and one Candi...
(1) odpowiedzi
2017-10-05 16:10 MVC app only rendering the _Layout.cshtml »
I'm currently facing an issue with an MVC application I'm busy with, when testing the site in a local environment it shows the login page like it's su...
(0) odpowiedzi
2017-10-04 23:10 In what situation might Text be different from ValueText »
In Roslyn (Microsoft.CodeAnalysis), SyntaxTokens have Text and ValueText fields. In all of the situations that I've observed so far, these two values ...
(1) odpowiedzi
2017-10-04 19:10 DropDownListFor using ViewBag of SelectListItems »
Controller for partial view public ActionResult _AddRedirect() { var domains = (from d in DB.Tokens orderby d.Domain ...
(2) odpowiedzi
2017-10-04 18:10 Is there a foreach construct in TypeScript similar to the C# implementation? »
I really like using the foreach construct for "for loops" in C#. I think it's very clean, efficient and readable. Is there a similar construct in ...
(1) odpowiedzi
2017-10-04 14:10 Why converting big TIFF to JPEG has generic error? »
I used this code for converting tiff to png before: using (MemoryStream inStream = new MemoryStream(tiffBytes)) { using (MemoryStream outStrea...
(0) odpowiedzi
2017-10-04 10:10 'This is the 'bait'. You probably need to add one of the SQLitePCLRaw.bundle_* nuget packages »
I am using Entity Framework Core 2 in my application using SQLite as my database provider. I have added references to the following in my project: ...
(1) odpowiedzi
2017-10-04 10:10 Passing a multi-line string to Controller to be encrypted and passed back to a Razor view »
My application should be a very simple ASP.Net MVC interface that gets a multi-line string from the user, and return it encrypted upon submit. The pro...
(1) odpowiedzi
2017-10-04 10:10 Is it possible to return different models in an ODataController? »
IN a OData v4 Controller, is it possible to return different models for the Get() and the Get([FromIDataUri] key)? I like to use ViewModels, and when...
(3) odpowiedzi
2017-10-04 09:10 collection of key-value pairs where key depends on value »
I have a class MyClass class MyClass { public string Name { get; set; } // is unique among all instances public SomeClass Data { get; set; } ...
(2) odpowiedzi
2017-10-04 04:10 ASP.NET Exception-Handling: ExceptionFilterAttribute vs Overwrite ExecuteAsync »
In ASP.NET, Microsoft suggests us to use ExceptionFilterAttribute to handling exceptions. Exception Filters But I think we have other ways to handlin...
(1) odpowiedzi
2017-10-03 21:10 Model Binder null on List<object> sometimes »
I have a view model,and one of the properties of the view model is a an object called Profile. One of the properties of Profile is a list of another o...
(1) odpowiedzi
2017-10-03 19:10 How to filter entities using queries in C#? »
I need to create functionality that would allow users to filter entities using literal queries (i.e. age gt 20 and name eq 'john'). Is there a provide...
(1) odpowiedzi
2017-10-03 18:10 Downloading byte[] of generated pdf using nodeservices in Asp.net Core 1.1 »
i'm trying to download a nodeServices generated pdf file that is in the form of byte array. here is my original code: [HttpGet] [Route("[action]/{app...
(1) odpowiedzi
2017-10-03 15:10 foreach loop where order needs to be specific »
I am trying to go through an array of shipping methods, and then set them in a table as an option. The problem is that my shipping methods are scrambl...
(2) odpowiedzi
2017-10-03 12:10 Asp .NET Web Api + MVC + Angular 2 - action with two parameters »
I have an ASP .NET MVC application with Angular 2. I added a WebApi Controller and try to communicate from angular service with it, but it does not ac...
(1) odpowiedzi
2017-10-03 11:10 Explicitly marking derived class as implementing interface of base class »
interface IBase { string Name { get; } } class Base : IBase { public Base() => this.Name = "Base"; public string Name { get; } } clas...
(2) odpowiedzi
2017-10-03 11:10 Where are DB calls being processed? »
I've created a dynamic paging model to present data in pages for my projects. In my controller I have two calls for the DB : public async Task&l...
(0) odpowiedzi
2017-10-03 10:10 Render a Razor Page to string »
Problem: I need to render a Razor Page partial to a string. Why I want this: I want to create a controller action that responds with JSON containin...
(1) odpowiedzi
2017-10-03 07:10 WebApi - Sent Guid taken as a new Guid »
I have an ApiController class with a method accepting a complex object. public class SampleController : ApiController { [Route("api/Sample/")]...
(1) odpowiedzi