Click here to Skip to main content
15,943,103 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have task in send mail and now it work good but when i want to develop this tasks to attach file to send mail i get this error.
any one can help me to erase this error please.
----------------------------------------

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) 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 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
------------------------------------------
Posted
Updated 12-Apr-11 23:28pm
v2
Comments
Sandeep Mewara 13-Apr-11 5:51am    
All self explanatory!

The clue is in the error message my friend.. ASP.net can't access the file you're trying to attach to your mail. you'll need to change the permissions on the file in question, just like the error message says.
 
Share this answer
 
Try to add NETWORKSERVICE if you have already added the ASP NET account with full control.
 
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