添加带有相对 URL 的内部 ASPX 页面到 CRM 4.0 站点地图

发布于 2024-10-16 21:00:09 字数 739 浏览 4 评论 0原文

我已在 CRM 4.0 中的站点地图中添加了一个子区域,对于绝对 URL,它按预期工作。但是,对于相对 URL 则不然。有问题的页面是内部的,可以通过以下方式访问:

http://localhost/ISV/<orgName>/Account.aspx/ExternalDocumentList

但是,我更愿意将其写入站点地图中:

/ISV/<orgName>/Account.aspx/ExternalDocumentList

当展开此页面时,CRM/IIS 将其重写为:

http://localhost/<orgName>/ISV/<orgName>/Account.aspx/ExternalDocumentList

作为参考,这里是站点地图添加(不起作用):

<SubArea Id="custom_documentHistory" Url="/ISV/<orgName>/Account.aspx/ExternalDocumentList">
    <Titles>
        <Title LCID="1033" Title="Document History"/>
    </Titles>
</SubArea>

如何我可以相对链接到这个页面吗?

I've added a subarea to my sitemap in CRM 4.0, and for absolute URLs it works as expected. However, for relative URLs it does not. The page in question is internal and is accessed through:

http://localhost/ISV/<orgName>/Account.aspx/ExternalDocumentList

However, I would prefer writing this in sitemap:

/ISV/<orgName>/Account.aspx/ExternalDocumentList

When this is expanded, CRM/IIS rewrites it to:

http://localhost/<orgName>/ISV/<orgName>/Account.aspx/ExternalDocumentList

For reference, here is the sitemap addition (which doesn't work):

<SubArea Id="custom_documentHistory" Url="/ISV/<orgName>/Account.aspx/ExternalDocumentList">
    <Titles>
        <Title LCID="1033" Title="Document History"/>
    </Titles>
</SubArea>

How can I link to this page relatively?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

来日方长 2024-10-23 21:00:09

../ 符号对于表示操作是完全有效的。使用该表示法实际上并没有问题,尽管这取决于您的用法。

的第一个实例是您的 URL 中是 CRM 允许多租户的默认行为 - 您需要第二个实例吗?您能否将 Account.aspx 页面直接放在 ISV 文件夹下,并使用服务器端代码来确定组织名称?

基本上,您在 URL 属性中输入的路径用作 http://localhost// 的相对路径

如果您想了解有关 ASP.NET 路径以及如何使用它们的更多信息,Rick Strahl 在这里发表了一篇很好的文章:
http://www.west-wind.com/Weblog/posts/132081.aspx

The ../ notation is perfectly valid for signifying a operation. There isn't really a problem with using that notation, though it depends on your usage.

The first instance of <orgName> in your URL is the default behaviour of CRM to allow multi-tenancy - do you need to have the second instance? Could you have the Account.aspx page sat directly under the ISV folder, and use server side code to determine the organisation name?

Basically the path you enter in the URL attribute is used as a relative path from the http://localhost/<orgName>/

If you want to understand more about ASP.NET paths and how to work with them, Rick Strahl has a good post here:
http://www.west-wind.com/Weblog/posts/132081.aspx

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文