添加带有相对 URL 的内部 ASPX 页面到 CRM 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
../ 符号对于表示操作是完全有效的。使用该表示法实际上并没有问题,尽管这取决于您的用法。
基本上,您在 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