Silverlight RIA 服务应用程序 - 如何获得网络访问权限?
在我的 Silverlight 应用程序中,我托管一个域服务,该服务需要复制和读取网络上其他位置的文件。问题(至少我认为)是 RIA 服务在 ASP.NET 帐户下运行,并且无权访问我需要访问的 UNC 共享。例如,我有一个如下所示的共享:
\\SERVER_NAME\Directory\File.TXT
在本地计算机上调试时,用户上下文是登录用户,因此一切正常,但当我部署到 IIS7 服务器时,用户是 ASP.NET 使用的任何用户。
如何允许我的服务访问我的域中的文件?
In my Silverlight application I host a domain service that needs to copy and read files elsewhere on the network. The problem (at least I think) is that RIA services are running under the ASP.NET account and does not have access to the UNC share I need to get to. For example, I have a share that looks like this:
\\SERVER_NAME\Directory\File.TXT
When debugging on my local machine, the user context is the logged in user, so everything works, but when I deploy to my IIS7 server, the user is whatever ASP.NET uses.
How can I allow my service to access files across my domain?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该在 IIS7 中创建一个 appPool,并将该池的标识设置为具有执行您想要执行的操作的权限的用户。
我会考虑这些特权是否构成安全风险以及应用程序是否需要保护。
有关 appPools 的更多详细信息和帮助,请参阅此处。
You should create an appPool in IIS7 with the identity of that pool set to a user with the privileges to do what you want.
I would consider if those privileges constituted a security risk and if the application needed securing.
For more detail and help on appPools please see here.