Hi Ali,
Is it possible that your E: drive is not a local drive, and is instead a drive mapped to some network share (or even a share off of your local
machine)? If this is the case, then even though it appears as a local drive, code run off of this drive will be from the LocalIntranet zone. You can find
out what code groups are getting matched to this code by running
caspol -rsg YourApp.exe
If this is the case, then you'll need to provide more trust to your assembly. I've provided some details on how to do this in a blog entry:
http://blogs.gotdotnet.com/shawnfa/PermaLink.aspx/40884dc9-dbb7-48e7-a70f-5f1f4627410c
-Shawn
--
This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they
originated.
--------------------
[quoted text, click to view] >From: "Ali" <elhamdiali@hotmail.com>
>Subject: ERROR : System.Security.SecurityException
>Date: Wed, 29 Oct 2003 08:13:49 -0600
>Lines: 22
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
>Message-ID: <ONWJkbinDHA.392@TK2MSFTNGP11.phx.gbl>
>Newsgroups:
microsoft.public.dotnet.faqs,microsoft.public.dotnet.framework,microsoft.public.dotnet.framework.adonet,microsoft.public.dotnet.framework.clr,micr
osoft.public.dotnet.framework.remoting,microsoft.public.dotnet.framework.sdk,microsoft.public.dotnet.fr
[quoted text, click to view] >NNTP-Posting-Host: 12.106.206.200
>Path: cpmsftngxa06.phx.gbl!cpmsftngxa09.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl
>Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework:57358 microsoft.public.dotnet.framework.adonet:64811
microsoft.public.dotnet.framework.clr:8477 microsoft.public.dotnet.framework.remoting:13879 microsoft.public.dotnet.framework.sdk:7997
microsoft.public.dotnet.faqs:12217
[quoted text, click to view] >X-Tomcat-NG: microsoft.public.dotnet.framework.clr
>
>I am getting the following error:
>
>System.Data.SqlClient.SqlClientPermission, System.Data, Version 1.0.5000.0,
>Culture=neutral, PublicKey Token=b77a5.... Failed.
>
>My code uses a reference to System.Data, tries to connect to my datatabase
>to retrive a couple of records. That's all. The error occurs when I try to
>open the connection.
>
>I checked my security listgroups (using caspol -lg) and everything looks
>normal.
>I run caspol -reset
>I removed and added the reference to System.Data making sure it is coming
>from the same server. Actually, my application is on the E: drive and the
>Microsoft.Net framework is on the C: drive.
>
>Please share any ideas on how to solve this problem. I thought that all
>mscorlib stuff is fully trusted.
>
>Ali
>
>
>