Last post Apr 10, 2012 02:28 AM by aspnet2sams
Apr 06, 2012 05:26 AM|siva-karthik|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|HostingASPNet|LINK
You should give security write permissions to the application pool user (IIS7) to that folder.
Apr 06, 2012 05:37 AM|siva-karthik|LINK
Could you please eloborate ? I am totally new to this.
Apr 06, 2012 06:17 AM|aspnet2sams|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|siva-karthik|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|aspnet2sams|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|carl.steinhart|LINK
You need to add IIS_WPG and grant the permisson to your usr. Please kindly retry. :)
Apr 09, 2012 05:38 AM|siva-karthik|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|siva-karthik|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|aspnet2sams|LINK
network domain name OR computer name OR basically machine identity \ OR / asp.net (user name).
give forum opinion about trials.