MVC mutiple select for List property

I'm fairly new to ASP.Net MVC so forgive me for anything that should just be obvious. I have an object that contains a property that is a list. I only dont know how I should implement this in the create. this is the object: public class TeamMember...
more »

2017-08-11 21:08 (3) Answers

Entity Framework - nested entites are null

I have one-to-many relationship, which I designed using this. and I use Code-First approach. i.e.: public class JobData { [Key] public int JobDataId { get; set; } public int JobId { get; set; } ... public virtual ICollection<...
more »

2017-08-11 15:08 (1) Answers

web api authentication from client side

i have a and a all registration will be done at and login will be done at will only be able to see the UI of the login form. after user login and return a token to user. How to i use the...
more »

2017-08-11 10:08 (2) Answers

How to Bypass Data Layer Using Moq?

I'm learning to test my controllers using Moq, but I'm unsure of how I should bypass the data layer calls from my controller. Say I have a method like below. What approach would I take to test a simple controller like such? [HttpPost] public Action...
more »

2017-08-10 01:08 (2) Answers

Can't pass List<model> from AngularJS to .NET MVC

I know this question has been asked a hundred times on SO, but none of the solutions have helped me. I'm trying to do something that ought to be simple: pass a list of objects from my AngularJS (aka Angular 1) front-end to a .NET MVC controller endpo...
more »

2017-08-09 22:08 (3) Answers

ASP.NET MVC and complex models

I am moving to MVC after years of using WebForms and I have a question about complex pages and how MVC works I understand the controller creates a model which is passed to a view which is then displayed to the user. If we take the example Microsoft...
more »

2017-08-09 07:08 (1) Answers

VaryByParam not working properly in MVC

In my MVC project I am using OutCache for caching a page. And I also use .htaccess so that for 2-3 different url it gets same page. I am using VaryByParam to store page in cache. When I hit the any one url with some query string it store the output ...
more »

2017-08-09 06:08 (0) Answers

Changing the currency sign in mvc

I'm currently new to MVC and I have this [Range(1, 1000)] [DataType(DataType.Currency)] public decimal Price { get; set; } Now, it displays the dollar sign as an output. Is there any way I could change it into Php (Philippine Peso)? ...
more »

2017-08-09 06:08 (1) Answers

MVC Route match based on parameter type

I have a situation where I want the ThisAction controller to look like this : public ActionResult Index()... public ActionResult Index(int programId)... public ActionResult Index(string programKey)... With the goal of a route being set up like so ...
more »

2017-08-08 21:08 (1) Answers

Email error while sending mail from C# code

I am getting the following error The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required How to resolve this? My code: MailMessage mail = new MailMessage(); mail...
more »

2017-08-08 20:08 (1) Answers

Hangfire is not running all my scheduled jobs

I'm using Hangfire 1.5.3 in a ASP.NET MVC project with many scheduled jobs, more than 1.7k. A time ago I detected that some jobs are not running when they suppose to run. If I run any of this scheduled jobs manually they work perfectly. Also, I notic...
more »

2017-08-08 17:08 (0) Answers

stimulsoft report mvc kill session

I use stimulssoft report mvc for generate report in website. the report generate fine in local but when upload site to server and generate a report user's session has destroyed and user redirect to login page.this is report view @using Stimu...
more »

2017-08-08 10:08 (0) Answers

Where is Request.Unvalidated on

I have noticed that in classic ASP.NET MVC there is an Unvalidated property on Request which allows Access to raw values provided by the current request. I cannot identify this property on ASP.NET MVC Core. Is there still a way to Access that infor...
more »

2017-08-07 14:08 (1) Answers

ASP MVC Url Encode double escape sequence

I want to encrypt the Id part of a given url and I used SHA-1 for that. This algorithm convert the id to the following string: NxVhIhrfbZNzyxqtudUZdiv4DdQA9nF1Zn7CueGUiT8=|h1bCRiN5zxexiIhHp+qNEQ0jVh/8fMGiIkeTf30LVdU= Therefore, my final url wou...
more »

2017-08-07 08:08 (1) Answers