Could not load type 'Telerik.Sitefinity.Mvc.Proxy.MvcControllerProxy' when installing on Sitefinity 8.1.5800 - babaganoush-sitefinity

I am trying to install Babaganoush on Sitefinity 8.1.5800 which has assembly redirects in place. I am getting the exception below and would like to know if anyone else has seen this?
Could not load type 'Telerik.Sitefinity.Mvc.Proxy.MvcControllerProxy' from assembly 'Telerik.Sitefinity, Version=8.1.5800.0, Culture=neutral, PublicKeyToken=b28c218413bdf563'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.TypeLoadException: Could not load type 'Telerik.Sitefinity.Mvc.Proxy.MvcControllerProxy' from assembly 'Telerik.Sitefinity, Version=8.1.5800.0, Culture=neutral, PublicKeyToken=b28c218413bdf563'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[TypeLoadException: Could not load type 'Telerik.Sitefinity.Mvc.Proxy.MvcControllerProxy' from assembly 'Telerik.Sitefinity, Version=8.1.5800.0, Culture=neutral, PublicKeyToken=b28c218413bdf563'.]
Babaganoush.Sitefinity.Utilities.ConfigHelper.RegisterToolboxWidget(String title, String description, String cssClass, String resourceClassId, String layoutTemplate, String sectionName, Nullable1 sectionOrdinal, ToolboxType toolboxType) +0
Babaganoush.Sitefinity.Mvc.Startup.OnBootstrapperInitialized(Object sender, ExecutedEventArgs e) +704
System.EventHandler1.Invoke(Object sender, TEventArgs e) +0
Telerik.Sitefinity.Abstractions.Bootstrapper.Bootstrap() +906
Telerik.Sitefinity.Web.SitefinityHttpModule.Init(HttpApplication context) +400
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +530
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +304
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +404
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +475
[HttpException (0x80004005): Could not load type 'Telerik.Sitefinity.Mvc.Proxy.MvcControllerProxy' from assembly 'Telerik.Sitefinity, Version=8.1.5800.0, Culture=neutral, PublicKeyToken=b28c218413bdf563'.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12618692
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12458309
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34249

The MvcControllerProxy type is now in the Telerik.Sitefinity.Mvc assembly.
You'll probably have to wait for the guys at Falafel to release a version that targets Sitefinity 8.1

Related

Could not load type 'Microsoft.EntityFrameworkCore.Query.RelationalQueryContextFactory' Z.EntityFramework.Plus.EFCore

I have written a simple query which was working when I was using .net core 2.1 (I have used Z.EntityFramework.Plus.EFCore)
int cnt = adminDb.Role.Where(c => c.RoleId == roleId).Delete();
After upgrading to .net core 3.1 I am getting the error below.
Could not load type 'Microsoft.EntityFrameworkCore.Query.RelationalQueryContextFactory' from assembly 'Microsoft.EntityFrameworkCore.Relational, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
Source : Z.EntityFramework.Plus.EFCore
StackTrace : at Z.EntityFramework.Plus.InternalExtensions.GetDbContext[T](IQueryable`1 source)
at Z.EntityFramework.Plus.BatchDelete.Execute[T](IQueryable`1 query)
at Z.EntityFramework.Plus.BatchDeleteExtensions.Delete[T](IQueryable`1 query, Action`1 batchDeleteBuilder)
at Z.EntityFramework.Plus.BatchDeleteExtensions.Delete[T](IQueryable`1 query)
at Assyst.Administration.API.Controllers.RoleMenuMappingController.SavePermission(Nullable`1 roleMenuMasterId, IList`1 roleMenu) in E:\Source\Main_Projects\Application\PanERP-7\Error\Administration\Admin\Controllers\RoleMenuMappingController.cs:line 365
I am receiving this error and I'm not sure what it means?

Method 'get_Info' in type 'Microsoft.EntityFrameworkCore.SqlServer.Infrastructure.Internal.SqlServerOptionsExtension

I upgraded my web api from .netcore2.1 to 3.1 and updated all nuget packages to their latest version.
Now my api throws the following error
{"StatusCode":500,"ErrorMessage":"Internal server error: Method 'get_Info' in type 'Microsoft.EntityFrameworkCore.SqlServer.Infrastructure.Internal.SqlServerOptionsExtension'
from assembly 'Microsoft.EntityFrameworkCore.SqlServer, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' does not have an implementation
Stack: at Microsoft.EntityFrameworkCore.SqlServerDbContextOptionsExtensions.UseSqlServer
at MyApi3.Startup.<ConfigureServices>b__4_0(DbContextOptionsBuilder options) in D:\\a\\1\\s\\MyApi3\\Startup.cs:line 58\
at Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.<>c__DisplayClass1_0`2.<AddDbContext>b__0(IServiceProvider p, DbContextOptionsBuilder b)
at Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.CreateDbContextOptions[TContext](IServiceProvider applicationServiceProvider, Action`2 optionsAction)
at Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.<>c__DisplayClass10_0`1.<AddCoreServices>b__0(IServiceProvider p)
at ResolveService(ILEmitResolverBuilderRuntimeContext , ServiceProviderEngineScope )
at ResolveService(ILEmitResolverBuilderRuntimeContext , ServiceProviderEngineScope )
at ResolveService(ILEmitResolverBuilderRuntimeContext , ServiceProviderEngineScope )
at ResolveService(ILEmitResolverBuilderRuntimeContext , ServiceProviderEngineScope )
at ResolveService(ILEmitResolverBuilderRuntimeContext , ServiceProviderEngineScope )
at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.GetService(IServiceProvider sp, Type type, Type requiredBy, Boolean isDefaultParameterRequired)\r\n at lambda_method(Closure , IServiceProvider , Object[]
at Microsoft.AspNetCore.Mvc.Controllers.ControllerActivatorProvider.<>c__DisplayClass4_0.<CreateActivator>b__0(ControllerContext controllerContext)
at Microsoft.AspNetCore.Mvc.Controllers.ControllerFactoryProvider.<>c__DisplayClass5_0.<CreateControllerFactory>g__CreateController|0(ControllerContext controllerContext)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
-- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)","SystemMessage":"Method 'get_Info' in type 'Microsoft.EntityFrameworkCore.SqlServer.Infrastructure.Internal.SqlServerOptionsExtension'
from assembly 'Microsoft.EntityFrameworkCore.SqlServer, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' does not have an implementation."}
I added the following packages and the issue was solved
Microsoft.EntityFrameworkCore.SQLServer (3.1.2)
and Microsoft.EntityFrameworkCore (3.1.2)
Interesting that I got a runtime error not a build error.

How do I use DotNet Migrations in .Net Core when my Model and Repository are in a class library?

I am following this article/tutorial on how to make a generic repository for ASP.Net Core at:
http://www.c-sharpcorner.com/article/generic-repository-pattern-in-asp-net-core/
When I download the code I am able to run the migrations and the project runs and works.
But when I follow the directions and try to build from scratch, then when I get to the point where I have to run the migrations:
Add-migration MyFirstMigration
I get this error:
C:\Tutorials\ASP.Net\Core\GenericRepository\FromScratch\GenericReposotory\GR.Web\project.json(20,43): warning NU1012: Dependency conflict. Microsoft.EntityFrameworkCore 1.1.0 expected Microsoft.Extensions.Logging >= 1.1.0 but received 1.0.0 No parameterless constructor was found on 'ApplicationContext'. Either add a parameterless constructor to 'ApplicationContext' or add an implementation of 'IDbContextFactory' in the same assembly as 'ApplicationContext'.
The tutorial had the model and repo defined in a class library including this:
namespace GR.Data
{
public class ApplicationContext : DbContext
{
public ApplicationContext(DbContextOptions<ApplicationContext> options)
: base(options) { }
protected override void OnModelCreating(ModelBuilder modelBuilder){
base.OnModelCreating(modelBuilder);
new AuthorMap(modelBuilder.Entity<Author>());
new BookMap(modelBuilder.Entity<Book>());
}
}
}
The options are passed in from StartUp.cs in the Web Project like this:
public void ConfigureServices(IServiceCollection services)
{
// Add framework services.
services.AddApplicationInsightsTelemetry(Configuration);
services.AddMvc();
services.AddDbContext<ApplicationContext>(
options => options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));
services.AddScoped(typeof(IRepository<>), typeof(Repository<>));
}
And it gets the connection string from appsettings.json in the Web Project: GR.Web.
In the Package Manager Console I have GR.Data selected as the default project and GR.Web set as the startup project. I get this error:
C:\Tutorials\ASP.Net\Core\GenericRepository\FromScratch\GenericReposotory\GR.Web\project.json(20,43): warning NU1012: Dependency conflict. Microsoft.EntityFrameworkCore 1.1.0 expected Microsoft.Extensions.Logging >= 1.1.0 but received 1.0.0 No parameterless constructor was found on 'ApplicationContext'. Either add a parameterless constructor to 'ApplicationContext' or add an implementation of 'IDbContextFactory' in the same assembly as 'ApplicationContext'.
How is the download working and how do I get mine to work.
so confused.
On top of it I had to fool around with it forever to get all the depenanceies on EF Core and Tools Preview on the right versions to get this far.
Is there a better article somewhere on how to do this?
I fixed:
"Microsoft.Extensions.Logging": "1.0.0",
to
"Microsoft.Extensions.Logging": "1.1.0",
and now I get this error:
System.TypeLoadException: Method 'Apply' in type 'Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.RelationalColumnAttributeConvention' from assembly 'Microsoft.EntityFrameworkCore.Relational, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' does not have an implementation. at Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.RelationalConventionSetBuilder.AddConventions(ConventionSet conventionSet)
at Microsoft.EntityFrameworkCore.Metadata.Conventions.SqlServerConventionSetBuilder.AddConventions(ConventionSet conventionSet)
at Microsoft.EntityFrameworkCore.Infrastructure.ModelSource.CreateModel(DbContext context, IConventionSetBuilder conventionSetBuilder, IModelValidator validator)
at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory)
at Microsoft.EntityFrameworkCore.Internal.DbContextServices.CreateModel()
at Microsoft.EntityFrameworkCore.Internal.LazyRef1.get_Value()
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.<>c__DisplayClass16_0.<RealizeService>b__0(ServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitTransient(TransientCallSite transientCallSite, ServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitTransient(TransientCallSite transientCallSite, ServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.<>c__DisplayClass16_0.<RealizeService>b__0(ServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
at Microsoft.EntityFrameworkCore.Design.MigrationsOperations.AddMigration(String name, String outputDir, String contextType)
at Microsoft.EntityFrameworkCore.Tools.Cli.MigrationsAddCommand.Execute(CommonOptions commonOptions, String name, String outputDir, String context, String environment, Action1 reporter)
at Microsoft.EntityFrameworkCore.Tools.Cli.MigrationsAddCommand.<>c__DisplayClass0_0.b__0()
at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
at Microsoft.EntityFrameworkCore.Tools.Cli.Program.Main(String[] args)
Method 'Apply' in type 'Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.RelationalColumnAttributeConvention' from assembly 'Microsoft.EntityFrameworkCore.Relational, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' does not ha ve an implementation.
In dependancies for the Web Project, GR.Web, I rolled back
"Microsoft.EntityFrameworkCore": "1.1.0"
to
"Microsoft.EntityFrameworkCore": "1.0.1"
and now it works.

Magento API error --- SoapHeaderException: Procedure 'login' not present

I am lost. I do not even know where to begin. This is the error I am getting:
Procedure 'login' not present
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.Services.Protocols.SoapHeaderException: Procedure 'login' not present
Source Error:
Line 375: service.Url = account.APIURL;
Line 376:
Line 377: string sessionId = service.login(account.APIUser, account.APIPassword);
Line 378:
Line 379: var orders = service.salesOrderList(sessionId, InitialiseSOAPOrderCriteria(account.TriggerOrderStatus));
Source File: c:\inetpub\wwwroot\UAT.SFSystem\Settings\ChannelHeader.ascx.cs Line: 377
Stack Trace:
[SoapHeaderException: Procedure 'login' not present]
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +1772421
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +345
Adapters.MagentoSOAP.MagentoSOAP.MagentoService.login(String username, String apiKey) in C:\Work\WebCatch\SF\StoreFeeder\Middlewares\SFMWMagento\Adapters.MagentoSOAP\Web References\MagentoSOAP\Reference.cs:663
Settings_ChannelHeader.magentoTestConnection(String channelGuid) in c:\inetpub\wwwroot\UAT.SFSystem\Settings\ChannelHeader.ascx.cs:377
Settings_ChannelHeader.btnTestConnection_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\UAT.SFSystem\Settings\ChannelHeader.ascx.cs:154
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +154
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3707
I was getting the same error while using the v2 magento api, but problem resolved when I switched back to v1 soap api of magento

asp.net mvc site Upload error

I have a website developed in the asp.net mvc 2 .
I have this error after upload my project on public domain server.(like Godaddy)
Method not found: 'System.String System.Web.Mvc.Html.LinkExtensions.ActionLink(System.Web.Mvc.HtmlHelper, System.String, System.String, System.String)'.
The brief is :
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.MissingMethodException: Method not found: 'System.String System.Web.Mvc.Html.LinkExtensions.ActionLink(System.Web.Mvc.HtmlHelper, System.String, System.String, System.String)'.
Source Error:
Line 50:
< div class="nav_box" >
Line 51: < ul >
Line 52: < %= Html.MenuItem(Resources.Global.Home, "Index", "Home")%> //**Getting error here.**
Line 53: < %= Html.MenuItem(Resources.Global.Search, "Index", "Search")%>
Line 54: < %= Html.MenuItem(Resources.Global.Chemistry, "Chemistry", "Dating")%>
Source File: d:\hostfolder\61231230\html\test\Views\Shared\NewGeneral.Master Line: 52
Stack Trace:
[MissingMethodException: Method not found: 'System.String System.Web.Mvc.Html.LinkExtensions.ActionLink(System.Web.Mvc.HtmlHelper, System.String, System.String, System.String)'.]
DatingScript.Helpers.MenuItemHelper.MenuItem(HtmlHelper helper, String linkText, String actionName, String controllerName) in MenuItemHelper.cs:34
ASP.views_shared_newgeneral_master.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in d:\hostfolder\6954170\html\test\Views\Shared\NewGeneral.Master:52
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
System.Web.UI.Control.Render(HtmlTextWriter writer) +10
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
System.Web.UI.Page.Render(HtmlTextWriter writer) +29
System.Web.Mvc.ViewPage.Render(HtmlTextWriter writer) +59
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1266
Check the version number of the DLL containing the mentioned namespace and verify that you are using the correct/expected version.
I have experienced something similar today when I suddenly got the message:
"Method not found: 'System.String Sitecore.Web.WebUtil.GetSafeQueryString(System.String)'."
when trying to access the sitecore shell.
As I am developing within a development team I had to do a bit of analysis of the DLL's in the bin folder as there were no build errors in my build and the the referenced namespace is placed within a Sitecore dll.
When I compared my failing Sitecore.Kernel.dll file version with a Sitecore.Kernel.dll version from a working solution I found a difference in version number and that the Sitecore dll was copied from a repository that I had'nt updated recently.