Umbraco安装过程中出现的问题以及调试

在VS2015中使用NuGet安装完UmbracoCms后,按Ctrl+F5运行程序来完成安装UmbracoCms的过程中,发现一直在安装但是没有反应

估计是出现了错误。所以我到项目所在的文件夹中查找App_Data\Logs中去查看log,没有发现很有意义的东西。接下来如何解决呢

我于是按F12键 ,可以看到红色的错误信息,点开发现错误 好像是说Umbraco.ModelsBuilder.dll 找不到,发现在项目的bin文件中确实不存在,于是重新又build了一遍项目,可以了

重新Ctrl+F5来运行程序,发现还是有错误,这次的错误,好像是说Umbraco Users啥的错误,Google了一下,需要clear浏览器的cache来解决,clear好之后。再次运行,发现还是有问题,

这次是其他的问题,调查了一下,发现是因为在项目的Web.config文件中,我事先把数据库连接写上去了

<connectionStrings>
        <remove name="umbracoDbDSN" />
        <add name="umbracoDbDSN" connectionString="server=MyServer;database=MyDatabase;user id=userId;password='password123'" providerName="System.Data.SqlClient" />
        <!-- Important: If you're upgrading Umbraco, do not clear the connection string / provider name during your web.config merge. -->
    </connectionStrings>

而原来我没有写入connectionString中的内容时,它原来是

<connectionStrings>
        <remove name="umbracoDbDSN" />
        <add name="umbracoDbDSN" connectionString="" providerName="" />
        <!-- Important: If you're upgrading Umbraco, do not clear the connection string / provider name during your web.config merge. -->
    </connectionStrings>

所以,要恢复到原来的状态,然后再次Ctrl+F5运行程序来安装。这次安装成功了

猜你喜欢

转载自www.cnblogs.com/wphl-27/p/9267784.html