troubleshooting Question

Error on startup of mapped network application - clr20r3 and mscorlib.

Avatar of cmrnp
cmrnp asked on
Assembly.NET Programming
16 Comments5 Solutions8036 ViewsLast Modified:
I have created a simple .net application that extracts from Sql server into a .csv file using ADO .net and
Program runs fine on my local drive but will not run on mapped network drive.
Program requires .net framework 2 as uses generics etc.

On network drive, program crashes straight away, writes error message to event log.
Event Type:      Error
Event Source:      .NET Runtime 2.0 Error Reporting
Event Category:      None
Event ID:      5000
Date:            14/02/2008
Time:            11:52:40 AM
User:            N/A
Computer:      DEVELOPMENT3
EventType clr20r3, P1 harveyextract.exe, P2, P3 47b3aca8, P4 mscorlib, P5, P6 461eee3d, P7 399, P8 a, P9 n3ctrye2kn3c34sgl4zqyrbfte4m13nb, P10 NIL.

P1 is my program name but the rest is gobbledygook.
I have tried tracing on 1st step in program and it does not make it that far.
I have also got tracing on in my Error handler routine.

I have searched for similar answers to this and noted that most have etc in the Event log error so don't believe unhandled errors are my problem.

One of the answers that I came across said to use the .net framework 1.1 security wizard to trust the assembly, When I tried this, it wouldn't even load the assembly on the Clients mapped drive which I logon remotely as an administrator for.
On our mapped network drive it would load but got error message below however, I'm not an administrator for the our mapped network drive.

Error from Our mapped network drive
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Security.SecurityException: Hash for the assembly cannot be generated.
   at System.Security.Policy.Hash.get_RawData()
   at System.Security.Policy.Hash.get_SHA1()
   at Microsoft.CLRAdmin.CFullTrustWizard.CreateCodegroup(PermissionSet pSet, Boolean fHighjackExisting)
   at Microsoft.CLRAdmin.CFullTrustWizard.TryToCreateFullTrust()
   at Microsoft.CLRAdmin.CFullTrustWizard.WizNext(Int32 nIndex)
   at Microsoft.CLRAdmin.CWizardEngine.onNextFinishClick(Object o, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.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)
The Zone of the assembly that failed was:

************** Loaded Assemblies **************
    Assembly Version:
    Win32 Version: 2.0.50727.832 (QFE.050727-8300)
    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    Assembly Version:
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_32/mscorcfg/
    Assembly Version:
    Win32 Version: 2.0.50727.832 (QFE.050727-8300)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/
    Assembly Version:
    Win32 Version: 2.0.50727.832 (QFE.050727-8300)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/
    Assembly Version:
    Win32 Version: 2.0.50727.832 (QFE.050727-8300)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/
    Assembly Version:
    Win32 Version: 2.0.50727.832 (QFE.050727-8300)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/
    Assembly Version:
    Win32 Version: 2.0.50727.832 (QFE.050727-8300)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Web/
    Assembly Version:
    Win32 Version: 2.0.50727.832 (QFE.050727-8300)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/
    Assembly Version:
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Security/
    Assembly Version:
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.DirectoryServices/
    Assembly Version:
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Messaging/
    Assembly Version:
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.ServiceProcess/

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the section.
The application must also be compiled with debugging

For example:

    < jitDebugging="true" />

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
**** End of Error from our mapped network drive to increase trust of assembly.

I've also heard of Caspol but not sure if this is the way to go either.

Any help would be great on this.
Either the answer or even how best to trace / debug it through.

I hope some of this makes sense.

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 5 Answers and 16 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 5 Answers and 16 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros