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 / New Users / April 2005

Tip: Looking for answers? Try searching our database.

Windows Control Hosted in IE Problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Saurabh Garg - 29 Apr 2005 15:18 GMT
Hi there,

I am facing a problem in my app which is a Windows Control hosted in
IE through object Tag.But when I try to do WebClient.UploadFile method
it throws SecurityException although i have done all the things i know
i have to do

1. Strong Name the Assembly
2. Create a permission set and a Custom Code Group in .NET
configuration tool
3. AllowPartiallyTrustedCallers at assembly level
4. The File IO and Security Permissions are included in the custom
permission set
5. FileIoPermission.Assert before calling WebClient.UploadFile method

I have no User Interface on the Windows Control, so UI permission is
not needed although i have tried that also, but the problem is not
about rendering the Control but when I fire UploadFile method of
WebClient a security Exception is thrown.

Ya one more thing i have also tried to Turn off the security by
caspol -s off
and also tried to register my assembly in fully trusted assembly list
by
caspol -m -addfulltrust <AssemblyName>

Plz if anybody have any suggestions plz tell me, its kind of very
urgent and i have to deliver the application to the client.

Thanks and Regards
Saurabh Garg
Dmytro Lapshyn [MVP] - 29 Apr 2005 15:43 GMT
Hi,

I am not sure but it might be that the IE explicitly denies FileIOPermission
to any control hosted on a Web page.

Please also refer to the following documents:

'Internet Explorer Security and Managed Execution' MSDN article (.NET
Framework Developer's Guide)
'INFO: How Internet Explorer Determines Permissions for .NET Framework
Assemblies' (KB article KB311301)

Signature

Sincerely,
Dmytro Lapshyn [Visual Developer - Visual C# MVP]

> Hi there,
>
[quoted text clipped - 27 lines]
> Thanks and Regards
> Saurabh Garg
dan.c.roth@gmail.com - 30 Apr 2005 18:24 GMT
Hi

If you are uploading to the server then the user (If you are
impersonating) or ASPNET needs permission.

Regards,

Daniel Roth
MCSD.NET

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.