Sensenet Move Server - sensenet

I'm simply trying to move a site created by a third party to a new server. I'm getting an assembly error but I checked the project is set to move references local. I'm not familiar with sensenet so thought maybe someone could help.
ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.]
System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) +0
System.Reflection.RuntimeModule.GetTypes() +9
System.Reflection.Assembly.GetTypes() +61
SenseNet.ContentRepository.Storage.TypeHandler.GetTypesByBaseType(Type baseType) in \Source\SenseNet\Storage\TypeHandler.cs:211
[ApplicationException: Type discovery error. Assembly: BotDetect.Web.Mvc, Version=4.4.2.0, Culture=neutral, PublicKeyToken=74616036388b765f]
SenseNet.ContentRepository.Storage.TypeHandler.GetTypesByBaseType(Type baseType) in \Source\SenseNet\Storage\TypeHandler.cs:230
SenseNet.ContentRepository.Storage.Schema.NodeTypeManager.GatherNodeObservers() in \Source\SenseNet\Storage\Schema\NodeTypeManager.cs:123
SenseNet.ContentRepository.Storage.Schema.NodeTypeManager.StartEventSystem() in \Source\SenseNet\Storage\Schema\NodeTypeManager.cs:130
SenseNet.ContentRepository.Storage.Schema.NodeTypeManager.get_Current() in Source\SenseNet\Storage\Schema\NodeTypeManager.cs:50
SenseNet.ContentRepository.RepositoryInstance.StartManagers() in Source\SenseNet\ContentRepository\RepositoryInstance.cs:230
SenseNet.ContentRepository.RepositoryInstance.DoStart() in Source\SenseNet\ContentRepository\RepositoryInstance.cs:125
SenseNet.ContentRepository.RepositoryInstance.Start(RepositoryStartSettings settings) in \Source\SenseNet\ContentRepository\RepositoryInstance.cs:98
SenseNet.ContentRepository.Repository.Start(RepositoryStartSettings settings) in \Source\SenseNet\ContentRepository\Repository.cs:58
SenseNet.Portal.SenseNetGlobal.Application_Start(Object sender, EventArgs e, HttpApplication application) in \Source\SenseNet\Portal\SenseNetGlobal.cs:67
SenseNet.Portal.Global.Application_Start(Object sender, EventArgs e) in D:\Xavor\NVIP(Latest)\Source\SenseNet\Portal\Global.cs:9
[HttpException (0x80004005): Type discovery error. Assembly: BotDetect.Web.Mvc, Version=4.4.2.0, Culture=neutral, PublicKeyToken=74616036388b765f]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +10096597
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +118
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +173
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +218
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296
[HttpException (0x80004005): Type discovery error. Assembly: BotDetect.Web.Mvc, Version=4.4.2.0, Culture=neutral, PublicKeyToken=74616036388b765f]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +10077812
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +95
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254

Related

SenseNet.ExclusiveLock.MsSql component is missing

