Have asp.net-hosted WinControl write to client

Discussion in 'ASP .Net Security' started by Mark, May 3, 2005.

  1. Mark

    Mark Guest

    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 I could use .Net Configuration Wizard > RuntimeSecurityPolicy >
    Machine >
    CodeGroups. I gave the codegroup the Url as evidence to match the page with
    the
    WinControl. I then gave it the file IO permission.

    I still 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..."

    Any ideas what else needs to be done?

    Thanks,
    Mark
     
    Mark, May 3, 2005
    #1
    1. Advertising

  2. Hello Mark,

    you may first try to give it full trust (just to see that it works) and after
    that locking down the permissions...

    HTH

    ---------------------------------------
    Dominick Baier - DevelopMentor
    http://www.leastprivilege.com

    > 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 I could use .Net Configuration Wizard >
    > RuntimeSecurityPolicy >
    >
    > CodeGroups. I gave the codegroup the Url as evidence to match the page
    > with the WinControl. I then gave it the file IO permission.
    >
    > I still 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..."
    >
    > Any ideas what else needs to be done?
    >
    > Thanks,
    > Mark
     
    Dominick Baier [DevelopMentor], May 4, 2005
    #2
    1. Advertising

  3. Mark

    Mark Guest

    Hello,
    I made a new group "TestWrite1", and gave it "Everything" and "Full Trust",
    but neither affected the problem.
    I tried this on both Machine and User.

    Is there something else I need to do to make this take affect?

    Thanks,
    Mark


    "Dominick Baier [DevelopMentor]" wrote:

    > Hello Mark,
    >
    > you may first try to give it full trust (just to see that it works) and after
    > that locking down the permissions...
    >
    > HTH
    >
    > ---------------------------------------
    > Dominick Baier - DevelopMentor
    > http://www.leastprivilege.com
    >
    > > 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 I could use .Net Configuration Wizard >
    > > RuntimeSecurityPolicy >
    > >
    > > CodeGroups. I gave the codegroup the Url as evidence to match the page
    > > with the WinControl. I then gave it the file IO permission.
    > >
    > > I still 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..."
    > >
    > > Any ideas what else needs to be done?
    > >
    > > Thanks,
    > > Mark

    >
    >
    >
    >
     
    Mark, May 5, 2005
    #3
    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:
    295
    A Lonely Programmer
    Feb 20, 2004
  2. Urs Eichmann
    Replies:
    2
    Views:
    1,867
    Steven Cheng[MSFT]
    Apr 11, 2005
  3. =?Utf-8?B?TWFyaw==?=

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

    =?Utf-8?B?TWFyaw==?=, Apr 27, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    454
    =?Utf-8?B?TWFyaw==?=
    Apr 27, 2005
  4. A Lonely Programmer

    Embedded winControl

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

    Questions about embedded winControl

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

Share This Page