none
Could not load type 'System.Security.FrameSecurityDescriptorWithResolver' RRS feed

  • Pregunta

  • Hola a todos.

    He encontrado un error bastante raro.

    Despues de hacer una actualizacion automatica en mi laptop "windows 7 home - premium" en ingles y 64 bits me informo que habian 18 actualizaciones de las cuales solo instalo 9 y despues de 02 horas no pasaba de la actualizacion 9, apague el equipo y lo volvi a prender, fui al control panel y aplique el resto de actualizaciones y ahi si actualizo todo.

    Despues quise correr una aplcacion que esta hecha en visual basic 2010 y me dio un error muy raro (la aplicacion corria sin problemas antes de esta wctualizacion) el error que me da es el siguiente

    ------------- cuerpo del error -----------------------------------------------------------------------------------------------------------

    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    System.TypeInitializationException: The type initializer for 'System.Transactions.Diagnostics.DiagnosticTrace' threw an exception. ---> System.Configuration.ConfigurationErrorsException: An error occurred creating the configuration section handler for system.diagnostics: Attempt by method 'System.Configuration.TypeUtil.InvokeCtorWithReflectionPermission(System.Reflection.ConstructorInfo)' to access method 'System.Diagnostics.SystemDiagnosticsSection..ctor()' failed. (C:\Users\Roberto\Vet\VETERINARIA.exe.Config line 3) ---> System.MethodAccessException: Attempt by method 'System.Configuration.TypeUtil.InvokeCtorWithReflectionPermission(System.Reflection.ConstructorInfo)' to access method 'System.Diagnostics.SystemDiagnosticsSection..ctor()' failed. ---> System.TypeLoadException: Could not load type 'System.Security.FrameSecurityDescriptorWithResolver' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
       at System.Threading.CompressedStack.GetDelayedCompressedStack(StackCrawlMark& stackMark, Boolean walkStack)
       at System.Threading.CompressedStack.GetCompressedStack(StackCrawlMark& stackMark)
       at System.Security.CodeAccessSecurityEngine.ReflectionTargetDemandHelper(Int32 permission, PermissionSet targetGrant)
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle.PerformSecurityCheck(Object obj, RuntimeMethodHandleInternal method, RuntimeType parent, UInt32 invocationFlags)
       at System.RuntimeMethodHandle.PerformSecurityCheck(Object obj, IRuntimeMethodInfo method, RuntimeType parent, UInt32 invocationFlags)
       at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.Reflection.ConstructorInfo.Invoke(Object[] parameters)
       at System.Configuration.TypeUtil.InvokeCtorWithReflectionPermission(ConstructorInfo ctor)
       at System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.CreateSectionImpl(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentConfig, ConfigXmlReader reader)
       at System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.CreateSectionWithRestrictedPermissions(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentConfig, ConfigXmlReader reader)
       at System.Configuration.RuntimeConfigurationRecord.CreateSection(Boolean inputIsTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentConfig, ConfigXmlReader reader)
       at System.Configuration.BaseConfigurationRecord.CallCreateSection(Boolean inputIsTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentConfig, ConfigXmlReader reader, String filename, Int32 line)
       --- End of inner exception stack trace ---
       at System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult)
       at System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject)
       at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
       at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
       at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
       at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
       at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)
       at System.Configuration.ConfigurationManager.GetSection(String sectionName)
       at System.Configuration.PrivilegedConfigurationManager.GetSection(String sectionName)
       at System.Diagnostics.DiagnosticsConfiguration.GetConfigSection()
       at System.Diagnostics.DiagnosticsConfiguration.Initialize()
       at System.Diagnostics.DiagnosticsConfiguration.get_Sources()
       at System.Diagnostics.TraceSource.Initialize()
       at System.Diagnostics.TraceSource.get_Switch()
       at System.Transactions.Diagnostics.DiagnosticTrace..cctor()
       --- End of inner exception stack trace ---
       at System.Transactions.Diagnostics.DiagnosticTrace.get_Verbose()
       at System.Transactions.Transaction.get_Current()
       at System.Data.Common.ADP.IsSysTxEqualSysEsTransaction()
       at System.Data.Common.ADP.NeedManualEnlistment()
       at System.Data.OleDb.OleDbConnection.Open()
       at WindowsApplication1.MDIParent1.MDIParent1_Load(Object sender, EventArgs e) in C:\Documents and Settings\RDM\Mis documentos\VB_2010_Proy\VETERINARIA\VETERINARIA\VETERINARIA\MDIParent1.vb:line 103
       at System.EventHandler.Invoke(Object sender, EventArgs e)
       at System.Windows.Forms.Form.OnLoad(EventArgs e)
       at System.Windows.Forms.Form.OnCreateControl()
       at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       at System.Windows.Forms.Control.CreateControl()
       at System.Windows.Forms.Control.WmShowWindow(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.ContainerControl.WndProc(Message& m)
       at System.Windows.Forms.Form.WmShowWindow(Message& m)
       at System.Windows.Forms.Form.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


    -------------------------------------------- fn del error ----------------------------------------------------------------------

    (este es el archivo 'veterinaria.exe.config' que estaba usando

    ------------------- archivo orginal -----------------------------------------------------------

    <?xml version="1.0"?>
    <configuration>
      <system.diagnostics>
        <sources>
          <!-- This section defines the logging configuration for My.Application.Log -->
          <source name="DefaultSource" switchName="DefaultSwitch">
            <listeners>
              <add name="FileLog" />
              <!-- Uncomment the below section to write to the Application Event Log -->
              <!--<add name="EventLog"/>-->
            </listeners>
          </source>
        </sources>
        <switches>
          <add name="DefaultSwitch" value="Information" />
        </switches>
        <sharedListeners>
          <add name="FileLog" type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" initializeData="FileLogWriter" />
          <!-- Uncomment the below section and replace APPLICATION_NAME with the name of your application to write to the Application Event Log -->
          <!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> -->
        </sharedListeners>
      </system.diagnostics>
      <startup useLegacyV2RuntimeActivationPolicy="true">
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
        <requiredRuntime version="v4.0.30319" />
      </startup>
    </configuration>

    ----------------------------------- fin del archivo original --------------------------------------------------

    Reinstale el Net framework 4 pero el error continuaba, y reito, antes de la actualizacion funcionaba ok.

    bueno como no encontre nada en internet me puse a "adivinar" y esto fur lo que yo hice fue:

    le quite toda la parte de 'system.diagnostics'  y lo deje asi:

    ---------------------- Archivo alterado -------------------------------------------------------------------------------

    <?xml version="1.0"?>
    <configuration>
      <startup useLegacyV2RuntimeActivationPolicy="true">
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
        <requiredRuntime version="v4.0.30319" />
      </startup>
    </configuration>

    ----------------------------------- fin del archivo alterado --------------------------------------------------

    Y el sistema corrio sin problemas.

    Podrian ayudarme a entender que es lo que esta pasando.

    Sera que al aagar la maquina durante la actualzacion malogre algo?

    viernes, 19 de julio de 2013 5:16