help with Security Exception ??

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default help with Security Exception ??

    Hi,

    I am getting the following error:

    Security Exception
    Description: 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 change the application's trust
    level in the configuration file.

    Exception Details: System.Security.SecurityException: Request for the
    permission of type System.Security.Permissions.StrongNameIdentityPerm ission,
    mscorlib, Version=1.0.3300.0, Culture=neutral,
    PublicKeyToken=b77a5c561934e089 failed.

    What is causing this is that my app is trying to load a file from the disk.
    When I run it local from my dev server it compiles ok, but when I migrated
    it to the staging server I am getting the error above. Is there a way I can
    programmatically alter this from the web.config file so that I can load this
    file from the filesystem?

    The code that is causing the error is below:

    oXMLDoc = New System.Xml.XmlDocument
    oXMLDoc.Load("data.xml")

    Thanks for any help!


    Tarren Guest

  2. Similar Questions and Discussions

    1. UserControl Security Exception
      I am trying to write directly to the printer as in article KB322090 but via a usercontrol hosted in an ASPX page. When I get the the OpenPrinter...
    2. EventLogTraceListener Security Exception
      I 'think' my problem is the result of my attempts to use an EventLogTraceListener as I am getting an Security Exception as follows in this...
    3. Security Exception
      On Tue, 06 Jul 2004 20:56:52 GMT, "jamie" <jamie.jones@virgin.net> wrote: It's not an IIS issue. Try annoying just the other five groups for...
    4. Security Exception on ASP.Net app
      I've recently moved an ASP.Net app to our deployment server after it was verified on our integration test server. On the deployment server I am...
    5. strange xsl security exception under asp.net
      hey all, if anyone has any info on the following (or any experiments to suggest), i'd be grateful. i'm at a complete loss. exception: ...
  3. #2

    Default Re: help with Security Exception ??

    Hi,

    Use identity tag in web.config to set user with write permission.

    <identity impersonate="true" userName="contoso\Jane" password="pass" />

    Natty Gur, CTO
    Dao2Com Ltd.
    34th Elkalay st. Raanana
    Israel , 43000
    Phone Numbers:
    Office: +972-(0)9-7740261
    Fax: +972-(0)9-7740261
    Mobile: +972-(0)58-888377


    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Natty Gur Guest

  4. #3

    Default Re: help with Security Exception ??

    it is 3rd party hosting? How would I go about it in that way?

    "Natty Gur" <natty@dao2com.com> wrote in message
    news:OHqqx7wWDHA.652@tk2msftngp13.phx.gbl...
    > Hi,
    >
    > Use identity tag in web.config to set user with write permission.
    >
    > <identity impersonate="true" userName="contoso\Jane" password="pass" />
    >
    > Natty Gur, CTO
    > Dao2Com Ltd.
    > 34th Elkalay st. Raanana
    > Israel , 43000
    > Phone Numbers:
    > Office: +972-(0)9-7740261
    > Fax: +972-(0)9-7740261
    > Mobile: +972-(0)58-888377
    >
    >
    > *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    > Don't just participate in USENET...get rewarded for it!

    Tarren Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139