my application was worked fine but suddenly it is stop working and give this error:
[InvalidOperationException: Stack empty.]
System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) +52
System.Collections.Generic.Stack`1.Pop() +6694385
Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.SelectionMappingRenderTraceListener.EndRendering(TextWriter writer, Object renderedObject) +84 System.Web.UI.RenderTraceListenerList.EndRendering(TextWriter writer, Object renderedObject) +58
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +142
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1386
I had the same problem, but its fixed now. Firstly I disabled PageInspector.
<appSettings>
<add key="PageInspector:ServerCodeMappingSupport" value="Disabled"/>
</appSettings>
After that I got another error which was related to ResolveUrl method, I removed method and fixed the problem and voila! its working perfectly. Finally, I enabled PageInspector by removing previous settings and still it works.
For me, it was the Brower Link. Disabling it worked for me. For more reference check out https://learn.microsoft.com/en-us/aspnet/visual-studio/overview/2013/using-browser-link
Related
I created a new .netstandard2.0 MDrivenEcoSpaceAndModelForNetStandard2 project. When it is created, I am not able to open the ecospace or the PMP component designers. I'm using Microsoft Visual Studio Enterprise 2019 Version 16.8.4 and MDriven Framework version 7.0.0.12868. I get the following error when opening the PMP. (BTW, Thanks, I am very happy to see the support for .net standard. Looking forward to getting this component designer issue figured out and everything working again. It's been a very long road converting all my projects over to .net standard/core). Any help is greatly appreciated.
"Unsupported type argument in custom attribute signature."
Instances of this error (1)
Call Stack
at Microsoft.MetadataReader.SignatureUtil.GetTypeId(Type type)
at Microsoft.MetadataReader.MetadataOnlyModule.GetConstructorArguments(ConstructorInfo constructorInfo, Byte[] customAttributeBlob, Int32& index)
at Microsoft.MetadataReader.MetadataOnlyModule.LazyAttributeParse(Token token, ConstructorInfo constructorInfo, IList1& constructorArguments, IList1& namedArguments)
at Microsoft.MetadataReader.MetadataOnlyCustomAttributeData.InitArgumentData()
at Microsoft.MetadataReader.MetadataOnlyCustomAttributeData.get_ConstructorArguments()
at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkUtil.ConstructAttribute(CustomAttributeData data)
at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkUtil.GetCustomAttributes(ICustomAttributesDataProvider member, Type filter, CustomAttributesCache cache)
at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkUtil.GetCustomAttributes(Type type, Type filter, Boolean inherit, CustomAttributesCache cache)
at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkType.GetCustomAttributes(Type filter, Boolean inherit)
at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkAttributeCollection.GetAttributes(Type type, Type filter)
at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkAttributeCollection.GetAttributes(MemberInfo member, Type filter)
at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkAttributeCollection.get_Attributes()
at Microsoft.VisualStudio.Design.VSDesignSurface.EnsureExtensions(IComponent component)
at Microsoft.VisualStudio.Design.VSDesignSurface.CreateInstance(Type type)
at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(Type componentType, String name)
at System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration)
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)
Slightly different call stack when opening the ecospace:
Instances of this error (1)
Call Stack
at Microsoft.MetadataReader.SignatureUtil.GetTypeId(Type type)
at Microsoft.MetadataReader.MetadataOnlyModule.GetConstructorArguments(ConstructorInfo constructorInfo, Byte[] customAttributeBlob, Int32& index)
at Microsoft.MetadataReader.MetadataOnlyModule.LazyAttributeParse(Token token, ConstructorInfo constructorInfo, IList1& constructorArguments, IList1& namedArguments)
at Microsoft.MetadataReader.MetadataOnlyCustomAttributeData.InitArgumentData()
at Microsoft.MetadataReader.MetadataOnlyCustomAttributeData.get_ConstructorArguments()
at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkUtil.ConstructAttribute(CustomAttributeData data)
at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkUtil.GetCustomAttributes(ICustomAttributesDataProvider member, Type filter, CustomAttributesCache cache)
at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkUtil.GetCustomAttributes(Type type, Type filter, Boolean inherit, CustomAttributesCache cache)
at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkType.GetCustomAttributes(Type filter, Boolean inherit)
at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkAttributeCollection.GetAttributes(Type type, Type filter)
at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkAttributeCollection.GetAttributes(MemberInfo member, Type filter)
at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkAttributeCollection.get_Attributes()
at Microsoft.VisualStudio.Design.VSDesignSurface.EnsureExtensions(IComponent component)
at Microsoft.VisualStudio.Design.VSDesignSurface.CreateInstance(Type type)
at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(Type componentType, String name)
at System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration)
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)
MDriven had real issues with the new project file format. It behaves very differently in our CodeGen and Save extensions for Visual Studio.
This is however now improved and we think all is fine from version 7.0.0.12950 and onwards.
When it comes to open designer for EcoSpace and PMP we still have issues - but it seems we are not alone since the same issues shows when trying to open a winforms designer. We will need to see how Visual Studio future release handles this.
Workaround is to link the files to a .netFramework project and edit them there - but compile them in .netstandard/core
After Telerik Update from Telerik AJAX Manager v2015.1.401.45 to
Telerik AJAX Manager v2020.2.512.45 can not upload files. Always error like :
[CryptographicException: The cryptographic operation has failed!]
Telerik.Web.UI.CryptoExceptionThrower.ThrowGenericCryptoException() +46
Telerik.Web.UI.CryptoExceptionThrower.ThrowIfFails(Func`1 function) +46
Telerik.Web.UI.CryptoService.CheckWhitelistTypes(Type type, String allowedCustomMetaTypes, String uploadMetaDataFullName) +116
Telerik.Web.UI.AsyncUploadHandler.GetConfiguration(String rawData) +163
Telerik.Web.UI.AsyncUploadHandler.EnsureSetup() +148
Telerik.Web.UI.AsyncUploadHandler.ProcessRequest(HttpContext context) +140
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +195
System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +50
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +73
The error is documented in the product documentation https://docs.telerik.com/devtools/aspnet-ajax/knowledge-base/asyncupload-the-cryptographic-operation-has-failed-error-after-upgrade.
Description
In R1 2020, the custom metadata classes(upload configurations) whitelisting is enabled by default - Whitelist custom metadata types. If your application uses such configurations, you will need to add them to the Telerik.Upload.AllowedCustomMetaDataTypes key in the web.config.
You need to add the fully qualified name of the class, otherwise you will get a The cryptographic operation has failed! error when attempting an upload.
web.config
<appSettings>
<add key="Telerik.Upload.AllowedCustomMetaDataTypes" value="SomeNameSpace.SampleAsyncUploadConfiguration;SomeOtherNameSpace.OtherAsyncUploadConfiguration" />
</appSettings>
Other reasons for the error
If adding the AllowedCustomMetaDataTypes key or not using custom configuration files do not fix the error, please ensure you have set the necessary encryption keys:
ConfigurationEncryptionKey
ConfigurationHashKey
Telerik.Web.UI.DialogParametersEncryptionKey, if using RadEditor dialogs
Solution
The solution is to add all the custom configuration classes to the Telerik.Upload.AllowedCustomMetaDataTypes key separated by a semicolon ;. To find out the fully qualified names, you can use the following approach that lists the items in a label.
ASP.NET
<asp:Label Text="Label1" ID="Label1" runat="server" />
C#
protected void Page_Load(object sender, EventArgs e)
{
Label1.Text = typeof(MySampleAsyncUploadConfiguration).AssemblyQualifiedName.Split(',')[0];
}
For convenience, you can download the AsyncUploadGetCustomMetaDataTypes sample project implementing the suggested approach from the link below. To make it runnable, place the Telerik.Web.UI.dll assembly in the bin folder of the project.
AsyncUploadGetCustomMetaDataTypes.zip.
In the project you will find two pages with two different custom handlers. As you can see, the custom handler that does not have custom configuration, does not need to have anything added to the Telerik.Upload.AllowedCustomMetaDataTypes key.
i'm trying to track a NullReferenceException that shows up on sitecore 6.5 at loading any webpage:
[NullReferenceException: Object reference not set to an instance of an object.]
Sitecore.Diagnostics.Log.Error(String message, Exception exception, Type ownerType) +133
Sitecore.Diagnostics.Log.Error(String message, Type ownerType) +45
Sitecore.Configuration.Factory.LoadAutoIncludeFiles(ConfigPatcher patcher, String folder) +680
Sitecore.Configuration.Factory.LoadAutoIncludeFiles(XmlNode element) +63
Sitecore.Configuration.Factory.GetConfiguration() +347
Sitecore.Diagnostics.LoggerFactory..cctor() +67
[TypeInitializationException: The type initializer for 'Sitecore.Diagnostics.LoggerFactory' threw an exception.]
Sitecore.Diagnostics.LoggerFactory.GetLogger(Type type) +17
Sitecore.Diagnostics.Log.Error(String message, Exception exception, Type ownerType) +93
Sitecore.Diagnostics.Log.Error(String message, Type ownerType) +45
Sitecore.Configuration.Factory.LoadAutoIncludeFiles(ConfigPatcher patcher, String folder) +680
Sitecore.Configuration.Factory.LoadAutoIncludeFiles(XmlNode element) +63
Sitecore.Configuration.Factory.GetConfiguration() +347
Sitecore.Configuration.Factory.GetConfigNode(String xpath, Boolean assert) +82
Sitecore.Configuration.Factory.GetConfigNode(String xpath) +29
Sitecore.Resources.Media.UploadWatcher.InitializeIgnoreList() +114
Sitecore.Resources.Media.UploadWatcher..cctor() +51
[TypeInitializationException: The type initializer for 'Sitecore.Resources.Media.UploadWatcher' threw an exception.]
Sitecore.Resources.Media.UploadWatcher..ctor() +0
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache) +98
System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache) +241
System.Activator.CreateInstance(Type type, Boolean nonPublic) +69
System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +1136
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +111
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +23
System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +60
System.Web.HttpApplication.BuildIntegratedModuleCollection(List`1 moduleList) +231
System.Web.HttpApplication.GetModuleCollection(IntPtr appContext) +1365
Microsoft.Web.Infrastructure.DynamicModuleHelper.DynamicModuleReflectionUtil.GetIntegratedModuleCollection(HttpApplication target, IntPtr appContext) +33
Microsoft.Web.Infrastructure.DynamicModuleHelper.CriticalStatics.Init(HttpApplication context) +179
Microsoft.Web.Infrastructure.DynamicModuleHelper.IntegratedDynamicModule.Init(HttpApplication context) +6
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +517
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): Exception has been thrown by the target of an invocation.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9087676
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +256
the interesting characteristics that make this error hard to track are the following:
1) i get the following error in the sitecore log:
Exception: System.InvalidOperationException
Message: 'analytics' connection string is not defined
Source: Sitecore.Kernel
at Sitecore.Diagnostics.Assert.IsNotNull(Object value, String message)
at Sitecore.Diagnostics.Assert.ResultNotNull[T](T result, String message)
at Sitecore.Analytics.Data.DataAccess.DataAdapters.DataAdapterManager.ConnectionStrings.get_AnalyticsSettings()
at Sitecore.Analytics.Data.DataAccess.DataAdapters.DataAdapterManager.ConnectionStrings.get_Analytics()
at Sitecore.Analytics.Data.DataAccess.DataAdapters.Sql.SqlServer.SqlServerDataAdapterProvider..ctor()
however analytics is very well disabled:
<setting name="Analytics.DisableDatabase" value="true" />
...
<setting name="Analytics.Enabled" value="false" />
2) the error goes away when i debug with visual studio, attach to IIS, and hit at least one breakpoint (if i don't hit any breakpoint, the error stays)
3) the error shows up again when i do a build, or touch web.config. Haven't tried rebuild, as that will delete important sitecore dlls from Website/bin
more info about my environment: visual studio 2010, IIS 7, sitecore 6.5, windows 7
how would you track this error?
Ok after half day of debugging and decompiling i found out the problem was the (internal) class Sitecore.Configuration.ConfigPatcher, it seems to choke with Sitecore.WebDav.[Debug/Release].config files that are used for xdt transformations of the Sitecore.WebDav.config file for the content delivery and content authoring environment.
For now, the workaround is rename these files (and disable xdt transformations)
However, this problem should affect any user of xdt transformations for non-web.config files (i'm using slow cheetah add-in)
Also you can get this error when you have empty configuration section in config file with patching, like this
<?xml version="1.0"?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
</configuration>
I had something similar when adding xml comments between nodes:
Did not work:
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<!-- not used in a delivery node -->
<sitecore />
</configuration>
If you add the comment before the root node, it works.
<!-- not used in a delivery node -->
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore />
</configuration>
Looks like an "include" config file is missing from your setup.
Decompile Sitecore.Resources.Media.UploadWatcher.InitializeIgnoreList to try to work out which one (sorry haven't got a decompiler handy). Reflector comes with a 30-day trial or Telerik Just Decompile is free.
EDIT I use a product called SlowCheetah which does XML transformations based on build configuration for any XML file, not just web.config like VS does. You can NuGet it. Highly Recommended.
I had the same problem, i found out if your config files don't have the
<sitecore>
node you will get a error like this!
I would start with removing Sitecore.Analytics.dll from the bin folder of your website. You don't need the dll as you disabled analytics, but as you can see from your stacktrace, there is an error inside this dll.
I had similar problem and it turned out I had malformed config file. More specifically I must have pasted some random string at the beginning of the config file:
some_random_string<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
After removing redundant characters problem was solved.
However changing the name of problematic file also get rid of the exception.
I had the exact same problem (my stack trace was the same as the one posted) and it turned out to be a malformed .config file in the App_Config\Include folder. Fixed the config and my site loaded without problems.
I had the exact same issue encountered above and can confirm it happened because of an incompatible .config file in the App_Config/Include folder. The .config file was working on IIS7, but not II6.
My best advice to get to the bottom of this issue is a tedious trial and error message. Remove any suspect .config files until the website is up and running (or revert to original .config files). Start adding each .config file one by one, until you discover the file that breaks the site and causes the above issue.
I have a website made in Asp.net MVC which is installed in the root directory of shared hosting enviroment.
Now, I have made a mobile version for this site in Asp.net MVC and installed it as a sub-domain http://m.price-tag.org which points to a folder m(set as virtual directory) in root directory.
When someone visits the site from mobile, an assembly qualified name error is shown which goes off when the page is refreshed. Following is the screen-shot for iPhone emulator which displays the same error. Even in emulator, the error goes when the page is refreshed.
The strange part is that the type mentioned in error is used in my main website and not the mobile website. Why is this happening when my mobile project is completely different and has its own web.config but somehow, it seems that the root's web.config is used ? Can this be a web.config issue
NOTE:- Both projects have their own EntityObject, Models and Web.config files and nothing is shared between them.
EDIT:- This error shows in mobile only.....And that too first time, if one refreshes the page, it goes away.
EDIT with Stack Trace
[InvalidOperationException: The type 'PriceCompare.Models.PriceCompareEntity,
PriceCompare' could not be found. The type name must be an assembly-qualified name.]
System.Data.Entity.Internal.DatabaseInitializerConfig.ApplyInitializer() +315
[InvalidOperationException: Failed to set database initializer of type 'Disabled' for DbContext type 'PriceCompare.Models.PriceCompareEntity, PriceCompare' specified in the application configuration. Entries should be of the form 'key="DatabaseInitializerForType MyNamespace.MyDbContextClass, MyAssembly" value="MyNamespace.MyInitializerClass, MyAssembly"' or 'key="DatabaseInitializerForType MyNamespace.MyDbContextClass, MyAssembly" value="Disabled"'. The initializer class must have a parameterless constructor. See inner exception for details.]
System.Data.Entity.Internal.DatabaseInitializerConfig.ApplyInitializer() +383
System.Data.Entity.Internal.DatabaseInitializerConfig.ApplyInitializersFromConfig() +288
System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization() +59
System.Data.Entity.Internal.LazyInternalContext.b__4(InternalContext c) +7
System.Data.Entity.Internal.RetryAction1.PerformAction(TInput input) +118
System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action1 action) +190
System.Data.Entity.Internal.LazyInternalContext.InitializeDatabase() +73
System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) +27
System.Data.Entity.Internal.Linq.InternalSet1.Initialize() +62
System.Data.Entity.Internal.Linq.InternalSet1.get_InternalContext() +15
System.Data.Entity.Infrastructure.DbQuery1.System.Linq.IQueryable.get_Provider() +37
System.Linq.Queryable.OrderByDescending(IQueryable1 source, Expression1 keySelector) +66
PriceMobile.Controllers.HomeController.Index() in HomeController.cs:19
lambda_method(Closure , ControllerBase , Object[] ) +40
System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +17
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary2 parameters) +188
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2 parameters) +27
System.Web.Mvc.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12() +56
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func1 continuation) +267
System.Web.Mvc.<>c__DisplayClass17.b__14() +20
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList1 filters, ActionDescriptor actionDescriptor, IDictionary2 parameters) +190
System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +329
System.Web.Mvc.Controller.ExecuteCore() +115
System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +93
System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +10
System.Web.Mvc.<>c__DisplayClassb.b__5() +37
System.Web.Mvc.Async.<>c__DisplayClass1.b__0() +21
System.Web.Mvc.Async.<>c__DisplayClass81.<BeginSynchronous>b__7(IAsyncResult _) +12
System.Web.Mvc.Async.WrappedAsyncResult1.End() +55
System.Web.Mvc.<>c__DisplayClasse.b__d() +31
System.Web.Mvc.SecurityUtil.b__0(Action f) +7
System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +23
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +59
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8969117
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184
Virtual directories/application by default inherit the root web.config file. We can stop this behavior by having,
<location path="." inheritInChildApplications="false">
in root web.config
Please visit for More information
You need to use inheritInChildApplications, so that application inside sub directory will not use the root application configuration. See this for detail.
For appSettings section, one can't use location tag. Therefore configurations which uses key/value pair, one needs to use the clear tag in child directories web.config
Something is shared - PriceCompareEntity has to be. I had a similar problem. I included a DLL in one project that had a reference to another I didn't think I needed. The site failed with a similar error caling for a type in the referred-DLL.
Two possibilities:
1) PriceCompare not only is the name of a namespace and of a dll but ALSO the name of some Type. The system is confused by this omonimy. Try to change either the name of the type or the name of both the dll and the namespace.
2) the web site is not able to find the PriceCompare dll with the right version. This might happen because some part of the system refers to an old version of this dll. Only one of the two dll is taken so one of the two references fails. Clean up your project to solve this
I have been reading this post to help me get going on my caching and am running into a problem. When I attempt to do a call to the method below I get the following error:
"Cannot initialize property or field node 'LocalTariffId' because the specified context is null."
I thought the attribute syntax I am using below would use the LocalTariffId property of the result once it returns to cache my data. This error occurs as soon as I attempt to step into the method. It seems to me that it is trying access that property too soon. I must be missing something so any advice you could provide is greatly appreciated!
[CacheResult("AspNetCache", "'LocalTariff.Id=' + LocalTariffId", TimeToLive = "00:10:00")]
public Domain.LocalTariffs.LocalTariff GetDefault(string agencyCode)
I am also getting a weird error after the first error I was hoping somebody could shed some light on. It has to do with log4net at least I think it does. My logging is working so I am not sure what this one is about.
IGCSoftware.HHG.Business.LocalTariffsFacade - Exception thrown in GetDefaultLocalTariff;GetDefaultLocalTariff;9c0bb393-369c-4501-a2ce-9325fe525e38;183341 ms
<log4net.Error>Exception rendering object type [Spring.Core.NullValueInNestedPathException]<stackTrace>System.BadImageFormatException: The parameters and the signature of the method don't match.
at System.Reflection.RuntimeParameterInfo.GetParameters(IRuntimeMethodInfo methodHandle, MemberInfo member, Signature sig, ParameterInfo& returnParameter, Boolean fetchReturnParameter)
at System.Reflection.RuntimeMethodInfo.FetchNonReturnParameters()
at System.Reflection.RuntimeMethodInfo.GetParameters()
at System.Diagnostics.StackTrace.ToString(TraceFormat traceFormat)
at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
at System.Exception.GetStackTrace(Boolean needFileInfo)
at System.Exception.ToString(Boolean needFileLineInfo)
at System.Exception.ToString()
at log4net.ObjectRenderer.DefaultRenderer.RenderObject(RendererMap rendererMap, Object obj, TextWriter writer)
at log4net.ObjectRenderer.RendererMap.FindAndRender(Object obj, TextWriter writer)</stackTrace></log4net.Error>
You can't use the returned object to generate the key of the CacheResult attribute.
You have to use parameters of the method to generate the key (here '#agencyCode').