2011-06-29 77 views
0

我已經下載了Kigg Asp.net入門套件項目。開放式Kigg項目底層提供商失敗

然後我將它轉換爲VS.Net 2010 Project,它成功地完成了一切。

然後我運行創建kigg數據庫並添加默認數據。 (從與源走來腳本文件)

我的開發環境 - 64位的Win 7操作系統,與2010年VS.Net和SQL Server 2008

,但我仍然得到這個錯誤。

The underlying provider failed on Open. 

"A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)" 

Source: System.Data.Entity 

StackTrace: 
    at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure) 
    at System.Data.EntityClient.EntityConnection.Open() 
    at System.Data.Objects.ObjectContext.EnsureConnection() 
    at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) 
    at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator() 
    at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source) 
    at System.Data.Objects.ELinq.ObjectQueryProvider.<GetElementFunction>b__1[TResult](IEnumerable`1 sequence) 
    at System.Data.Objects.ELinq.ObjectQueryProvider.ExecuteSingle[TResult](IEnumerable`1 query, Expression queryRoot) 
    at System.Data.Objects.CompiledQuery.ExecuteQuery[TResult](ObjectContext context, Object[] parameterValues) 
    at System.Data.Objects.CompiledQuery.Invoke[TArg0,TArg1,TResult](TArg0 arg0, TArg1 arg1) 
    at Kigg.EF.Repository.UserRepository.FindByUserName(String userName) in D:\DevEnv\Source\EntityFramework\Repository\UserRepository.cs:line 94 
    at Kigg.Repository.DecoratedUserRepository.FindByUserName(String userName) in D:\DevEnv\Source\Core\Repository\Decorated\DecoratedUserRepository.cs:line 41 
    at Kigg.Repository.LoggingUserRepository.FindByUserName(String userName) in D:\DevEnv\Source\Core\Repository\Decorated\Logging\LoggingUserRepository.cs:line 59 
    at Kigg.Repository.DecoratedUserRepository.FindByUserName(String userName) in D:\DevEnv\Source\Core\Repository\Decorated\DecoratedUserRepository.cs:line 41 
    at Kigg.Infrastructure.CreateDefaultUsers.CreateUserIfNotExists(DefaultUser defaultUser) in D:\DevEnv\Source\Core\Infrastructure\Bootstrapper\CreateDefaultUsers.cs:line 37 
    at Kigg.EnumerableExtension.ForEach[T](IEnumerable`1 enumerable, Action`1 action) in D:\DevEnv\Source\Core\Extension\EnumerableExtension.cs:line 14 
    at Kigg.Infrastructure.CreateDefaultUsers.Execute() in D:\DevEnv\Source\Core\Infrastructure\Bootstrapper\CreateDefaultUsers.cs:line 28 
    at Kigg.Infrastructure.Bootstrapper.<Run>b__0(IBootstrapperTask t) in D:\DevEnv\Source\Core\Infrastructure\Bootstrapper\Bootstrapper.cs:line 21 
    at Kigg.EnumerableExtension.ForEach[T](IEnumerable`1 enumerable, Action`1 action) in D:\DevEnv\Source\Core\Extension\EnumerableExtension.cs:line 14 
    at Kigg.Infrastructure.Bootstrapper.Run() in D:\DevEnv\Source\Core\Infrastructure\Bootstrapper\Bootstrapper.cs:line 21 
    at Kigg.Web.GlobalApplication.OnStart() in D:\DevEnv\Source\Web\Global.asax.cs:line 11 
    at Kigg.Web.GlobalApplication.Application_Start() in D:\DevEnv\Source\Web\Global.asax.cs:line 23 

回答

1

它無法找到您的sql服務器。請檢查您的連接字符串在web.config

+0

請訪問http://kigg.codeplex.com/wikipage?title=Deployment%20Guide%20Part%201&referringTitle=Documentation詳細 –

+0

謝謝,但我已遵循文檔中的所有步驟仍然我得到同樣的錯誤。我知道這將是非常愚蠢的錯誤,但因爲我是MVC的新手,請你引導我。謝謝 –

相關問題