Well I checked with filemon. If I specify the pickup directory in c# the email goes out fine. If I use IIS it never touched the pickup directory. (see two buttons on
www.andrewworral.com)
So I would assume its not a permission problem on the Pickup Directory. Maybe on the metabase, but Asp.net can access the metabase for other runtime things I believe.
What is the best tool/way to check the permissions on the metabase. I am more of a c# programmer that got thrust into doing the IIS stuff as well, and it can have a little bit of a learning curve.
Do I just need to check ACL's on the metabase.xml or is their an internal API to set permissions to it?
I have run the aspnet_regiis -ga <account> on pretty much any account I can think of (I may have missed one but)
If it is a permission issue why wouldn't the Send() return a permissions error?
Here is the code for the internal call that is throwing the error.
I am using HELM control panel which when you create a domain/website it creates users for the application pool to run under.
For some reason the user it created to run under could not get access to the metabase.
I did run the aspnet_regiis -ga <the user account in application pool> and it says that it granted permissions to the metabase and other files. But apparantly not. Perhaps that command does not work as its description says it does.
Any ideas on how to add that user to the metabase acl then? I fixed it by changing it to network service as you guys mentioned has access by default.
In the code I linked to it is supposed to throw a SecurityException if it hits one so I have NO idea why microsoft's code didn't throw one as opposed to Can not get PickupDirectory
So for future use and to set this up how I want to. How would I go about granting privledges to the user properly?
AndyBuffaloN...
9 Posts
Re: Cannot get IIS pickup directory. NEED HELP
Oct 09, 2006 04:15 PM|LINK
Well I checked with filemon. If I specify the pickup directory in c# the email goes out fine. If I use IIS it never touched the pickup directory. (see two buttons on www.andrewworral.com)
So I would assume its not a permission problem on the Pickup Directory. Maybe on the metabase, but Asp.net can access the metabase for other runtime things I believe.
Microsoft Guys??? anyone have any ideas?
-Andy
anilr
2343 Posts
Microsoft
Re: Cannot get IIS pickup directory. NEED HELP
Oct 09, 2006 10:42 PM|LINK
Software Design Engineer
IIS Core Server
tomkmvp
7657 Posts
MVP
Moderator
Re: Cannot get IIS pickup directory. NEED HELP
Oct 09, 2006 11:24 PM|LINK
http://mvp.support.microsoft.com/
qbernard
5019 Posts
MVP
Moderator
Re: Cannot get IIS pickup directory. NEED HELP
Oct 10, 2006 07:34 AM|LINK
I just checked my test w2k3 R2 build - by default network service can query and enumerate the subkey.
Bernard Cheah
AndyBuffaloN...
9 Posts
Re: Cannot get IIS pickup directory. NEED HELP
Oct 10, 2006 12:35 PM|LINK
What is the best tool/way to check the permissions on the metabase. I am more of a c# programmer that got thrust into doing the IIS stuff as well, and it can have a little bit of a learning curve.
Do I just need to check ACL's on the metabase.xml or is their an internal API to set permissions to it?
I have run the aspnet_regiis -ga <account> on pretty much any account I can think of (I may have missed one but)
If it is a permission issue why wouldn't the Send() return a permissions error?
Here is the code for the internal call that is throwing the error.
www.andrewworral.com/iispickup.txt
Thanks for all of your guys help!
-Andy
AndyBuffaloN...
9 Posts
Re: Cannot get IIS pickup directory. NEED HELP
Oct 10, 2006 12:54 PM|LINK
Figured it out!!! Sort of...
I am using HELM control panel which when you create a domain/website it creates users for the application pool to run under.
For some reason the user it created to run under could not get access to the metabase.
I did run the aspnet_regiis -ga <the user account in application pool> and it says that it granted permissions to the metabase and other files. But apparantly not. Perhaps that command does not work as its description says it does.
Any ideas on how to add that user to the metabase acl then? I fixed it by changing it to network service as you guys mentioned has access by default.
In the code I linked to it is supposed to throw a SecurityException if it hits one so I have NO idea why microsoft's code didn't throw one as opposed to Can not get PickupDirectory
So for future use and to set this up how I want to. How would I go about granting privledges to the user properly?
Thank for you all your time and help!
-Andy
tomkmvp
7657 Posts
MVP
Moderator
Re: Cannot get IIS pickup directory. NEED HELP
Oct 10, 2006 02:49 PM|LINK
Ahhh ... we wouldn't have known that!
See Metaacl.exe ...
http://support.microsoft.com/kb/267904
http://mvp.support.microsoft.com/
AndyBuffaloN...
9 Posts
Re: Cannot get IIS pickup directory. NEED HELP
Oct 10, 2006 06:12 PM|LINK
I believe I mentioned I ran the
aspnet_regiis –ga <WindowsUserAccount>
that was mentioned in the link you sent. I ran it on the account that was for app pool for my site. Wouldn't that grant the neccesary privledges?
Not sure what I was doing wrong on that part. But thanks for all the help!
tomkmvp
7657 Posts
MVP
Moderator
Re: Cannot get IIS pickup directory. NEED HELP
Oct 10, 2006 06:54 PM|LINK
http://mvp.support.microsoft.com/
qbernard
5019 Posts
MVP
Moderator
Re: Cannot get IIS pickup directory. NEED HELP
Oct 11, 2006 02:50 AM|LINK
Interesting... is the new process identity part of IIS_WPG group?
You can also use metabase explorer to grant permissions.
Bernard Cheah