Prev: IIS Compression and SharePoint
Next: log datetime
From: Neil Gould on 25 Feb 2010 07:58 Andrew Morton wrote: > Neil Gould wrote: > <the .AddAttachment attribute that has run for years on other servers > fails with an unknown error> > >> Andrew Morton wrote: >>> An unknown error isn't going to be easy for anyone to diagnose, but >>> as a first guess I'd suggest the account running the World Wide Web >>> Publishing Service doesn't have sufficient rights to read the file >>> for the attachment. >>> >> Thanks for the idea, Andrew. It seems like a place to start looking. >> >> Is there a setting in IIS6 to provide such rights to the account? > > You can right-click the folder in IIS Manager (or Windows Explorer) > and manipulate the permissions there or at a command prompt with, > e.g. icacls. > > An easy way to see which account is trying to access the file is by > using Process Monitor > http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx > > and filtering it for the file name you're having trouble with. > > I don't know which account would be used for ASP (ASP.NET uses > "Application Pools" which can have their own accounts). Be careful > not to give excessive rights to anything like the Windows directory; > it may be better to have a directory dedicated for the attachments. > Thanks again, Andrew. As I have no access to the IIS settings for our account, I'll pass this on to the hosting service, as they asked whether there was an IIS setting that I wanted changed. Your suggestion gives me something else to think about... is it possible that there is an IIS restriction that would prevent sending attachments from the same directory as the script? -- Best, Neil
From: Andrew Morton on 25 Feb 2010 08:37 Neil Gould wrote: > Thanks again, Andrew. As I have no access to the IIS settings for our > account, I'll pass this on to the hosting service, as they asked > whether there was an IIS setting that I wanted changed. Your > suggestion gives me something else to think about... is it possible > that there is an IIS restriction that would prevent sending > attachments from the same directory as the script? Ah, well, all bets are off if the file is in the same directory as the script, as whichever account is running ASP must already have sufficient access to that directory. Umm... just thought... you are giving a full path for the attachment, aren't you? You're going to have to find out what the unknown error really is. FWIW, I just dug up some old ASP site and found I used to use Persits AspEmail (freeware). If your hosting company will install it, at least you stand a chance of getting a known error from it. Andrew
From: Neil Gould on 25 Feb 2010 11:00 Andrew Morton wrote: > Neil Gould wrote: >> (snip) Your >> suggestion gives me something else to think about... is it possible >> that there is an IIS restriction that would prevent sending >> attachments from the same directory as the script? > > Ah, well, all bets are off if the file is in the same directory as the > script, as whichever account is running ASP must already have > sufficient access to that directory. Umm... just thought... you are > giving a full path for the attachment, aren't you? > Well, I THOUGHT so, but I managed to get it working by relocating the attachment to another directory and providing a full path to the file via Server.mappath. Thanks for stimulating my old brain cells! -- Best, Neil
From: Andrew Morton on 25 Feb 2010 11:28
Neil Gould wrote: > Andrew Morton wrote: >> Neil Gould wrote: >>> (snip) Your >>> suggestion gives me something else to think about... is it possible >>> that there is an IIS restriction that would prevent sending >>> attachments from the same directory as the script? >> >> Ah, well, all bets are off if the file is in the same directory as >> the script, as whichever account is running ASP must already have >> sufficient access to that directory. Umm... just thought... you are >> giving a full path for the attachment, aren't you? >> > Well, I THOUGHT so, but I managed to get it working by relocating the > attachment to another directory and providing a full path to the file > via Server.mappath. Glad you got it working. > Thanks for stimulating my old brain cells! You're welcome :) Andrew |