Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / CLR / February 2004

Tip: Looking for answers? Try searching our database.

SecurityException & Request failed: How to know more ??

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
fc308@hotmail.com - 11 Dec 2003 10:14 GMT
Maybe someone knows how to solve this one.

My context is the following: a VB.NET WinForms app
gives the following error message when launched in
the Internet Zone.

[...other dependent libraries loading...]
Loaded 'C:\WINDOWS\assembly\GAC_Neutral\System.Xml\1.2.3400.0__b77a5c561934e089\System.Xml.dll',
No symbols loaded: 'Cannot find or open the PDB file.'
An unhandled exception of type 'System.Security.SecurityException'
occurred in TestApplication.exe

Additional information: Request failed.

How can I determine where the problem comes from ?
(Btw, that's a bit weak to be called "Additional information",
don't you think ? ;-))

The app depends on a library which has a strong name,
allows partially trusted callers, and itself depends
on the following base libraries:

assembly extern legacy library mscorlib
assembly extern legacy library System.Windows.Forms
assembly extern legacy library System.Drawing
assembly extern legacy library System
assembly extern legacy library System.Xml

Neither the app nor the library do anything special
with security explicitely (demand, assert etc.).

I have traced the exact location of where the problem
occurs to be the call to InitializeComponent, in the
main form's constructor (where objects from the library
are instantiated). The debugger won't enter the method,
and even tracing the IL/assembler in DbgCLR will not show
why that call cannot be made.

So basically if anyone has any idea as to how to know
what causes the error it would be great !

Thanks
FC
Peter Koen - 12 Dec 2003 02:37 GMT
> Maybe someone knows how to solve this one.
>
> My context is the following: a VB.NET WinForms app
> gives the following error message when launched in
> the Internet Zone.

Not all assemblies are allowed to be excuted from the Internet Zone. You
can use caspol.exe to configure the security for the different zones.

Greets
Peter

Signature

------ooo---OOO---ooo------

Peter Koen - www.kema.at
       MCAD MCDBA
   CAI/RS CASE/RS IAT

------ooo---OOO---ooo------

fc308@hotmail.com - 12 Dec 2003 10:28 GMT
> Not all assemblies are allowed to be excuted from the Internet Zone. You
> can use caspol.exe to configure the security for the different zones.

Peter, thanks for this.  My point is that there are things I
could do to make this application work in the Internet Zone
(modify the code, remove some dependencies), if I knew why
it is not allowed to be executed from that zone.

And the problem is that the error message does not give me
a hint as to what causes the problem.  Isn't there a way to
get a more explicit error message or tool that would tell you
"here is why you are not allowed to run in the Internet Zone" ?

Cheers
"Shawn Farkas" - 03 Feb 2004 01:32 GMT
Unfortunately it is difficult to debug security exceptions in v1.0 and v1.1 of the framework, however this is one of the areas that the Visual Studio
team worked on for the upcoming Whidbey release, and you'll see a lot of improvement in their new features.  From Whidbey Visual Studio you'll
be able to sandbox your app on the local machine, pretending that it is running with lesser permissions.  Then when a security exception is thrown,
you'll be notified of the exact location that caused the exception, and some suggestions you can use to remove the security problem.  For more
information, you can check out Ivan and Sebastian's PDC talk: http://microsoft.sitestream.com/PDC2003/ARC/ARC340_files/Default.htm
-Shawn
http://blogs.msdn.com/shawnfa

Signature

This posting is provided "AS IS" with no warranties, and confers no rights.
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.  
--------------------

>From: fc308@hotmail.com
>Newsgroups: microsoft.public.dotnet.framework.clr
[quoted text clipped - 11 lines]
>NNTP-Posting-Date: Fri, 12 Dec 2003 10:28:34 +0000 (UTC)
>Path: cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA06.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08.phx.gbl!
newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!postnews1.google.com!not-for-mail
>Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.framework.clr:8975
>X-Tomcat-NG: microsoft.public.dotnet.framework.clr
[quoted text clipped - 13 lines]
>
>Cheers

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.