Have asp.net-hosted WinControl write to client's file.

Discussion in 'ASP .Net' started by =?Utf-8?B?TWFyaw==?=, Apr 27, 2005.

  1. Hello,
    I know that you can host a WinControl in ASP.Net. If I want my Windows User
    Control to be able to write to the client's file system (or access a
    database, or any other secure action), how could I configure security to
    allow this? I thought Caspol.exe or the .Net Config Wizards could do this,
    but I don't see how.

    I get the error: "The application attempted to perform an operation not
    allowed by the security policy. The operation required the
    SecurityException... System.Security.Permissions.FileIOPermission..."

    I've tried (none work):
    - using Declarative security in the code, i.e. put the attribute on the
    appropriate method:
    [Permissions.FileIOPermission(Permissions.SecurityAction.Assert)]
    - Use .Net Configuration Wizard > RuntimeSecurityPolicy > Machine >
    CodeGroups. I gave the codegroup the Url to match the page with the
    WinControl.
    - switching the machine.config's process model username to system (more
    priviledge).
    - setting security in IE.

    I've googled on the error and looked at MSDN, and see much stuff for apps
    run over a network share, but still don't see a solution for an
    asp.net-hosted winControl.

    Thanks for any insight.
    Mark
     
    =?Utf-8?B?TWFyaw==?=, Apr 27, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. A Lonely Programmer

    wincontrol question...Please help =(

    A Lonely Programmer, Feb 20, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    297
    A Lonely Programmer
    Feb 20, 2004
  2. Urs Eichmann
    Replies:
    2
    Views:
    1,874
    Steven Cheng[MSFT]
    Apr 11, 2005
  3. A Lonely Programmer

    Embedded winControl

    A Lonely Programmer, Feb 20, 2004, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    143
    Alessandro Zifiglio
    Feb 20, 2004
  4. A Lonely Programmer

    Questions about embedded winControl

    A Lonely Programmer, Feb 27, 2004, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    140
    Muckeypuck
    Mar 4, 2004
  5. Mark

    Have asp.net-hosted WinControl write to client

    Mark, May 3, 2005, in forum: ASP .Net Security
    Replies:
    2
    Views:
    229
Loading...

Share This Page