确定 ISV 目录路径的最佳方法是什么?
MSCRM 4.0
问题:
我当前将 xml 文件与我的 Web 应用程序一起存储在 ISV 目录中。从插件(或者可能是单独的应用程序),我需要找到一种简单的方法来导航到 ISV 目录以读取这些 xml 文件。该例程将被非常频繁地调用,因此处理最小化应该是一个重要的考虑因素。
潜在的解决方案:
注册表: 有一个名为“WebSitePath”的注册表项,其数据为“C:\Inetpub\wwwroot\CRM”。可能会用它来构建路径。 (这在所有系统/安装上都相同吗?)
IIS 目录数据: 循环遍历路径“IIS://localhost/W3SVC”的 DirectoryEntries ' 我可以获得描述等于“Microsoft Dynamics CRM”的 Web 应用程序。 (这在所有系统/安装上都相同吗?)
Web 服务: 创建一个来读取并返回这些 xml 文件中包含的数据 Web 服务将很容易访问其执行目录。
数据库:将这些文件的数据存储在数据库中。
帮助:
任何人都可以建议一个更简单的解决方案来从 ISV 目录获取和读取文件吗?如果不是,上述哪种解决方案处理速度最快?
感谢您的所有贡献。
MSCRM 4.0
Problem:
I'm currently storing xml files in the ISV directory along with my web applications. From a plugin (or potentially a seperate app), I need to find an easy way to navigate to the ISV directory to read these xml files. This routine will be called extremely often, so processing minimization should be a strong consideration.
Potential solutions:
Registry: There is a registry key called 'WebSitePath' with the data 'C:\Inetpub\wwwroot\CRM'. Could potentially use this to build the path. (Will this be the same on all systems/installations?)
IIS directory data: Looping through the DirectoryEntries of path '"IIS://localhost/W3SVC"' I could obtain the the web application where description is equal to "Microsoft Dynamics CRM". (Will this be the same on all systems/installations?)
Webservice: Create one to read and return the data contained in these xml files The webservice would have easy access to its executing directory.
Database: Store the data of these files in the database.
Help:
Can anyone suggest a simpler solution to obtaining and reading a file from the ISV directory? If not, which of the above solutions would be the quickest to process?
Thanks for any and all contributions.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您管理部署,我将首先尝试在您认为可以找到该文件的位置访问该文件(如提示)。如果找不到它,我会尝试使用注册表检索 ISV 文件夹位置。
如果您不控制部署,那么使用ISV文件夹中的文件不是一个好的解决方案,因为CRM可以使用不同的角色进行部署,并且ISV文件夹不一定位于同一台服务器上,所以我会依赖外部数据库。
If you manage your deployment, I would first try to access the file at the location that you think the file can be found (like an hint). If you can't find it, I would try to retrieve the ISV folder location using the registry.
If you are not controlling the deployment, using a file in the ISV folder is not a good solution, because CRM can be deployed using different roles, and the ISV folder is not necessarily on the same server, so I would rely on a external database.