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 System.text.io.streamreader.
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.
Below
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
Description:
EventType clr20r3, P1 harveyextract.exe, P2 1.0.0.0, P3 47b3aca8, P4 mscorlib, P5 2.0.0.0, 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 System.security.exception 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:
MyComputer


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

************** 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 system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

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.
Thanks
ASKER CERTIFIED SOLUTION
cmrnp

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