sitecore网站给出错误

时间:2012-02-11 14:39:08

标签: web sitecore sitecore6

Sitecore是否对website默认网站有某种硬编码?我改变它被称为别的东西,我只是继续得到'长度不能小于零'

<sites>
      <site name="shell" virtualFolder="/sitecore/shell" physicalFolder="/sitecore/shell" rootPath="/sitecore/content" startItem="/home" language="en" database="core" domain="sitecore" loginPage="/sitecore/login" content="master" contentStartItem="/Home" enableWorkflow="true" enableAnalytics="false" xmlControlPage="/sitecore/shell/default.aspx" browserTitle="Sitecore" htmlCacheSize="2MB" registryCacheSize="3MB" viewStateCacheSize="200KB" xslCacheSize="5MB" />
      <site name="login" virtualFolder="/sitecore/login" physicalFolder="/sitecore/login" enableAnalytics="false" database="core" domain="sitecore" />
      <site name="admin" virtualFolder="/sitecore/admin" physicalFolder="/sitecore/admin" enableAnalytics="false" enableWorkflow="true" domain="sitecore" loginPage="/sitecore/admin/login.aspx" />
      <site name="service" virtualFolder="/sitecore/service" physicalFolder="/sitecore/service" />
      <site name="modules_shell" virtualFolder="/sitecore modules/shell" physicalFolder="/sitecore modules/shell" rootPath="/sitecore/content" startItem="/home" language="en" database="core" domain="sitecore" content="master" enableAnalytics="false" enableWorkflow="true" />
      <site name="modules_website" virtualFolder="/sitecore modules/web" physicalFolder="/sitecore modules/web" rootPath="/sitecore/content" startItem="/home" language="en" database="web" domain="extranet" allowDebug="true" cacheHtml="true" />
      <site name="foo" virtualFolder="/us" physicalFolder="/" rootPath="/sitecore/content" startItem="/foo/us" database="web" domain="extranet" allowDebug="true" cacheHtml="true" htmlCacheSize="10MB" registryCacheSize="0" viewStateCacheSize="0" xslCacheSize="5MB" filteredItemsCacheSize="2MB" enablePreview="true" enableWebEdit="true" enableDebugger="true" disableClientData="false" />
      <site name="scheduler" enableAnalytics="false" domain="sitecore" />
      <site name="system" enableAnalytics="false" domain="sitecore" />
      <site name="publisher" domain="sitecore" enableAnalytics="false" enableWorkflow="true" />
    </sites>


<cacheSizes>
      <sites>
<foo>
          <html>10MB</html>
          <registry>0</registry>
          <viewState>0</viewState>
          <xsl>5MB</xsl>
        </foo>
      </sites>
    </cacheSizes>

我确认可以访问http://localhost/?sc_site=foo的大小。该网站应该在执行http://localhost/us时解决,但我只是得到了这个毫无意义的错误

任何想法?

1 个答案:

答案 0 :(得分:3)

根据我的记忆,Sitecore需要知道如何将主机名(localhost)映射到它的站点名称(foo)。因此,您有两种选择。

1)将foo映射到hosts文件中的localhost(然后浏览http://foo/us

2)在sites config中为foo网站定义添加一个hostname属性,并使用值'localhost'

希望这有帮助。

修改

尝试关闭virtualFolder属性:

<site name="foo" physicalFolder="/" rootPath="/sitecore/content" startItem="/foo/us" database="web" domain="extranet" allowDebug="true" cacheHtml="true" htmlCacheSize="10MB" registryCacheSize="0" viewStateCacheSize="0" xslCacheSize="5MB" filteredItemsCacheSize="2MB" enablePreview="true" enableWebEdit="true" enableDebugger="true" disableClientData="false" />

然后,在您的主机文件中使用127.0.0.1 foo,只浏览http://foo