I have been unsuccessfully trying to track down the follwoing error message:
modelBuilder.Build (Database.Connection)
'modelBuilder.Build (Database.Connection)' löste eine Ausnahme des Typs 'System.ArgumentNullException' aus
Data: {System.Collections.ListDictionaryInternal}
HResult: -2147467261
HelpLink: null
InnerException: null
Message: "Der Wert darf nicht NULL sein.\r\nParametername: entitySet"
ParamName: "entitySet"
Source: "EntityFramework"
StackTrace: " bei System.Data.Entity.Utilities.Check.NotNull[T](T value, String parameterName)\r\n bei System.Data.Entity.Core.Mapping.EntitySetMapping..ctor(EntitySet entitySet, EntityContainerMapping containerMapping)\r\n bei System.Data.Entity.ModelConfiguration.Edm.DbDatabaseMappingExtensions.AddEntitySetMapping(DbDatabaseMapping databaseMapping, EntitySet entitySet)\r\n bei System.Data.Entity.ModelConfiguration.Edm.Services.TableMappingGenerator.Generate(EntityType entityType, DbDatabaseMapping databaseMapping)\r\n bei System.Data.Entity.ModelConfiguration.Edm.Services.DatabaseMappingGenerator.GenerateEntityTypes(DbDatabaseMapping databaseMapping)\r\n bei System.Data.Entity.ModelConfiguration.Edm.Services.DatabaseMappingGenerator.Generate(EdmModel conceptualModel)\r\n bei System.Data.Entity.DbModelBuilder.Build(DbProviderManifest providerManifest, DbProviderInfo providerInfo)\r\n bei System.Data.Entity.DbModelBuilder.Build(DbConnection providerConnection)"
TargetSite: {T NotNull[T](T, System.String)}
Can somebody give me a hint where to search for the cause? The validation of the model runs without errors.
That be super!
Thank you!
mph
This error was caused by a malformed configuration which threw an exception which was corrupted while bubbling up and some information - the important part - was lost.
I had to debug deep into EF's bally to find the issue.
In this case it was the mix of wrong configured mappings and automatic detection of relationships.
Related
Getting this error while open product detail page at front side of our nopCommerce 4.4 site.
from error there is no clue that error from which action and from which controller etc.
The antiforgery token could not be decrypted.
Category: Microsoft.AspNetCore.Antiforgery.DefaultAntiforgery
EventId: 7
SpanId: 390052c584d2844b
TraceId: d525f5d7ada43942af0e86d6ed879253
ParentId: 0000000000000000
RequestId: 800074e6-1000-e800-b63f-84710c7967bb
RequestPath: (**Product detail page**)
ActionId: b7552ce7-1391-459c-a96d-ebf41d3f2d48
ActionName: Nop.Web.Controllers.ProductController.ProductDetails (Nop.Web)
An exception was thrown while deserializing the token.
Exception:
Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException: The antiforgery token could not be decrypted.
---> System.Security.Cryptography.CryptographicException: The key {20cdc418-c882-47e8-b3de-501029ea5ad5} was not found in the key ring.
at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.UnprotectCore(Byte[] protectedData, Boolean allowOperationsOnRevokedKeys, UnprotectStatus& status)
at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.DangerousUnprotect(Byte[] protectedData, Boolean ignoreRevocationErrors, Boolean& requiresMigration, Boolean& wasRevoked)
at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.Unprotect(Byte[] protectedData)
at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgeryTokenSerializer.Deserialize(String serializedToken)
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgeryTokenSerializer.Deserialize(String serializedToken)
at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgery.GetCookieTokenDoesNotThrow(HttpContext httpContext)
I am using the jni4net to bridge a .net dll to java. It is working fine with in the Java8 environment. Unfortunately, with java 8 I am getting the following error:
I have tried to compile generated jvm with java-11, but still the same problem.
Can't bind bridge:Can't initialize proxy java.lang.System
Can't bind bridge:net.sf.jni4net.jni.JNIException: Can't initialize proxy
java.lang.System ---> System.Reflection.TargetInvocationException: Ein
Aufrufziel hat einen Ausnahmefehler verursacht. ---> java.lang.LinkageError:
runFinalizersOnExit
bei net.sf.jni4net.jni.JNIEnv.ExceptionTest()
bei net.sf.jni4net.jni.JNIEnv.GetStaticMethodID(Class clazz, String name,
String sig)
bei java.lang.System.InitJNI(JNIEnv __env, Class __class)
--- Ende der internen Ausnahmestapelüberwachung ---
bei System.RuntimeMethodHandle.InvokeMethod(Object target, Object[]
arguments, Signature sig, Boolean constructor)
bei System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj,
Object[] parameters, Object[] arguments)
bei System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
bei System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
bei net.sf.jni4net.utils.Registry.RegisterStaticAndMethods(RegistryRecord
record, JNIEnv env)
--- Ende der internen Ausnahmestapelüberwachung ---
bei net.sf.jni4net.utils.Registry.RegisterStaticAndMethods(RegistryRecord
record, JNIEnv env)
bei net.sf.jni4net.utils.Registry.BindJvm(RegistryRecord record, ClassLoader
classLoader, JNIEnv env)
bei net.sf.jni4net.utils.Registry.BindJvm(RegistryRecord record, JNIEnv env)
bei net.sf.jni4net.utils.Registry.RegisterType(Type type, Boolean bindJVM,
JNIEnv env)
bei net.sf.jni4net.utils.Registry.RegisterAssembly(Assembly assembly,
Boolean bindJVM)
bei net.sf.jni4net.Bridge.RegisterAssembly(Assembly assembly)
bei net.sf.jni4net.Bridge.BindCore(JNIEnv env, BridgeSetup newSetup)
bei net.sf.jni4net.Bridge.initDotNetImpl(IntPtr envi, IntPtr clazz)
Can't initialize jni4net BridgeC
I have managed to compile and execute the same with java 11.
Try downloading the JNI4NET libs inside your project.
As a temporary solution you can use ProcessBuilder and define in it environment the JAVA_HOME variable with the path to java 8.
I am trying to upload my ASP.NET MVC app to hostgator but I keep receiving this error:
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: Request failed.
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:
[SecurityException: Request failed.]
System.Security.CodeAccessSecurityEngine.ThrowSecurityException(RuntimeAssembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandleInternal rmh, SecurityAction action, Object demand, IPermission permThatFailed) +166
System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object assemblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandleInternal rmh, SecurityAction action, Object demand, IPermission permThatFailed) +100
System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandleInternal rmh, Object assemblyOrString, SecurityAction action, Boolean throwException) +272
System.Security.CodeAccessSecurityEngine.CheckSetHelper(CompressedStack cs, PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandleInternal rmh, RuntimeAssembly asm, SecurityAction action) +55
System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) +0
System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName) +70
System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +39
System.Type.GetType(String typeName) +32
System.CodeDom.Compiler.CompilerInfo.get_IsCodeDomProviderTypeValid() +10
System.Web.Compilation.CompilationUtil.GetRecompilationHash(CompilationSection ps) +2085
System.Web.Configuration.CompilationSection.get_RecompilationHash() +107
System.Web.Compilation.BuildManager.CheckTopLevelFilesUpToDateInternal(Int64 cachedHash) +465
System.Web.Compilation.BuildManager.CheckTopLevelFilesUpToDate(Int64 cachedHash) +51
System.Web.Compilation.BuildManager.ExecutePreAppStart() +132
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +521
I try to resolve it by adding <trust level="Full"/> but once I do I receive another error.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: This configuration section cannot be used at this path. This happens when the site administrator has locked access to this section using from an inherited configuration file.
Source Error:
An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
It says the error is on the same line as what i just added (<trust level="Full"/>). It just keeps going in circles and I don't know what else to do. If anyone has any ideas it would be a huge help. Thank you!
Server Error in '/' Application.
Keyword not supported: 'flush interval'.
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.ArgumentException: Keyword not supported: 'flush interval'.
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:
[ArgumentException: Keyword not supported: 'flush interval'.]
System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey) +5764228
System.Data.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useOdbcRules) +95
System.Data.SqlClient.SqlConnectionString..ctor(String connectionString) +59
System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous) +27
System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(DbConnectionPoolKey key, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions) +167
System.Data.SqlClient.SqlConnection.ConnectionString_Set(DbConnectionPoolKey key) +61
System.Data.SqlClient.SqlConnection.set_ConnectionString(String value) +94
System.Data.SqlClient.SqlConnection..ctor(String connectionString, SqlCredential credential) +26
System.Data.SqlClient.SqlConnection..ctor(String connectionString) +11
UCommerce.Installer.RuntimeVersionChecker.GetUCommerceDatabaseAssemblyVersion() +133
UCommerce.Installer.UpdateService.UpdateIsNeeded() +30
UCommerce.Umbraco7.Installer.Installer.InstallInternal() +498
UCommerce.Umbraco7.Installer.Installer.PreStart(Object sender, EventArgs e) +99enter code here
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +141
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69
Thanks for asking :)
Are you using SQL CE?
- uCommerce doesn't support CE, therefore you need to use Sql express or Sql Server to install uCommerce.
uCommerce actually has an community, which will help you with uCommerce questions.
http://eureka.ucommerce.net/ -Normally, we don't check in here that often. So you will get an faster answer on Eureka.
Let me know if you need any extra help to this.
Regards
Mads
My ASP.NET MVC 3 app works fine on my local machine (And usually works fine when i deploy it), but on this occasion i get the following error. The server is windows 2008 R2 with IIS7
EDIT: Bothe ILoggingService & IConfigSettings are both bound in Singleton Scope by Ninject (If That Helps)
Anyone get any pointers on what i should look for?
Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an object.
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:
[NullReferenceException: Object reference not set to an instance of an object.]
DataPortal.Models.Repositories.KpiRepository..ctor(ILoggingService ls, IConfigSettings configSettings) +1295
DynamicInjector3f592a0195c345d8a7d555c4c4085e12(Object[] ) +128
Ninject.Activation.Context.Resolve() +279
System.Linq.WhereSelectEnumerableIterator`2.MoveNext() +237
System.Linq.Enumerable.SingleOrDefault(IEnumerable`1 source) +298
System.Linq.WhereSelectArrayIterator`2.MoveNext() +109
System.Linq.Buffer`1..ctor(IEnumerable`1 source) +487
System.Linq.Enumerable.ToArray(IEnumerable`1 source) +103
Ninject.Activation.Providers.StandardProvider.Create(IContext context) +479
Ninject.Activation.Context.Resolve() +279
System.Linq.WhereSelectEnumerableIterator`2.MoveNext() +237
System.Linq.Enumerable.SingleOrDefault(IEnumerable`1 source) +298
System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +67
[InvalidOperationException: An error occurred when trying to create a controller of type 'DataPortal.Controllers.KpiController'. Make sure that the controller has a parameterless public constructor.]
System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +247
System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName) +85
System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory) +280
System.Web.Mvc.<>c__DisplayClass6.<BeginProcessRequest>b__2() +66
System.Web.Mvc.<>c__DisplayClassb`1.<ProcessInApplicationTrust>b__a() +19
System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Func`1 func) +161
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +405
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +375
it was a dependency issue in the end. The project had a dependency on another project that hadn't been deployed.
It seems one of your argument "LoggingService or ConfigSettings" is not configured properly in your web.config. Check your previous working version config file.
In some cases it can be related to a problem with the database for example :
a select which returns a null value without a correct exception handling would cause the same error. Therefore,one needs to check his sql requests.