Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 10, 2012 02:28 AM by aspnet2sams
Apr 06, 2012 05:26 AM|LINK
I have a webpage, where in which there is an option to get the gridview data to excel and send a mail with that excel as attachment. For this, I am exporting the grid view data to an excel, put that in shared path and call "master.xp_sendmail " stored procedure
( passing the shared path as a parameter @attachment to the sp. The stored procedure goes to the path and picks the file and attach it to the mail.
I have tested this in local machine and it worked fine. But, after hosting this to server, it throws an exception saying "Access to the path denied".
Please help me out of this issue.
Thanks in advance,
Apr 06, 2012 05:32 AM|LINK
You should give security write permissions to the application pool user (IIS7) to that folder.
Apr 06, 2012 05:37 AM|LINK
Could you please eloborate ? I am totally new to this.
Apr 06, 2012 06:17 AM|LINK
further to suggested post.
Add asp.net user to your shared path folder as follows:
1. From context menu select properties
2. Add user asp.net with permissions Read, Write, Full and click ok.
give your trials opinion on forum.
Apr 06, 2012 09:40 AM|LINK
I did like below.
Right click on folder - > properties -> security -> Add -> (added my user name) -> checked on Full control.
And tried sending mail, didnt work. same exception "Access to the path denied"
Apr 06, 2012 01:02 PM|LINK
(added my user name)
Also, as said, a question pops, are you familiar with SQL Profiler?if so, please get to know the working of your hosted server stored proc. The working of SP should be as expected your local machine on which tested.
Apr 07, 2012 02:51 AM|LINK
You need to add IIS_WPG and grant the permisson to your usr. Please kindly retry. :)
Apr 09, 2012 05:38 AM|LINK
If i am not wrong, is it like i need to create a group named IIS_WPG and add the user to that group and then grant the access ??
If it is so, how can we know all the users who may access this path? is there anything like we can add a group of users ???
Siva Karthik N
Apr 09, 2012 07:05 AM|LINK
I tried to add asp.net to the folder i have created. But it doesnt allow me to add, saying "the object named asp.net can not be fount". Any ideas ???
Apr 10, 2012 02:28 AM|LINK
network domain name OR computer name OR basically machine identity \ OR / asp.net (user name).
give forum opinion about trials.