How do I use my own database with SimpleMembership and WebSecurity? What is MVC4 security all about?

See the summaries below each quote for a quick answer, and the paragraphs for detail. Also see the References section at the end for the authoritative sources. Summaries 1.What is SimpleMembership/SimpleMembershipProvider (WebMatrix.WebData) and what is it/are they responsible for? SimpleMembership (a term that covers both the SimpleMembershipProvider and SimpleRoleProvider) is responsible for providing a clean … Read more

Angular.js and ASP.NET MVC 4 [closed]

my 2 cents worth. preamble – i have worked with both angular and knockout. I’m on my 3rd non trivial front end built with a MVVM/MVC lib. I started with knockout because its MVVM is very similar to the wpf/silverlight mechanics. And it works well. The tutorials and documentation are top notch. All your coders … Read more

Could not load file or assembly System.Net.Http, Version=4.0.0.0 with ASP.NET (MVC 4) Web API OData Prerelease

Visual Studio 2013 has a new feature to take care of this. When you build the app, you should see warnings about different versions of an assembly being referenced. Double click the warning to add assembly binding redirects to the web.config. See http://msdn.microsoft.com/en-us/library/2fc472t2.aspx for more details. jeff.eynon notes below that you need to have the … Read more

asp.net webapi publish – xml files not copy

I had a similar issue, for the me the answer was a bit of a “doh!” moment. In the project settings, I had only enabled the XML documentation file under the Debug configuration, and not under Release. I was deploying with Release, and so the XML documentation was not actually getting generated. So the fix … Read more

What effect does the new precompile during publishing option have on MVC4 applications?

Using the ASP.NET precompiler can have the following impact on your MVC app: If you have anything in App_Code, it will be precompiled into a DLL before deployment. Without precompiling, this would happen on the fly by the ASP.NET runtime. If you choose the option to not make your pages updateable (i.e. uncheck the first … Read more

The view or its master was not found or no view engine supports the searched locations

Be careful if your model type is String because the second parameter of View(string, string) is masterName, not model. You may need to call the overload with object(model) as the second parameter: Not correct : protected ActionResult ShowMessageResult(string msg) { return View(“Message”,msg); } Correct : protected ActionResult ShowMessageResult(string msg) { return View(“Message”,(object)msg); } OR (provided … Read more

unobtrusive validation not working with dynamic content

If you try to parse a form that is already parsed it won’t update What you could do when you add dynamic element to the form is either You could remove the form’s validation and re validate it like this: var form = $(formSelector) .removeData(“validator”) /* added by the raw jquery.validate plugin */ .removeData(“unobtrusiveValidation”); /* … Read more

Enable bundling and minification in debug mode in ASP.NET MVC 4

You can enable this by adding BundleTable.EnableOptimizations = true; in your RegisterBundles method (BundleConfig class in the App_Start folder). check http://www.asp.net/mvc/tutorials/mvc-4/bundling-and-minification for more info You could also change your web.config: <system.web> <compilation debug=”false” /> </system.web> But this would disable debug mode entirely so I would recommend the first option. Finally, to get the best of … Read more