Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6 and IIS 7, and the configured application pool identity on IIS 7.5) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET access to a file, right-click the file in File Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.

XML
Source Error:


Line 26:         string filename = Path.GetFileName(fileuploadimages.PostedFile.FileName);
Line 27:         //Save images into Images folder
Line 28:         fileuploadimages.SaveAs(Server.MapPath("../CollegePics/" + filename));
Line 29:         //Getting dbconnection from web.config connectionstring
Line 30:         SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["hdcon"].ToString());
Posted
Updated 22-Jun-15 22:16pm
v2

Consult the GoDaddy documentation regarding how you make your folder writable, or contact GoDaddy support and ask them, you're paying them after all.
 
Share this answer
 
The error seems to be related with file upload and the folder 'CollegePics' does not have the sufficient access to upload files

This may help -
Set Directory Permissions (Windows)[^]
File Upload Permission denied Godaddy Shared hosting[^]

You should ask your hosting provider(godaddy) for access permissions if it doesn't solve your problem
 
Share this answer
 
v2
Hi there,

You just need to ask your hosting provider to give the permission for you. As I know they use Plesk Panel. You can also set the permission via your control panel--> file manager--> see padlock button--> then you can give the permission.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900