简体   繁体   English

应用程序池标识更改

[英]application pool identity change

I've got a web method set up on SERVER A and need to connect to the file system on SERVER B. 我在SERVER A上设置了一个Web方法,需要连接到SERVER B上的文件系统。

Currently I have a wide array of web services that already run on SERVER A where the identity on the application pool is set to NETWORK SERVICE. 当前,我已经在SERVER A上运行了各种各样的Web服务,其中应用程序池上的标识设置为NETWORK SERVICE。 The issue is that I cannot seem to give the NETWORK SERVICE on A access to the file system on B. Changing the user on the app pool isn't really an option as there are too many possible train wrecks that could materialize on the outgoing web service calls. 问题是我似乎无法授予A上的NETWORK SERVICE访问B上的文件系统的权限。在应用程序池上更改用户实际上不是一个选择,因为可能有太多的火车残骸可能在即将离任的网络上实现服务电话。

So the solution I am trying to come up with is temporarily changing the Web Method identity user from NETWORK SERVICE to DOMAIN/SOMEUSER when the web method is called. 因此,我要提出的解决方案是在调用Web方法时将Web方法标识用户从NETWORK SERVICE暂时更改为DOMAIN / SOMEUSER。

The property I need to change is System.Web.HttpContext.Current.User.Identity.Name 我需要更改的属性是System.Web.HttpContext.Current.User.Identity.Name

Can anyone tell me how I can go about doing this? 谁能告诉我该怎么做? Many of the solutions online seem to refer to Windows Azure - which I'm not using, so the approaches outlined don't work. 在线上的许多解决方案似乎都指向Windows Azure-我没有使用它,因此概述的方法不起作用。

Thanks! 谢谢!

You might have to play with the tag in the web.config. 您可能必须使用web.config中的标签。 Our is normally set to <identity impersonate="false" /> and the application pool uses a domain user for permissions. 我们的通常设置为<identity impersonate="false" /> ,并且应用程序池使用域用户获得权限。

Try using impersonate in your service. 尝试在服务中使用模拟。

<system.web> ....
<identity impersonate="true" userName="accountname" password="password" />

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 以编程方式获取应用程序池标识 - Get the Application Pool Identity programmatically 当我更改 IIS 应用程序池身份用户使用自定义帐户时,它会停止应用程序池,即使我再次启动它也是如此 - When I Change the IIS Application Pool Identity User Use Custom Account it stops the Application pool even if I start it again 更改应用程序池的属性 - Change properties of application pool ServerManager,正在创建应用程序池,未设置身份 - ServerManager, Creating application pool, identity not set 由于应用程序池标识,连接到TfsTeamProjectCollection失败 - Connecting to TfsTeamProjectCollection fails due to Application Pool Identity HttpWebRequest、TLS 和应用程序池服务标识 - HttpWebRequest, TLS and application pool service identity 如何使用托管的应用程序池标识 - How to use hosted application pool identity 更改应用程序池的标识时出错 - Error while changing identity for application pool 为远程IIS应用程序池标识配置MSMQ专用队列权限 - Configuring MSMQ private queue permissions for a remote IIS Application Pool Identity 在IIS 7中以编程方式为自定义身份应用程序池设置用户帐户 - Programmatically set up user account for custom identity application pool in IIS 7
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM