Re: FileIOPermission Erro using referenced dll on shared hosting

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Brian this seems like an permission issue. ASPNET account doesn't seem
to be having a write permission for that specific directory. You need
to increase the access right to the directory in order to make this
work.

HTH

brian@xxxxxxxxxx wrote:
Hello

I get this error when trying to create a file:

Exception Details: System.Security.SecurityException: Request for the
permission of type 'System.Security.Permissions.FileIOPermission,
mscorlib, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089' failed.

The code that causes this error is in a seperate dll (in the bin
directory) to the webapp that is referenced and called to do various
things by the main web apps.

Exactly the same code works on other non-shared servers but on my new
hosting companies shared servers it errors.

I did have to remove one line of the web config:

<identity impersonate="false"/>

Otherwise the website would not even run complaining about not being
able to override the web hosts default value for this.

Ive checked the file is within the applications directory and have
tested creating the same file from a normal aspx page in the webapp and
that works fine so its specifically from the referenced dll.

Ive tried running the same code under .net 1.1 and .net 2. .net1.1
complains when creating the file, .net 2.0 complains when creating the
directory for the new file.

Anyone got any ideas? Id like to try it under full trust but my host
won't let me even to test if this is the issue.

Brian Norman

.



Relevant Pages

  • Re: My shop.
    ... I didn't say his opinion didn't matter Brian. ... rule on how much of a work may be used without prior permission. ... images from the Internet and modify or adapt them by using graphics ...
    (rec.sport.unicycling)
  • Re: scenes
    ... >Brian M. Scott wrote: ... unusual for all the parents to give permission; ... >about accepting the critique and evaluating the critiquer was worth the ... Of course if several critters mention the same passage, ...
    (rec.arts.sf.composition)
  • Re: Applesoft Reference Manual -- Blue Book - unlocked
    ... (Now Apple, Inc.) ... "permission" to post the manual. ... distribution rights, everything. ... For the Blue Book, Doc Wehyrich put in a hell of an effort, Brian ...
    (comp.sys.apple2)
  • Re: Workgroups and SP2
    ... Brian wrote: ... > a system restore on both PCs. ... > Places-View Workgroup Computers). ... > not have permission to use this network resource. ...
    (microsoft.public.windowsxp.network_web)
  • messed-up File Permissions
    ... permission, but pam_unix still complains. ... su does work from root to a user ID but not in reverse. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)