Results 1 to 4 of 4

Thread: System.security.securityException: Permission denied in ASP.NET

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2004
    Posts
    25

    Question System.security.securityException: Permission denied in ASP.NET

    Hi Friends,

    I have to write into an Excel file through my web application. I wrote a program in VB6 which executes the tasks I need to do on the Excel file, and saved it as a .dll. This .dll was than added into the reference of the web application and it was also registered using regsvr32. When I execute this form then I get the following error:

    System.security.securityException: Permission denied.

    But, when I create the same form as a Windows application, add the reference & register .dll, then the code gets executed and we are able to make the required changes in the excel file.

    Plz help me solve this problem.

    Thanks,
    Javvym

  2. #2
    Fanatic Member aconybeare's Avatar
    Join Date
    Oct 2001
    Location
    UK
    Posts
    772

    Re: System.security.securityException: Permission denied in ASP.NET

    Definitely a permissions error,

    1. Using windows explorer navigate to the folder where your excel file is stored right click the folder choose properies
    2. Select the Security Tab
    3. Add in Authenticated Users, if that doesn't work add the Everyone group
    4. Try running the code again - should work


    Cheers Al

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Apr 2004
    Posts
    25

    Re: System.security.securityException: Permission denied in ASP.NET

    Hi,

    This solution doesn't solve the problem. Is there any other solution that you can give me???

    Thanks,
    Javvym

  4. #4
    Fanatic Member aconybeare's Avatar
    Join Date
    Oct 2001
    Location
    UK
    Posts
    772

    Re: System.security.securityException: Permission denied in ASP.NET

    First thing; I forgot to say to give the groups write Permissions, if you didn't do that then try the below

    Remove the Everyone, and Authenticated Users unless they were already there. If they were already there then remove the write permissions.

    On the security tab for the folder in question add in the ASPNet account give the user write permissions

    W2K - select the machine name from the top dropdown list, then pick ASPNet from the list
    XP - In the "Enter the Object names..." box enter the following [your machine name]\aspnet click check names

    Once you've got the account click ok - give the ASPNet account write permissions.

    Click Apply/Ok and try again

    With a bit of luck you'll have won.

    Cheers Al

Posting Permissions

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



Click Here to Expand Forum to Full Width