Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old November 14th, 2005, 10:58 AM
Authorized User
Join Date: Oct 2004
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
Default System.Security problem


I have developed a .NET Windows application. I able to run(Execute) it from the local drive of my PC. If I try to execute it from the from network drives, then it gave the below Exception,

/************************************************** ****
Input directory dose not exists. Do you want to create?(Y/N): y

Error: at System.Security.CodeAccessSecurityEngine.CheckHelp er(PermissionSet grantedSet, PermissionSet deniedSet, Cod
eAccessPermission demand, PermissionToken permToken)
   at System.Security.CodeAccessSecurityEngine.Check(Per missionToken permToken, CodeAccessPermission demand, StackCrawlM
ark& stackMark, Int32 checkFrames, Int32 unrestrictedOverride)
   at System.Security.CodeAccessSecurityEngine.Check(Cod eAccessPermission cap, StackCrawlMark& stackMark)
   at System.Security.CodeAccessPermission.Demand()
   at System.IO.Directory.CreateDirectory(String path)
   at CSExport.DataExport.Main(String[] args)-Request for the permission of type System.Security.Permissions.FileIOPermi
ssion, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
Program is terminated!

************************************************** ************/
and the application is Crashing.

This is my code and I know for sure the program throws exception when it triies to create directory.

Please help me in solving this problem by adding code in the

Thanks & Regards,


Old November 14th, 2005, 01:24 PM
Authorized User
Join Date: Oct 2004
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts

I think, I got it fix.

Similar Threads
Thread Thread Starter Forum Replies Last Post
System.Security.SecurityException: Security error coolcatjk Pro VB.NET 2002/2003 4 March 2nd, 2006 06:00 PM
System.Security.SecurityException davepruce ADO.NET 1 May 10th, 2005 11:20 AM
Security = System.mdw ?? martinaccess Access 5 November 13th, 2004 11:45 AM
'System.Security.SecurityException' Jesus VB.NET 2002/2003 Basics 0 November 4th, 2004 02:20 AM
'System.Security.SecurityException' mrinal ADO.NET 3 August 11th, 2004 07:16 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.