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 / ASP.NET / Security / December 2004

Tip: Looking for answers? Try searching our database.

Security question for a Winforms user control on a web page

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Joe - 21 Dec 2004 20:56 GMT
I have a winforms user control that I need to use in our web page. The
control connects to a remoting object.

When I try and make the initial connection I get an error message:

"The application attempted to perform an operation not allowed by the
security policy. To grant this application the required permission, please
contact your system administrator, or use the Microsoft .NET Framework
Configuration tool.

That assembly does not allow partially trusted callers"

I'm not sure what to do here. The assembly is downloaded by IE so I don't
know how to change its' permissions.

Thanks,
Joe
Scott Leonard - 22 Dec 2004 18:35 GMT
You need to set the AllowPartiallyTrustedClient in your AssemblyInfo, and
create a security policy in the .Net Configuration for your code. See this
thread: "Security Exception - Winform usercontrol hosted in ASP.NET" and
there's more info here as well:
http://blogs.msdn.com/shawnfa/archive/2003/06/20/57023.aspx
http://support.microsoft.com/default.aspx?scid=kb;en-us;311301&FR=1
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnforms/html/wi
nforms11122002.asp

http://www.eggheadcafe.com/articles/20021205.asp
http://msdn.microsoft.com/msdnmag/issues/02/01/userctrl/default.aspx
http://blogs.msdn.com/shawnfa/archive/2004/09/07/226530.aspx

HTH,
sbl

> I have a winforms user control that I need to use in our web page. The
> control connects to a remoting object.
[quoted text clipped - 13 lines]
> Thanks,
> Joe
Joe - 23 Dec 2004 03:27 GMT
Great links - Thanks!
I already had the APTC attribute but it didn't help. The reason was due to
the remoting. There were a number of other exceptions being thrown also. I
ended up setting my Internet zone to full trust to test it and it worked
fine.

I'm going to read the info in the links which I'm sure will solve my
problem.

Thanks again,
Joe

> You need to set the AllowPartiallyTrustedClient in your AssemblyInfo, and
> create a security policy in the .Net Configuration for your code. See this
> thread: "Security Exception - Winform usercontrol hosted in ASP.NET" and
> there's more info here as well:
> http://blogs.msdn.com/shawnfa/archive/2003/06/20/57023.aspx
> http://support.microsoft.com/default.aspx?scid=kb;en-us;311301&FR=1

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnforms/html/wi
nforms11122002.asp

> http://www.eggheadcafe.com/articles/20021205.asp
> http://msdn.microsoft.com/msdnmag/issues/02/01/userctrl/default.aspx
[quoted text clipped - 20 lines]
> > Thanks,
> > Joe

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.