私は、ASP.NET 3.5、NHibernate 2.2、およびDependency InjectionのためのSprint .NETで動作するサイトを持っています。私たちのテストサーバーでは、むしろ奇妙なエラーが発生し、また、ほぼいつでも、複数のユーザーがオンラインになっています。問題が発生すると、IISRESETを実行するまで、このエラーはすべてのユーザーと要求ごとに表示されます。その後、もう一度OKです。ここで奇妙なエラー:[ArgumentOutOfRangeException: 'count'は負でない必要があります
は例外です:
'count' must be non-negative.
Parameter name: count
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.ArgumentOutOfRangeException: 'count' must be non-negative.
Parameter name: count
Source Error:
[No relevant source lines]
Source File: c:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\4bf9aa39\6dcf5fc6\App_Web_z9ifuy6t.6.cs Line: 0
Stack Trace:
[ArgumentOutOfRangeException: 'count' must be non-negative.
Parameter name: count]
System.String.CtorCharCount(Char c, Int32 count) +10082288
Spring.Objects.Factory.Support.AbstractObjectFactory.GetObjectInternal(String name, Type requiredType, Object[] arguments, Boolean suppressConfigure) +3612
Spring.Objects.Factory.Support.AbstractObjectFactory.GetObject(String name) +75
Spring.Objects.Factory.Support.DefaultListableObjectFactory.GetObjectsOfType(Type type, Boolean includePrototypes, Boolean includeFactoryObjects) +365
Spring.Context.Support.AbstractApplicationContext.GetObjectsOfType(Type type, Boolean includePrototypes, Boolean includeFactoryObjects) +136
Spring.Context.Support.AbstractApplicationContext.GetObjectsOfType(Type type) +66
[ActivationException: Activation error occured while trying to get instance of type InfoTextService, key ""]
Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key) in c:\Home\Chris\Projects\CommonServiceLocator\main\Microsoft.Practices.ServiceLocation\ServiceLocatorImplBase.cs:57
Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetInstance() in c:\Home\Chris\Projects\CommonServiceLocator\main\Microsoft.Practices.ServiceLocation\ServiceLocatorImplBase.cs:90
OurProjectsNamespace.Infrastructure.ObjectLocator.LocateService() +86
Spring.Objects.Factory.Support.DefaultListableObjectFactoryのデバッグを無効にすることは効果があります。私はこれを試してエラーが発生しないことを再度確認します。エラーは間違いなく奇妙ですが、かなり面白いです。うまくいけば、基本的な原因はこのエラーに限定されます...ありがとうスティーブン!新しいものがあれば私は投稿を更新しておきます。 – Mattias
@Mattias:私の所見が正しかったかどうか、またデバッグを無効にしても実際に問題が解決したかどうかは非常に不思議です。 – Steven
うまくいけば、私はすぐにあなたに答えを与えることができます。これはまだ生きていない実動サーバーでのみ発生します。だから、次回のアップデートの後に私たちは見るでしょう。 – Mattias