开发者

File access on another Server 2k8 in the same domain

I have two Windows Server 2008 machines on the same domain. Server one is our web server that has an ASP script that needs file access on server two, our server that does not serve web pages.

I shared the folder I need to access on server two. I gave the users IUSR_serverone@domain.local and domain/IIS_WPG read and write permissions.

This condition is not evaluating to true:

if ( fs.FileExists("\\servertwo\folder\somefile.txt")=true) then
开发者_高级运维

My intent is to use a file upload script. That fails 500, but the error is specific to the upload utility so it is not useful here.

I don't know why my share + permissions are not working right now. Do you? Thanks.


IIS 7 has a quite complicated authentication structure, by default the application pool runs under "AppPoolUser" which is in reality a pseudo user named after the application pool (look in task Manager for your w3wp processes and it will make more sense). Additionally, you set the user the AppPool runs under AND the user that the webserver accesses the websites files with. So you end up with files requested by the webserver being accessed by IUSR and then files that scripts request being accessed by this pseudo user.

Easiest solution is to set up a new domain user and give it permissions on your shares. Set the Application pool to use that user (advanced settings > identity). Then in the site, under the "Authentication" config, set it to use the same user as Application Pool.

Can do screenshots if this is not clear.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