After installing the latest version of Sensenet, the following error is displayed when application is started with debugging:
SenseNet.ExclusiveLock.MsSql component is missing.
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.InvalidOperationException: SenseNet.ExclusiveLock.MsSql component is missing.
Source Error:
Line 13: protected override void Application_Start(object sender, EventArgs e, HttpApplication application)
Line 14: {
Line 15: base.Application_Start(sender, e, application);
Line 16:
Line 17: AreaRegistration.RegisterAllAreas();
Source File: c:\users\administrator\source\repos\WebApplication4\WebApplication4\Global.asax.cs Line: 15
[InvalidOperationException: SenseNet.ExclusiveLock.MsSql component is missing.]
SenseNet.ContentRepository.RepositoryVersionInfo.IsComponentAllowed(SnComponentInfo component, Version installedComponentVersion) +217
SenseNet.ContentRepository.RepositoryVersionInfo.CheckComponentVersions(SnComponentInfo[] components, Boolean release) +237
SenseNet.Services.SenseNetGlobal.Application_Start(Object sender, EventArgs e, HttpApplication application) in C:\agent-02\_work\2\s\src\Services\SenseNetGlobal.cs:166
WebApplication4.MvcApplication.Application_Start(Object sender, EventArgs e, HttpApplication application) in c:\users\administrator\source\repos\WebApplication4\WebApplication4\Global.asax.cs:15
SenseNet.Portal.Global.Application_Start(Object sender, EventArgs e) in C:\agent-02\_work\2\s\src\Services\Global.cs:15
[HttpException (0x80004005): SenseNet.ExclusiveLock.MsSql component is missing.]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +10107111
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +123
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +181
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +228
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +314
[HttpException (0x80004005): SenseNet.ExclusiveLock.MsSql component is missing.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +10087352
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +99
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +263
I followed installation instructions closely and no build errors were reported.
you have a previous version of sensenet and you upgraded the NuGet packages, am I correct? It seems that this combination does not work, because the component above is installed automatically by the new infrastructure - which is not compatible with your version. The only solution I see here is to downgrade the packages to their older versions (at least last August, maybe older). SenseNet has changed a lot since we moved to .Net Core, and there are some incompatibilities with the .Net Framework libraries. Please consider taking a look at the new "sensenet as a service" solution that will free you from the upgrade hassle.

ImageResizer - ParseQueryOnly - Response is not available in this context, when initialized on production server

This error occurs only in our production enviromnent, not locally or on the test server. I´ve narrowed it down to the preset-node in the configuration. The exception is thrown when I have presets defined and start the web site. If I comment the preset-element the site starts and images can be scaled manually through the query params.
The call stack:
Exception Details: System.Web.HttpException: Response is not available in this context.
[HttpException (0x80004005): Response is not available in this context.]
System.Web.HttpUtility.UrlDecode(String str, Encoding e) +4841588
ImageResizer.Util.PathUtils.ParseQueryOnly(String query, Boolean allowSemicolons, Boolean urlDecode) +307
ImageResizer.ResizeSettings..ctor(String queryString) +224
ImageResizer.Plugins.Basic.Presets.ParseXml(Node n, Config conf) +870
ImageResizer.Plugins.Basic.Presets.Install(Config c) +98
ImageResizer.Configuration.PluginConfig.loadPluginsInternal() +303
ImageResizer.Configuration.PluginConfig.LoadPlugins() +61
ImageResizer.Configuration.Config.get_Current() +109
[HttpException (0x80004005): Response is not available in this context.]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +3985477
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +191
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +325
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +407
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +375
[HttpException (0x80004005): Response is not available in this context.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11524352
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +141
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4782309
This regression in the ASP.NET framework was introduced in .NET 4.0 RTM, and has been patched in a later updates to the framework.
It made HttpUtility.UrlEncode dependent upon having a valid HttpContext.
More details about the bug can be found here.

Castle Windsor Dynamic Assembly Bug?

I'm using Castle Windsor 3.1.0 in an ASP .NET 4 MVC application, which is giving me an exception in the Application_Start event when container.Register is called.
The exception is "The invoked member is not supported in a dynamic assembly.". Here's the stack trace:
[NotSupportedException: The invoked member is not supported in a dynamic assembly.]
System.Reflection.Emit.InternalAssemblyBuilder.GetExportedTypes() +56
Castle.Core.Internal.ReflectionUtil.GetAvailableTypes(Assembly assembly, Boolean includeNonExported) in c:\BuildAgent\work\5b096cace0fecb1f\src\Castle.Windsor\Core\Internal\ReflectionUtil.cs:165
Castle.MicroKernel.Registration.FromAssemblyDescriptor.<SelectedTypes>b__0(Assembly a) in c:\BuildAgent\work\5b096cace0fecb1f\src\Castle.Windsor\MicroKernel\Registration\FromAssemblyDescriptor.cs:56
System.Linq.<SelectManyIterator>d__14`2.MoveNext() +238
Castle.MicroKernel.Registration.FromDescriptor.Castle.MicroKernel.Registration.IRegistration.Register(IKernelInternal kernel) in c:\BuildAgent\work\5b096cace0fecb1f\src\Castle.Windsor\MicroKernel\Registration\FromDescriptor.cs:160
Castle.MicroKernel.Registration.BasedOnDescriptor.Castle.MicroKernel.Registration.IRegistration.Register(IKernelInternal kernel) in c:\BuildAgent\work\5b096cace0fecb1f\src\Castle.Windsor\MicroKernel\Registration\BasedOnDescriptor.cs:530
Castle.MicroKernel.DefaultKernel.Register(IRegistration[] registrations) in c:\BuildAgent\work\5b096cace0fecb1f\src\Castle.Windsor\MicroKernel\DefaultKernel.cs:506
Castle.Windsor.WindsorContainer.Register(IRegistration[] registrations) in c:\BuildAgent\work\5b096cace0fecb1f\src\Castle.Windsor\Windsor\WindsorContainer.cs:483
ProductX.Web.Windsor.Installers.ControllerInstaller.Install(IWindsorContainer container, IConfigurationStore store) in C:\TeamProjects\CompanyX.ProductX\Mainline\Admin\ProductX.Web\Windsor\Installers\ControllerInstaller.cs:24
Castle.Windsor.Installer.AssemblyInstaller.Install(IWindsorContainer container, IConfigurationStore store) in c:\BuildAgent\work\5b096cace0fecb1f\src\Castle.Windsor\Windsor\Installer\AssemblyInstaller.cs:56
Castle.Windsor.WindsorContainer.Install(IWindsorInstaller[] installers, DefaultComponentInstaller scope) in c:\BuildAgent\work\5b096cace0fecb1f\src\Castle.Windsor\Windsor\WindsorContainer.cs:319
Castle.Windsor.WindsorContainer.Install(IWindsorInstaller[] installers) in c:\BuildAgent\work\5b096cace0fecb1f\src\Castle.Windsor\Windsor\WindsorContainer.cs:452
ProductX.Web.MvcApplication.InitializeWindsor() in C:\TeamProjects\CompanyX.ProductX\Mainline\Admin\ProductX.Web\Global.asax.cs:41
ProductX.Web.MvcApplication.Application_Start() in C:\TeamProjects\CompanyX.ProductX\Mainline\Admin\ProductX.Web\Global.asax.cs:25
[HttpException (0x80004005): The invoked member is not supported in a dynamic assembly.]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +9171773
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +131
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +194
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +339
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +253
[HttpException (0x80004005): The invoked member is not supported in a dynamic assembly.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9090876
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +256
Here's how I'm calling Register:
container.Register(Classes.FromThisAssembly().BasedOn<IController>().LifestyleTransient());
When I build the application in Debug mode, it's fine. When I build in Release mode, the exception above occurrs. I can't find anything about this error through Google. My suspicion is that some .NET 4 restrictions were introduced with how reflection is done on dynamic assemblies, which is being introduced in this situation as a Release build optimisation.
Any idea anyone?
Looks like you're getting a dynamic assembly being emitted (somehow). Try adding a filter to ignore dynamic assemblies. This should work:
container.Register(Classes.FromThisAssembly().Where(t => !t.Assembly.IsDynamic).BasedOn<IController>().LifestyleTransient());

Sharparchitecture upgrade from 1.5 to 1.9 error

I have upgraded SharpArchitecture from 1.5 to 1.9.
I have followed the guide here http://blog.sharparchitecture.net/post/Sharp-Architecture-19-released.aspx, and ensured that I have set "copy local = true" for the various DLLs,
but I still receive the following error when running the site:
Exception Details: System.ArrayTypeMismatchException: Attempted to
access an element as a type incompatible with the array.
Source Error:
Line 35: log4net.Config.XmlConfigurator.Configure();
Line 36: ViewEngines.Engines.Clear();
Line 37: ViewEngines.Engines.Add(new AreaViewEngine());
Line 38:
Line 39: ModelBinders.Binders.DefaultBinder = new
SharpModelBinder();
Source File: xxx.Web
\Global.asax.cs Line: 37
Stack Trace:
[ArrayTypeMismatchException: Attempted to access an element as a type
incompatible with the array.]
System.Collections.Generic.List`1.Insert(Int32 index, T item) +62
xxx.Web.MvcApplication.Application_Start() in
[HttpException (0x80004005): Attempted to access an element as a type
incompatible with the array.]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext
context, HttpApplication app) +3988565
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr
appContext, HttpContext context, MethodInfo[] handlers) +191
System.Web.HttpApplication.InitSpecial(HttpApplicationState state,
MethodInfo[] handlers, IntPtr appContext, HttpContext context) +325
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr
appContext, HttpContext context) +407
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr
appContext) +375
[HttpException (0x80004005): Attempted to access an element as a type
incompatible with the array.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context)
+11529072
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context)
+141
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest
wr, HttpContext context) +4784373
Does anyone knwo what I might have forgotten?
I have been looking at the versions of SharpArchitecture in the different project several times, but apparently I had missed one project which didn't have the SharpArch DLL set to Specific Version.

