HTTP Error 500.19 and error code : 0x80070021

Got precisely the same error and came to this question. As @SpaceBison mentioned in comments, this answer describes the solution – https://stackoverflow.com/a/12867753/404099. I spotted it too late and it misses some steps. This is what worked for me: Windows Server 2012, IIS 8.5. Should work for other versions too. Go to server manager, click add roles … Read more

What is the difference between ASP.NET and ASP.NET MVC?

ASP.NET MVC2 web application is based on MVC pattern in order to facilitate unit test, without mocking pipeline asp.net, because it’s very difficult. you don’t have code on Code Behind in order to separate your code graphic and your code functional. With MVC your application become independent from view. you can replace easily technology of … Read more

Html.Partial vs Html.RenderPartial & Html.Action vs Html.RenderAction

Html.Partial returns a String. Html.RenderPartial calls Write internally and returns void. The basic usage is: In the snippet above, both calls will yield the same result. While one can store the output of Html.Partial in a variable or return it from a method, one cannot do this with Html.RenderParti Html.Partial returns a String. Html.RenderPartial calls Write internally and returns void. The basic usage is: In the snippet above, both calls will yield … Read more

Process exists with ExitCode 255

Exit code 255 sounds like a .NET exception within the tool (target application) you’re running. You’ll not be able to catch this exception in your code. I would register a debugger for the target application to see what exception it throws: Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options Create a key with the name of the executable you’re … Read more

Can’t Add View from Controller in VS 2015 : “There was an error running the selected code generator”

Try clearing the ComponentModelCache, the cache will rebuild next time VS is launched. Close Visual Studio Delete everything in this folder C:\Users\ [your users name] \AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache Restart Visual Studio 14.0 is for visual studio 2015. This will work for other versions also.

What is the use of @Html.AntiForgeryToken()?

This is a security feature to help protect your application against cross-site request forgery. Example: Let’s assume you have a register functionality in your web app. You have an AccountController (example.com/account/register) where you expect people to submit their info. Normally before someone posts the registration information needs to visit the actual (example.com/account/register) than submit the form. Let … Read more

jQuery $.cookie is not a function

Here are all the possible problems/solutions I have come across: 1. Download the cookie plugin $.cookie is not a standard jQuery function and the plugin needs to be downloaded here. Make sure to include the appropriate <script> tag where necessary (see next). 2. Include jQuery before the cookie plugin When including the cookie script, make sure to include jQuery … Read more

What is ViewModel in MVC?

A view model represents the data that you want to display on your view/page, whether it be used for static text or for input values (like textboxes and dropdown lists) that can be added to the database (or edited). It is something different than your domain model. It is a model for the view. Let us say that … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)