0

*注意:这不是空参考重复问题。导致它的原因并不那么明显,需要更深入的调查。

我的网站在我的本地开发盒上运行良好,然后我决定将 Umbraco 6 从使用嵌入式数据库 (SDF) 转换为完整的 SQL 数据库 (MDF)。使用 WebMatrix 进行数据库转换很顺利,但是现在在将 Web 配置更改为使用完整 SQL 之后,当我运行它时,站点会出现以下错误。我已经在网上阅读了一些帮助文章,但似乎没有什么能解决我的问题。有任何想法吗?(SQL 权限,可能是缓存,我错过了配置设置吗?

我基本上这样做了http://carlosmartinezt.com/2014/03/umbraco-migrate-from-sql-ce-to-sql-server/

这是我的 web.config

    <system.data>
    <DbProviderFactories>
      <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data" />
    </DbProviderFactories>
  </system.data>
  <system.net>
    <mailSettings>
      <smtp>
        <network host="127.0.0.1" userName="username" password="password" />
      </smtp>
    </mailSettings>
  </system.net>
  <connectionStrings>
    <add connectionString="Data Source=KBURMARK;Initial Catalog=Umbraco;Integrated Security=True" name="Umbraco" providerName="System.Data.SqlClient" />
    <!-- Important: If you're upgrading Umbraco, do not clear the connection string / provider name during your web.config merge. -->
  </connectionStrings>

这是我得到的错误

[NullReferenceException: Object reference not set to an instance of an object.]
   umbraco.cms.businesslogic.web.Domain.<GetDomains>b__0() +122
   Umbraco.Core.Cache.<>c__DisplayClass1`1.<GetCacheItem>b__0() +41
   Umbraco.Core.Cache.HttpRuntimeCacheProvider.GetCacheItem(String cacheKey, Func`1 getCacheItem, Nullable`1 timeout, Boolean isSliding, CacheItemPriority priority, CacheItemRemovedCallback removedCallback, CacheDependency dependency) +246
   Umbraco.Core.Cache.HttpRuntimeCacheProvider.GetCacheItem(String cacheKey, Func`1 getCacheItem, Nullable`1 timeout, Boolean isSliding, CacheItemPriority priority, CacheItemRemovedCallback removedCallback, String[] dependentFiles) +159
   Umbraco.Core.Cache.CacheProviderExtensions.GetCacheItem(IRuntimeCacheProvider provider, String cacheKey, Func`1 getCacheItem, Nullable`1 timeout, Boolean isSliding, CacheItemPriority priority, CacheItemRemovedCallback removedCallback, String[] dependentFiles) +219
   Umbraco.Core.CacheHelper.GetCacheItem(String cacheKey, TimeSpan timeout, Func`1 getCacheItem) +339
   umbraco.cms.businesslogic.web.Domain.GetDomains(Boolean includeWildcards) +243
   Umbraco.Web.Routing.DomainHelper.GetAllDomains(Boolean includeWildcards) +40
   Umbraco.Web.Routing.PublishedContentRequestEngine.FindDomain() +365
   Umbraco.Web.Routing.PublishedContentRequestEngine.PrepareRequest() +59
   Umbraco.Web.Routing.PublishedContentRequest.Prepare() +36
   Umbraco.Web.UmbracoModule.ProcessRequest(HttpContextBase httpContext) +738
   Umbraco.Web.UmbracoModule.<Init>b__7(Object sender, EventArgs e) +132
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +136
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69
4

1 回答 1

1

我以同样的方式解决了这个问题。设置连接字符串名称="umbracoDbDSN"

于 2014-06-10T21:10:00.213 回答