473,385 Members | 1,387 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Help, Strange "An exception 'System.TypeInitializationException'has occurred in ... error.

The program runs well on Local harddisk. But it always popup the
exception if I run it on Netware mapping disk. After debugger say there
is no source code on the exception. Also the following error shows. Very
strange.

Unhandled Exception: System.TypeInitializationException: The type
initializer fo
r "handnetconsole.Monitor" threw an exception. --->
System.Security.SecurityExce
ption: Request failed.
at handnetconsole.Monitor..cctor()

The granted set of the failing assembly was:
<PermissionSet class="System.Security.PermissionSet"
version="1">
<IPermission
class="System.Security.Permissions.EnvironmentPerm ission, mscorl
ib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Read="USERNAME"/>
<IPermission
class="System.Security.Permissions.FileDialogPermi ssion, mscorli
b, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Unrestricted="true"/>
<IPermission class="System.Security.Permissions.FileIOPermissio n,
mscorlib, V
ersion=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Read="G:\SHARED\ENERGY\CAMMS\Handnet\"
PathDiscovery="G:\SHARED\ENERGY\CAMMS\Handnet\"/>
<IPermission
class="System.Security.Permissions.IsolatedStorage FilePermission
, mscorlib, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089
"
version="1"
Allowed="AssemblyIsolationByUser"
UserQuota="9223372036854775807"
Expiry="9223372036854775807"
Permanent="True"/>
<IPermission
class="System.Security.Permissions.ReflectionPermi ssion, mscorli
b, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Flags="ReflectionEmit"/>
<IPermission class="System.Security.Permissions.SecurityPermiss ion,
mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Flags="Assertion, Execution, BindingRedirects"/>
<IPermission class="System.Security.Permissions.UIPermission,
mscorlib, Versi
on=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Unrestricted="true"/>
<IPermission class="System.Net.DnsPermission, System,
Version=1.0.5000.0, Cul
ture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Unrestricted="true"/>
<IPermission class="System.Drawing.Printing.PrintingPermission,
System.Drawin
g, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
version="1"
Level="DefaultPrinting"/>
<IPermission class="System.Diagnostics.EventLogPermission, System,
Version=1.
0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1">
<Machine name="."
access="Instrument"/>
</IPermission>
<IPermission
class="System.Security.Permissions.UrlIdentityPerm ission, mscorl
ib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"

Url="file://G:/SHARED/ENERGY/CAMMS/Handnet/handnetconsole.exe"/>

<IPermission
class="System.Security.Permissions.ZoneIdentityPer mission, mscor
lib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Zone="Intranet"/>
</PermissionSet>

--- End of inner exception stack trace ---
at handnetconsole.Monitor.Main(String[] args)
Nov 16 '05 #1
3 23061
I found the following statement cause the problem on Netware mapping
driver only (Local hard disk no problem):

static OleDbConnection conn = new OleDbConnection(connStr);
Nov 16 '05 #2
After I move the statement

static OleDbConnection conn = new OleDbConnection(connStr);

from class member to function variable.

OleDbConnection conn = new OleDbConnection(connStr);

The error changed to:

"An unhandled exception of type 'System.Security.SecurityException'
occurred in Unknown Module.

Additional information: Request failed."

Very strange. Why it occur when run the program on netware mapping drive?
Nov 16 '05 #3
All code under .net framework runs with a set of rights. The code
started from the local harddisk has full rights, while code, loaded from
a network is restricted. You can give more permissions to some assembly
using AdministartiveTools/Microsoft Framework 1.1 Configuration or
Microsoft Framework 1.1 Wizards.

Sunny

In article <uL**************@TK2MSFTNGP11.phx.gbl>, nbdy9
@nospam.hotmail.com says...
After I move the statement

static OleDbConnection conn = new OleDbConnection(connStr);

from class member to function variable.

OleDbConnection conn = new OleDbConnection(connStr);

The error changed to:

"An unhandled exception of type 'System.Security.SecurityException'
occurred in Unknown Module.

Additional information: Request failed."

Very strange. Why it occur when run the program on netware mapping drive?

Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: dmiller23462 | last post by:
Hey guys, I'm back again....I've got the results displaying that I wanted but instead of having a "next" or "previous" link displayed I am getting the error msg below (I actually get the data that...
1
by: JVince | last post by:
Hi y'all upon compiling the code the application seems to be running okay from the c:\app\bin folder. When I try to distribute the application to a new folder (ie c:\prog) I get the JIT...
4
by: Seeheng | last post by:
I've created a VB.Net program running perfectly under local hard drive. But when move it to a network path (both UNC name and drive mapping tested), it gave "An exception...
2
by: Luke | last post by:
Hi I have the following code which is an ASP questionnaire using an Access database. (I am using access as I have no choice!). Basically there is an html form which submits the form to the page...
2
by: Randy Gadingan | last post by:
Please help. This error always pops-up everytime I try to run my asp.net application.
2
by: Agnes | last post by:
Same application, When use the dataset expor to EXCEL, work very well. However, for some PC I will got the following error "DOES NOT SUPPORT A COLLECTION.(EXCEPTION FROM HRESULT :...
0
by: DC | last post by:
The problem I'm using the .NET GridView and FormView objects for the first time and im getting the error "An OleDbParameter with ParameterName '@ID' is not contained by this...
0
by: koredump | last post by:
Hi all, I have a windows app that makes some asyc calls to my webservice (WSE 3.0 with MTOM). exception gets thrown in the client win app. I know this exception is caused on the async...
1
by: chandhrakv | last post by:
Hi experts, Can any one please respond with the resolution. Machine: WIN2K3, ASP.NET application, .NET 2.0 with June 2007 hotfix installed recently. Facing daily 1000 errors with the same type...
3
by: chandhrakv | last post by:
Event code: 3005 Event message: An unhandled exception has occurred. Event time: 11/18/2009 3:03:53 PM Event time (UTC): 11/18/2009 9:33:53 AM Event ID: ef3014ea80424b00b1bc2e7095fffe4c ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.