Reporting server: Server Error in '/Reports' Application

I am trying to setup SQL Reporting services on windows vista, iis7 but I keep getting this error when I try http://localhost/Reports/Pages/Folder.aspx
Server Error in '/Reports' Application.
Request is not available in this context 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.HttpException: Request is not available in this context
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: [HttpException (0x80004005):
Request is not available in this context]
System.Web.HttpContext.get_Request()
+3465893 Microsoft.ReportingServices.UI.Global.get_ConfigurationManager()
+47 Microsoft.ReportingServices.UI.GlobalApp.Application_Start(Object
sender, EventArgs e) +32 [HttpException (0x80004005): Request is not
available in this context]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext
context, HttpApplication app)
+3385130 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr
appContext, HttpContext context, MethodInfo[] handlers) +125
System.Web.HttpApplication.InitSpecial(HttpApplicationState state,
MethodInfo[] handlers, IntPtr appContext, HttpContext context)
+182 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr
appContext, HttpContext context)
+259 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr
appContext) +245 [HttpException (0x80004005): Request is not available
in this context]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +3465475
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +69
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest
wr, HttpContext context) +675
The event viewer shows me something like this:
3005 An unhandled exception has occurred. 10/30/2008 12:31:56
PM 10/30/2008 9:31:56 AM d6764b0e70d246a590d9a9e8186ef677
2 1 0 /LM/W3SVC/1/ROOT/Reports-8-128698327158150000
RosettaMgr /Reports c:\Program Files\Microsoft SQL
Server\MSSQL.4\Reporting Services\ReportManager\
4756 w3wp.exe NT AUTHORITY\NETWORK SERVICE HttpException Request is not available in this context
http://localhost/Reports/Pages/Folder.aspx
/Reports/Pages/Folder.aspx ::1
False
NT AUTHORITY\NETWORK SERVICE 5 NT AUTHORITY\NETWORK SERVICE False at
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext
context, HttpApplication app) at
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr
appContext, HttpContext context, MethodInfo[] handlers) at
System.Web.HttpApplication.InitSpecial(HttpApplicationState state,
MethodInfo[] handlers, IntPtr appContext, HttpContext context) at
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr
appContext, HttpContext context) at
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr
appContext)
Take a look at http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=3459824&SiteID=1 - looks like someone had the same issue and was able to resolve it.