Re: Question about embedded winform controls

From: Kristof Van Praet (kristof_vanpraet_at_hotmail.com)
Date: 02/17/04


Date: Tue, 17 Feb 2004 15:46:01 +0100

You cannot acces the local filesystem from an embedded windows user control.
That is a security issue. Downloaded assemblies are placed in the download
cache and from there, they cannot access local resources (file system, db,
printer,...).

You can change the security policy for the assembly that you download. This
can be done in the Microsoft .NET Framework 1.1 Configuration console or the
Microsoft .NET Framework 1.1 Wizards. These can be found in the Administrive
tools window. There you can trust the assembly you want to use in the
browser. Not that this has to be done for every client machine that uses
this control.

I don't know if this was the answer you were looking for.
Regards.
Kristof

"A Lonely Programmer" <SpamaLinuxUser@NoSpamForMe.com> wrote in message
news:uuCK5MW9DHA.2316@TK2MSFTNGP09.phx.gbl...
Hi group,

Consider the following code:

Dim dirinfo As New DirectoryInfo("c:\test")
Dim fileinfo() As FileInfo = dirinfo.GetFiles
Dim fi As FileInfo
For Each fi In fileinfo
TreeView2.Nodes.Add(fi.Name)
Next

If instead of adding nodes to a treeview, i throw in a response.write the
following works perfectly fine in an aspx page. However, the same code in an
embedded windows control causes the component to not load.
everything else in the component will load if i take that out and throw in
random values. I suspect this is a security issue but the fact that it works
in an aspx page is throwing me off. Currently i am putting the dll into the
directory of the page, will it make any difference if i add it to the GAC? I
am so close to something really beautiful. any insight would be appreciated.

Thanks

Steve



Relevant Pages

  • Re: Some questions on web page embeded winform control.
    ... copy my content to web server fast without setting the version(we use fixed ... >> I put a winform control inside a IE web page. ... >> describes the download rule of IE? ... > new versions of files in general, rather than specifically assemblies. ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: Question about embedded winform controls
    ... Downloaded assemblies are placed in the download ... > You can change the security policy for the assembly that you download. ... > Dim fileinfo() As FileInfo = dirinfo.GetFiles ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: how to prevent downloading of an object
    ... The download in question is Macromedia's Shockwave Flash control. ... However if you want to disable downloading of ActiveX controls from web ... Clicking this icon will display the Security tab of the Internet Options ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: Local User Contral in IE with no web server involved???
    ... You have two options when enbedding a .NET control in a html page using ... install your control into the GAC ... You may have further security requirements affecting the .NET security ... >>if the control installed has greater version then specified - now download ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: Managed C++ control in Internet Explorer
    ... production environment is over 2000 desktops, so I would prefer not to have ... an upgrade that could potentially cause security issues. ... > will open up the door for ALL assemblies to run pretty much unrestricted. ... > will, however, allow you to develop your control until a proper solution ...
    (microsoft.public.dotnet.languages.vc)