So now MVC is missing - asp.net-mvc-3

I recently asked a question about ripping models out of the core ASP.net MVC 3 application and putting them into a class library. See question.
Which was then answered by stating I have to re-install MVC.
well after spending all morning doing that, I got everything to work, accept for one thing: System.Web.MVC which is needed for [Compare] before the reinstall, things like web.secutiry, system.componentmodel.dataannotation were not working but they are now.
The only thing not working is Web.MVC is this going to be yet another reinstall?

Related

The Type or namespace name "WinContols" does not exist in the namespace 'Telerik'

I picked up an Desktop Application written in ASP .NET Web Forms that has been developer 5 years ago and the person is not around. I do need to make some changes but I am stuck and getting it running. (I am using VS17)
I google the issue but unfortunately there is so little out there about it and most of them are really old.
I am missing come Telerik References. To be exact here are list of them.
I have tried this one but was not successful. I followed the steps here but got stock at adding
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft.NETFramework\AssemblyFolders\Telerik UI for WinForms Q1 2014]#="C:\Program Files\Telerik\UI for WinForms\Q1 2014\bin\"
My Telerik looks to be installed at
C:\Program Files (x86)\Progress\Telerik UI for ASP.NET AJAX R1 2019
I do not have a bin folder.
And if I go to those bin folders I don't have anything like Telerik.WinControls.****
I am not sure if it is still supported or what I am doing wrong. I have got bunch of other errors but I have a feeling that they are all related to these missing namespaces.
Any help would be much apricated.
EDIT
Based on first comment, I was able to fix that issue. Thanks for that!
I have got this error now. Not quiet clear to me how to approach this. Any thoughts?

Deployed ASP.NET MVC 3.0 only works with runAllManagedModulesForAllRequests="true"

Today I have been battling with a very odd issue. I spend my days developing an ASP.NET MVC3 web application that used to be ASP.NET 4. It not is now half MVC3 and half ASP.NET 4 all running under the same application. This is all fine.
Today we set up a brand new staging environment (Server 2008 R2), deployed the code and ran the app. Only to get HTTP 404 errors when trying to access any MVC page, all aspx pages worked fine. To prove that the issue was environmental we deployed the same code to a new application on the development box and this worked without a hitch.
After spending all day making sure both environments were exactly the same (IIS Role Services, Windows Updates, Installed Applications.. everything) I then noticed on the 404 error page that the Handler for the request was "StaticFile".
After a bit of googling I came across the option in the title
<system.webServer><modules runAllManagedModulesForAllRequests="true"></modules></system.webServer>
This now works, so I assume the modules used for none static routes isn't being called without it (forgive me if I’m being naive).
The thing is, on our development environment, the web.config doesn't have this attribute.
So why does it work without it on one server and not on another. Surely its less efficient to be calling all modules for all requests.
If anyone has any idea's to why this might be happening I would be eternally grateful, as although our staging environment now works, i hate not knowing exactly thy.
thank you!
The first thing I would check is to ensure that the following update is applied to your new brand new staging environment as it may have already been applied to your existing development environment and would explain why one environment is working and one is not: http://support.microsoft.com/kb/980368
For more information about static file routing, the hotfix above and general "how does extensionless routing" work, I recommend reading the following article: http://blogs.msdn.com/b/tmarq/archive/2010/04/01/asp-net-4-0-enables-routing-of-extensionless-urls-without-impacting-static-requests.aspx

Ninject 3.0 MVC kernel scan not working

What happened to kernel.Scan in Ninject 3.0?
kernel.Scan(scanner =>
{
scanner.FromAssembliesMatching("LR.Service.*");
scanner.FromAssembliesMatching("LR.Repository.*");
scanner.BindWithDefaultConventions();
}
Get a build error.
'Ninject.IKernel' does not contain a definition for 'Scan' and no extension method 'Scan' accepting a first argument of type 'Ninject.IKernel'
Been banging my head for hours trying to figure out what to change it to.
Have not seen any good site or posts explaining how to fix this simply.
This all was working perfectly fine, some piece of ninject got upgraded. After hours of figuring out why nothing was working. I did not reinstall it(knowingly), not sure what happened, but now I've reinstalled everything to 3.0, figured it woulf be better, now I'm stuck with a lack of any help.
Will be checking out this later. Think this is what i was looking for.
http://sharpfellows.com/post/Ninject-Auto-registration-is-changing-in-version-3.aspx
UPDATE:
See out my other ninject3 question on auto discovery
Ninject 3.0 MVC kernel.bind error Auto Registration
I ran into a very similar issue recently because of some library documentation incorrectly referenced “AutoLoadModules”. I had a hard time finding out this was actually a thing from the past. And half of the accepted answer is now a dead link. So in case this can be useful to someone else…
There has been, with NInject3, several breaking changes around Ninject.Extensions.Conventions.
So if you are looking for AutoLoadModules, IKernel.Scan and the like, tough luck.
Instead, you are now left with only IKernel.Bind extension method:
_kernel = new StandardKernel();
_kernel.Bind(s=> s.FromAssembliesMatching("LR.Service.*", "LR.Repository.*")
.SelectAllClasses()
.BindDefaultInterface());

Has error handling in MVC changed since 2009?

Google the phrase 'exception handling asp.net mvc3 Application_AcquireRequestState' leads me to:
Error Handling in ASP.NET MVC
But is the best answer of 2 years ago still the best answer? What's changed? There seems to be debate as to what methods to override in the current framework.
Honestly, it looks like a lot of the information in that question is inaccurate (some of the inaccuracies were even pointed out in some of the less voted up answers to that question) and/or outdated.
On my machine, using .NET 4, MVC 3, and IIS 7 HandleErrorAttribute and custom errors work just fine. It's possible that an earlier version of one or more of those components had a bug or something but I'm not in a position to look it up right now.

How to generate database class files with SubSonic 3?

I've been using SubSonic (ActiveRecord) for a couple of years. I've been waiting until a few of the bugs in 3.0 were fixed before downloading the newest release and upgrading my few sites that use SubSonic to 3.0. I'm currently using 2.2 on these sites. I'm working on a new site and wanted to use 3.0 to get a grip on the new updates before going back and updating my existing sites to 3.0.
However, I'm stuck and the old SubSonic site with forums and useful help documents seemed to have all changed and there's nothing there that I can find to answer my basic questions.
How can I generate database class files with SubSonic 3?
In version 2.x, I used the SubCommander tool integrated with Visual Studio and it just took a click of a menu choice to regenerate all of the class files. Now, there's just a single binary .dll file and no information on how to actually generate my class files.
This question is posed for a new database and new web site, but I have several other existing web sites/databases that I'd like to upgrade. Is there a document on how to transition from SubSonic 2 to SubSonic 3? Preferably, a document that takes into consideration existing implementations.
There isn't a document on transitioning from 2 to 3 although I think it'd be a great thing for someone to write. However you should find answers on how to get started from the docs site.
In particular it sounds like you should have a look at:
The 5 minute ActiveRecord demo
Using SubSonic 3 ActiveRecord
ActiveRecord overview
This question should also have answers to some of the pitfalls when get started with SubSonic 3 and t4.

Resources