473,807 Members | 2,856 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

unhandled SecurityExcepti on in Visual Basic 2005 Express

I'm trying to read in a text file using code that I copied and pasted from
the MS help file.

Using Reader As New _
Microsoft.Visua lBasic.FileIO.T extFieldParser( "c:\bankche ck")

At this line I get "Request for the permission of type
'System.Securit y.Permissions.F ileIOPermission , mscorlib, Version=2.0.0.0 ,
Culture=neutral , PublicKeyToken= b77a5c561934e08 9' failed."

I've tried researching this in the help files and on the web but, I must
confess, that what I've found has only confused me more.

The file DOES exist and I have full permissions to it. What am I doing wrong
and how can I fix it?

Thanks for you help.
Ken

Jul 19 '06 #1
2 924
Ken,

I tried your command and cannot get any error. Your file description looks
strange to me, are you sure it exist and is a text file?

Cor

"KenEisman" <Ke*******@disc ussions.microso ft.comschreef in bericht
news:23******** *************** ***********@mic rosoft.com...
I'm trying to read in a text file using code that I copied and pasted from
the MS help file.

Using Reader As New _
Microsoft.Visua lBasic.FileIO.T extFieldParser( "c:\bankche ck")

At this line I get "Request for the permission of type
'System.Securit y.Permissions.F ileIOPermission , mscorlib, Version=2.0.0.0 ,
Culture=neutral , PublicKeyToken= b77a5c561934e08 9' failed."

I've tried researching this in the help files and on the web but, I must
confess, that what I've found has only confused me more.

The file DOES exist and I have full permissions to it. What am I doing
wrong
and how can I fix it?

Thanks for you help.
Ken

Jul 20 '06 #2
KenEisman wrote:
At this line I get "Request for the permission of type
'System.Securit y.Permissions.F ileIOPermission , mscorlib, Version=2.0.0.0 ,
Culture=neutral , PublicKeyToken= b77a5c561934e08 9' failed."
The file DOES exist and I have full permissions to it.
/You/ might have, but your /code/ doesn't.
Code Access Security, part of the .Net Framework, does away with all
that "you have to run it under this account for it to work" nonsense.
Every program runs in a security "sandbox" (although the "LocalZone" one
is /pretty/ big!).

Are you running this code from a network file share? Something like

\\server\share\ ...\myprogram.e xe

If so, your program runs in a /much/ smaller "sandbox" - by default, the
Framework doesn't distinguish between your network share and
www.DodgyAndDangerousSoftware.com (apologies to anyone who actually owns
a site of this name!)

Read up on the CASPOL (command line) utility or find the "Microsoft .Net
Framework ?.? Configuration" program (GUI) in your PC's Administative
Tools.

HTH,
Phill W.
Jul 20 '06 #3

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

Similar topics

2
387
by: Bootstrap Bill | last post by:
A new Google group has been formed for the purpose of discussing the new Visual Studio Express products. http://groups-beta.google.com/group/Visual-Studio-Express The products are currently in beta testing and include Visual Basic 2005 Express, Visual C# 2005 Express, Visual C++ 2005 Express, Visual C++ 2005 Express, Visual J# 2005 Express, Visual Web Dev 2005 Express and SQL Server 2005 Express.
6
2562
by: Brian Henry | last post by:
Visual Basic 2005 Express: http://download.microsoft.com/download/f/c/7/fc7debaf-4513-4300-9e6a-8fe27be88cd1/vbsetup.exe Visual C# 2005 Express: http://download.microsoft.com/download/2/d/2/2d221839-eaf9-4d91-899e-95a9af12202e/vcssetup.exe Visual C++ 2005 Express: http://download.microsoft.com/download/3/f/3/3f3e65c3-9f57-40ee-a95b-57d49e560883/vcsetup.exe Visual J# 2005 Express:
7
5409
by: Sabo, Eric | last post by:
We are an educational environment, we are using VB .Net and Windows XP SP2. The users are power users. We have a Visual Basic .Net class that is having trouble with their project, they are getting the following error message "An unhandled exception of type 'System.Security.SecurityException'". Does anyone have any suggestions? --
4
2540
by: Andrew Robinson | last post by:
My main dev machine has WinXp and VS2005 (pro). 1. I need to install VWD Express Edition so that I can do some instruction on this. Any issues with both on the same machine. Installation order? 2. Does VWD Express Edition support the idea of Solutions? I coun't figure out how to create a blank solution which I usually do with VS2005 (and then add my web site to the solution.)
0
2052
by: Seok Bee | last post by:
Dear Experts, I've created a Console application to perform a checking of an Excel file. During development using vb.net in Visual Studio 2005, the application is running fine. I can get my expected result. Then I move the executable files and related *.dll files into a server to schedule for execution. The server is running on Windows 2000 sp4 and installed with .NET Frameword 1.1 and 2.0. When I execute the application I received and...
2
3454
by: Progman | last post by:
I have Visual Studio 2005 Standard edition. Is ti the same thing as the Express edition or Standard is more?
8
2099
by: Zardax | last post by:
Hi !!! I need to know if there is compatibility between VB 6.0 and Visual Basic 2005 Express Everything I need is to compile the VB 6.0 code in Visual Basic 2005 Express without re-write the code. So If anyone has any idea about this...
3
1697
by: Pitaridis Aristotelis | last post by:
Is there any way to create setup for a project made in Microsoft Visual Basic 2005 Express Edition
2
1942
by: Hunk Gym | last post by:
VB.Net of Visual Studio.Net 2003 VS Visual Basic 2005 Express Edition Good Day! Would be appreciate if there is solution for the following problem: - In VB.Net of Visual Studio.Net 2003, developer can click and drag a table listed in the Server Explorer from a connected database to the form. This will add OleDbConnection control and OleDbDataAdapter control to the form . Developer can also Click Data -Generate Dataset to generate...
10
2711
by: kimiraikkonen | last post by:
Visual C#.NET 2005 express has some issues, unlike VB.NET 2005 has none of them: The most annoying one is: For example if there's a coding error, it must be reported at the buttom of the screen in "error list" "REAL-TIME". At least, that was like that in VB.NET 2005 express. But in Visual C# .NET 2005 you won't be able to aware of coding errors till you press "play" build & run button.
0
10628
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10373
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10113
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9195
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7651
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6880
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5547
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5685
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4331
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.