开发者

WCF Threading current owner

I hosting a WCF service on Windows 7 IIS. When the service is trying to write to a config file and getting the error:

"Access to the path 'C:\Program Files (x86)\MIMS\Master\ahug_uqt.tmp' is denied."

This is not the name of the config file although I assume ConfigurationManager is creating a temp file then updating this to the real config file.

Anyway, I have checked that neil-laptop (that's my user), ASPNET, NETWORKSERVICE and LOCALSERVICE have full control over the programs folder and they do. When debugging into the service it shows the current thread principal as neil-laptop. This should not be the case as it is an IIS process.

So, how can I see which user the thread is run开发者_如何学Goning under so that I can give this the appropriate permissions. Bearing in mind also that the above worked on Win2003 and XP when I gave the users full control to the folder. Darn you Windows 7.

Hopefully, Neil.


I modified the user that the IIS App Pool is running under to use the NETWORK SERVICE account and gave this account permissions to the appropriate folder.

Simple really. Not sure about security implications for this but the NETWORK SERVICE account is very limited in it's permissions so should be fine.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