1
votes

I have a webpart in a SharePoint 2007 site. This web part is written in object Model code. I am given Full Control to this Site Collection and can access the page with no issue.

When I tried to Edit it by clicking 'Site Actions--> Edit Page', I got the following error

Error:
The website declined to show this webpage- HTTP 403

Most likely causes:

•This website requires you to log in.
 What you can try:

Go back to the previous page. 


**More information**

This error (HTTP 403 Forbidden) means that Internet Explorer was able to connect to the website, but it does not have permission to view the webpage.

For more information about HTTP errors, see Help.
2
is that a user control or something like that which is accessing the File System path ? - Sigar Dave

2 Answers

0
votes

is that a user control or something like that which is accessing the File System path ?

if yes then you have to use SPSecurity.RunWithElevatedPrivilages(delegate() {}).

Have a look at this

Thanks

0
votes

I resolved the HTTP 403 Forbidden issue. The root cause of the issue is, in my code has access to the file system on the server,to which the logged in users do not have the access while Editing the web part.

I have used RunWithElevatedPrivileges but only for getting the site info and updating the list. The code reading the config file and logging into the log file does not covered under ElevatedPrivileges.

I included them with Elevated Privileges, the users are able to Edit the web pat. We can also resolve this issue by giving ther read, write permissions to that particular files to 'SERVER\USERS'