Publish ASP.NET 5 app from Visual Studio 2015 for linux
Hello,I want to publish my ASP.NET 5 app for linux target. In visual studio 2015 I have following target options:How can I publish my app for linux target? Is this possible?
View ArticleAddSingleton as a monitoring process in IIS
We would like to write a service that waiting for a notifications from 3rd party software. After receiving a notification it should execute some code.We would like to avoid using Windows Service/WCF...
View ArticleAngular 2 http.put() not calling Controller
I put a breakpoint on the Controller and http.put() in updateItem() isn't calling the Controller.data.service.tsimport { Injectable, Inject } from 'angular2/core'; import { Http, Response, Headers }...
View ArticleEF 6 Database First Approach multiple connection string issue
Hi !! We use database first approach. We have about 3 different database and each with multiple DbContext. Managing connection string per environment for each DbContext is a headache. Is there a...
View ArticleIs Owin supported with MVC6
I am migrating an old .net web application to MVC6. The old code already has the database designed with roles/permissions and it is working fine, so I do not want to use default MVC6 authentication.I...
View ArticleOutputCache, JsonRequestBehavior in MVC 6
Hi there,I'm trying out a demo project originally made for MVC 5. It has a controller with an Action method like this:[OutputCache(Location = OutputCacheLocation.None)] public ActionResult Comments() {...
View ArticleASP.NET 5 MVC 6 Angular 2 Post returns 500 Internal Server Error
Hi,Im trying to post a query to my web server but receieve a 500 Internal Server Error without calling the Controller, which never is initialized. I need some help figuring out what I'm doing wrong. I...
View ArticleSystem.IO.FileNotFoundException: Could not load file or assembly...
I do not get any errors when running on my local dev environment. But when the code is pushed to a production server, I get the following error. How can I resolve this issue? How can I ensure...
View ArticleAngular JS Dynamic Page Title in MVC 6 application
I use angular js in my application and I want to manage page titles similar like ViewData["title"] in MVC 6, I have 1 master view Index and several partial views as child pages of index.any idea?
View ArticleHttpCookie to Session Cookie
Would like to convert the following lines of code:private const string USERCOOKIENAME = "mysite.user";protected virtual HttpCookie GetUserCookie(){ if (_httpContext == null || _httpContext.Request ==...
View ArticleBundled script is not working
I am using d3.js which is a plugin to display Graph digrams. In BundleConfig.cs I am registering the script to bundle as below. With debug=true it doesn't bundle the js and dashboard (screen where I am...
View ArticleUpdating dependent Collection in EF 7/EF Core
Just wondering if you could advise on the best way to update a list of dependent objects in the database in EF7.Using an Order –> Products example: Lets say there are 5 products to choose from. A...
View ArticleResolve dependency injection with default rule automatically
Generally, We inject the dependency like the below for each class.services.AddTransient<IHttpClientProvider, HttpClientProvider>();If have huge classes, do we still need to add huge lines(each...
View ArticleMVC5 + dropdownlist selectitems issue
Hi,I would like to fill the dropdownboxFor list items in the view from a string with values, stored in one field from the model. Hope this makes sense.The model of the view@model...
View ArticleCommon way to register catching the exception of Web API
Currently, for each Web API, I catch the exception like the below: try { //My code return Ok(); } catch (Exception ex) { return new ExceptionResult(ex, true); } I am thinking if any other common way to...
View Articlescanning an image
Hi,I want to scan a document on asp.netI tried WIA but I got exception when I go to deployded website.Basically I want a webform and a button click to scan an upload a document.Regards,Mazyar seyedi
View ArticleCan't impersonate windows end user with MVC 6 application
Hi all,I need to get the end user windows Id to do a query on a database in a MVC 6 application.For this, I've set the authentication mode = windows and impersonate = true in my web.config as shown...
View ArticleHow to generate validation attributes for custom tag helper
I am creating a tag helper for a composite, custom dropdown list:[HtmlTargetElement("mwrdropdown")] public class MwrDropDownTagHelper : TagHelper { public string AspFor { get; set; } public...
View ArticleUsing Remote Validation wit ASP.NET Core
Hello,I am trying to create a Remote validation as follows: [Remote("CheckValue", "Validate", ErrorMessage="Value is not valid")] public string Value { get; set; }I am using ASP.NET Core (ASP.NET 5)...
View ArticlePrivate NuGet servers with Docker containers?
So I'm trying to deploy my project as a docker image.When I run 'docker build' it builds the container image, but then as its finishing up it executes 'dnu restore'. As its going through the...
View Article