Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net 将具有相对URL的内部ASPX页面添加到CRM 4.0站点地图_Asp.net_Sitemap_Dynamics Crm_Crm - Fatal编程技术网

Asp.net 将具有相对URL的内部ASPX页面添加到CRM 4.0站点地图

Asp.net 将具有相对URL的内部ASPX页面添加到CRM 4.0站点地图,asp.net,sitemap,dynamics-crm,crm,Asp.net,Sitemap,Dynamics Crm,Crm,我在CRM 4.0中为我的站点地图添加了一个分区,对于绝对URL,它的工作方式与预期的一样。但是,对于相对URL,它并没有。该页面为内部页面,可通过以下方式访问: http://localhost/ISV/<orgName>/Account.aspx/ExternalDocumentList http://localhost/ISV//Account.aspx/ExternalDocumentList 但是,我更愿意在sitemap中编写以下内容: /ISV/<orgNam

我在CRM 4.0中为我的站点地图添加了一个分区,对于绝对URL,它的工作方式与预期的一样。但是,对于相对URL,它并没有。该页面为内部页面,可通过以下方式访问:

http://localhost/ISV/<orgName>/Account.aspx/ExternalDocumentList
http://localhost/ISV//Account.aspx/ExternalDocumentList
但是,我更愿意在sitemap中编写以下内容:

/ISV/<orgName>/Account.aspx/ExternalDocumentList
/ISV//Account.aspx/ExternalDocumentList
展开后,CRM/IIS会将其重写为:

http://localhost/<orgName>/ISV/<orgName>/Account.aspx/ExternalDocumentList
http://localhost//ISV//Account.aspx/ExternalDocumentList
以下是添加的站点地图(不起作用),仅供参考:



如何相对链接到此页面?

表示操作的../符号非常有效。使用这种符号并没有什么问题,尽管这取决于你的用法

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

基本上,您在URL属性中输入的路径用作来自URL的相对路径

如果您想了解更多关于ASP.NET路径以及如何使用它们的信息,Rick Strahl在这里有一篇很好的帖子:

您缺少了一些东西,请尝试使用此Url=“//ISV//Account.aspx/ExternalDocumentList”我得到了一个提示,使用“../”符号是好的,事实上“../../ISV”就是这样做的。这是一个好的解决方案吗?@WaqasRaja不,该URL是CRM重写的,并返回404。唯一有效的URL是上面列出的第一个URL。
<SubArea Id="custom_documentHistory" Url="/ISV/<orgName>/Account.aspx/ExternalDocumentList">
    <Titles>
        <Title LCID="1033" Title="Document History"/>
    </Titles>
</SubArea>