Los detalles completos de excepción son:Ayuda necesaria con TypeAccessException: Intento por el método ... para acceder tipo ... no
System.TypeAccessException occurred
Message=Attempt by method 'DynamicClass.(System.Text.StringBuilder, System.Object, Int32)' to access type 'System.Collections.Generic.IEnumerable`1<System.Collections.Generic.KeyValuePair`2<System.Object,NetworkCatcher.Entities.Server.CalculatedFCStateManager+Descriptor>>' failed.
Source=Anonymously Hosted DynamicMethods Assembly
TypeName=""
StackTrace:
at (StringBuilder , Object , Int32)
InnerException:
El nombre del método DynamicClass.(System.Text.StringBuilder, System.Object, Int32)
corresponde a este método generada dinámicamente:
private delegate StringBuilder AppendToStringBuilderDelegate(StringBuilder sb, object obj, int maxItemsToDisplay);
private static AppendToStringBuilderDelegate EmitDelegate(Type type, MethodInfo methodInfo)
{
var dynamicMethod = new DynamicMethod(string.Empty, typeof(StringBuilder), TypeArray<StringBuilder, object, int>.Value);
var parameters = methodInfo.GetParameters();
var il = dynamicMethod.GetILGenerator();
il.Emit(OpCodes.Ldarg_0);
il.Emit(OpCodes.Ldarg_1);
il.Emit(OpCodes.Unbox_Any, parameters[1].ParameterType);
il.Emit(OpCodes.Ldarg_2);
il.EmitCall(OpCodes.Call, methodInfo, null);
il.Emit(OpCodes.Ret);
return s_methodCache[type] = (AppendToStringBuilderDelegate)dynamicMethod.CreateDelegate(typeof(AppendToStringBuilderDelegate));
}
El seguimiento de pila es:
[Lightweight Function]
Shunra.Common.dll!Shunra.Common.DebugUtils.AppendObject<System.Collections.Generic.IDictionary<object,NetworkCatcher.Entities.Server.CalculatedFCStateManager.Descriptor>>(System.Text.StringBuilder sb, System.Collections.Generic.IDictionary<object,NetworkCatcher.Entities.Server.CalculatedFCStateManager.Descriptor> obj, int maxItemsToDisplay) Line 261 + 0x14 bytes C#
Shunra.Common.dll!Shunra.Common.DebugUtils.ToString<System.Collections.Generic.IDictionary<object,NetworkCatcher.Entities.Server.CalculatedFCStateManager.Descriptor>>(System.Collections.Generic.IDictionary<object,NetworkCatcher.Entities.Server.CalculatedFCStateManager.Descriptor> obj, int maxItemsToDisplay) Line 435 + 0x4d bytes C#
NC.Entities.Server.dll!NetworkCatcher.Entities.Server.CalculatedFCStateManager.Populate() Line 98 + 0x2c bytes C#
NC.Entities.Server.dll!NetworkCatcher.Entities.Server.RunManager.Initialize() Line 500 + 0x1c bytes C#
NC.Entities.Server.dll!NetworkCatcher.Entities.Server.EntryPoint.OnStart() Line 63 + 0x5 bytes C#
Shunra.Infra.dll!Shunra.Infra.EntryPoint.Start() Line 37 + 0xb bytes C#
Shunra.Common.dll!Shunra.Common.Wcf.ShunraServiceHost.OnOpening() Line 47 + 0x11 bytes C#
System.ServiceModel.dll!System.ServiceModel.Channels.CommunicationObject.Open(System.TimeSpan timeout) + 0x113 bytes
System.ServiceModel.dll!System.ServiceModel.Channels.CommunicationObject.Open() + 0x25 bytes
NC.Server.Host.exe!NetworkCatcher.Server.Host.NCServerInstance.StartHosts() + 0xef bytes
Shunra.Common.dll!Shunra.Common.Wcf.ShunraServerInstance<NetworkCatcher.Server.Host.NCServerInstance,NetworkCatcher.Server.Host.ServerHost>.Run() Line 357 + 0xb bytes C#
NC.Server.Host.exe!NetworkCatcher.Server.Host.Program.Main(string[] args) + 0x84 bytes
Por último, los dos conjuntos - Shunra. Common.dll y NC.Entities.Server.dll pertenecen a la misma base de código. NC.Entities.Server.dll se carga desde la carpeta bin privada ubicada inmediatamente debajo de la carpeta raíz, donde vive Shunra.Common.dll.
Todo funcionó bien, hasta que decidí ejecutar el código en otra cuenta. Entonces, creé una nueva cuenta, la convertí en administrador y abrí una ventana de consola elevada en esta cuenta. La cuenta tiene acceso a todos los archivos. Aún así, cuando ejecuto la aplicación obtengo este error y estoy completamente perdido.
¿Alguna idea?
Gracias.
bien, me encontré fuslogvw- ambos con fallos de enlace de registro y con el registro de todos.No vi nada extraordinario, pero si tiene algo concreto en mente, dígame qué publicar y lo haré. – mark
Nada más concreto que ver si alguno de los enlaces de su aplicación falló, pero tendría que hacer doble clic en las entradas en la ventana principal para ver los detalles de cada enlace. De lo contrario, estoy bastante perplejo también. – Cyberycon