Error "Unable to load one or more of the requested types" on Telerik ASP.NET MVC Project - piranha-cms

I start with Piranha for a week now, after read the documents and questions here I still can't solve the problem, so I post it here. Please help me. (I'm using Visual studio 2013 Update 2, Piranha 2.2.4)
I tested Piranha on the template project. Everything is fine, now I create a Telerik ASP.NET MVC Q3 2014 project and follow the "Getting started" tutorial to add Piranha to an exist project. I got this error message (I also applied this issue https://github.com/PiranhaCMS/Piranha/issues/277)
http://pastebin.com/1B0WNA2V
When I remove Piranha and Piranha.MVC reference and add references from source project I get this error
http://pastebin.com/17CSziUK
Please help me. Thanks a lot

Piranha CMS uses MEF to import extensions into the framework. There's been issues before that some other projects don't play to nice with MEF, maybe the Telerik stuff you're using has this issue.
There's a fix coming in 2.3 where you can tell the framework to only scan the Piranha assemblies for extensions which would probably fix your issues. I'll see if I can deploy a patch for this!
Regards
HÃ¥kan

Related

I cant find MVC 5 template on vs2017 community

please i have a issue; two issues as a matter of fact. I will upload screen shots to better explain my ordeal.
I am new to MVC and intend to start using MVC 5. the tutorial i have works with MVC5.
I have installed vs2017 community. When i star a new project, i find the "ASP.NET Web Application" template. which i select. after giving my project a name and selecting .NET framework version, the development frameworks that shows up for MVC, WEB FORMS, WEB API all have '4' on them (meaning version 4?). see attached screen shots
when i select MVC and my project folders are scafolded, in the App_start folder, i do not find the IdentityCOnfig.cs file (see attached screen shot)
can anyone please help me with how i can rectify this? i really do not know what is going on and need your help
thanks identityConfig.cs missing
MVC template showing '4'
Need choose User accounts I attached a Image

ASP.NET MVC Website first start

Hello i am currently learning ASP.NET MV4 with Visual Studio 2012, i created a new project, not an empty project, an internet application but anytime i try to run it i keep getting an error.
There is no much else i can say about this, i am just now learning ASP.NET with Razor.
I would very much appreciate some help on this. The error itself seems to be originating from my machine.config file but i'm kinda afraid of opening that file.
This is the error:
http://prntscr.com/3a6ltl
Add MySQL.Web as your reference with NuGet Install-Package MySql.Web.
Or remove the red line from your machine.config if you are not going to use the MySQL Membership provider
It is located here: c:\windows\microsoft.net\framework\v4.0.30319\config\machine.config

The type initializer for 'PayPal.Manager.ConfigManager' threw an exception >Paypal SetExpressCheckout

for some reason I am getting an error "cannot read config file" when trying to set the SetExpressCheckout, I have copied across the web config settings, but for some reason I cannot read them, the error isn't very helpful other than what I have mentioned.
I am using mvc4, and to be honest I have had a problem reading the web.config in the past..
any suggestions would be much appreciated.
Just looked at this... thought it might help someone. Looked at the Inner Exception, saw it was looking for the Log4Net dll... so I gave it to the app and hey ho. It worked.
I had a similar problem and ended up getting both the core and merchant sdk source from GitHub. Change the SpecificVersion=True to False for the log4net reference in the core sdk and re-build it. I also re-targeted both for .net 4.0 so I re-built the merchant sdk with a reference to the new core sdk. Import both of these new dll's to your main project and you should be good to go. I had to change the config in 1 place for the section handler.
<section name="paypal" type="PayPal.Manager.SDKConfigHandler, PayPalCoreSDK"/>
since the Assembly name does not have the underscores if built from source (vs downloaded or added via NuGet).
A bit of explanation:
I was already using log4net version 1.11 before adding the sdk. The sdk was looking specifically for version 1.10. these 2 versions have a different public key, so 'simple' binding redirection won't work. If you have a reference to a different version of log4net (for example using ninject logging extensions requires min version 2.11 so these 2 ninject and the paypal sdk, are incompatible off the shelf).
so the root of the problem was actually caused by the dll version issues but manifested as a Configuration exception. check the inner exceptions and see what you get.
ok, just a quick update, I think it must be something to do with MVC, I have created a new empty asp project, copied the sdk config details across, created the same function call as I have in my mvc code, and called it from a simple asp button... and it works ??
does anyone have any ideas why I am getting an error in an mvc4 project, and not in a simple asp project ??
any help or ideas would be much appreciated.

MVC4 - AuthConfig.cs missing

I am trying to get started with the OpenAuth features of MVC4 as described here:
http://pluralsight.com/training/Player?author=scott-allen&name=mvc4-building-m7-security&mode=live&clip=9&course=mvc4-building
I already did start over again a couple of times in order not to miss anything, but even though I am choosing the right template (Internet Application) there is no AuthConfig.cs.
Nor do I find documentation what to do to get the required tasks done manually.
I am pretty sure this is a pretty dumb question, but maybe I don't find the answer because it is so obvious...
thx
I followed these steps:
Open File/New/Project
Select ASP.NET MVC 4 web Application
Then Select internet Application
Once the project was created there should be a AuthConfig.cs file within App_Start folder
unbelievable.. I used the RC Version of Visual Studio and even though I reinstalled MVC4 from scratch the recent version including the openauth extensions wasn't properly available.
Following the same steps on the regular Visual Studio Installation did the trick...

HttpClient & HttpResponseMessage missing in VS 2010 - its for consume REST services

does anyone know if HttpClient & HttpResponseMessage classes are available in VS 2010? I can't seem to get them to work, do i need to add a reference or using namespace?
These classes were originally from the starter kit for REST for Vs 2008... In vs 2010 its built in i.e. no use for the starter kit...
But how do I cosume them if these classes are missing...
I have searched google for an answer and all i keep finding is examples for vs 2008 i.e. the REST starter kit.
Any help really appreciated
Thanks in advance
Use NuGet to install the WebApi.All:
from VS2010 menubar: View -> Other Windows -> Package Manager Console
from Package Manager Console type in the command Install-Package WebApi.All
in .cs add "using System.Net.Http;"
No they are not. They will be in the next version of the .Net framework. Until then you will need to continue using the ones from the WCF REST Starter kit.
In adition to #RAM's answer, don't forget to include both
System.Net.Http.dll
System.Net.Http.WebRequest.dll
I had this problem with references and had them removed manually in order to clean some unused stuff. I'm mixing MVC with WebApi which sometimes gives me trouble. Anyway, that was it for me. I hope it helps someone.