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,
JavvymDefinitely a permissions error,
Using windows explorer navigate to the folder where your excel file is stored right click the folder choose properies
Select the Security Tab
Add in Authenticated Users, if that doesn't work add the Everyone group
Try running the code again - should work :wave:
Cheers Al
Hi,
This solution doesn't solve the problem. Is there any other solution that you can give me?
Thanks,
Javvym
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
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment