簡體   English   中英

ASP.NEt Identity不起作用或未注冊

[英]ASP.NEt Identity Not working or registering

我目前正在開發一個Web應用程序,但我什至不能注冊甚至第一個用戶。 Webconfig的連接字符串正常工作。 我可以更新刪除或創建應用程序產品,並且數據庫會立即更新,這表明(我認為)連接字符串可以正常工作。 我在MVC中創建了一個新的proyect,但我沒有進行任何更改,並且stil無法注冊用戶。它在30-60秒后顯示以下錯誤。 我提到連接字符串的原因是該錯誤提到了SQL異常並談論了錯誤的連接字符串,但顯然它可以正常工作,並且這是一個新的未更改的MVC項目。謝謝

該系統找不到指定的文件

說明:執行當前Web請求期間發生未處理的異常。 請查看堆棧跟蹤,以獲取有關錯誤及其在代碼中起源的更多信息。

異常詳細信息:System.ComponentModel.Win32Exception:系統找不到指定的文件

源錯誤:

第153行:{第154行:var用戶=新的ApplicationUser {用戶名= model.Email,電子郵件= model.Email}; 第155行:var結果=等待UserManager.CreateAsync(user,model.Password); 第156行:if(成功)第157行:{

源文件:C:\\ Users \\ IronMan \\ Documents \\ Visual Studio 2015 \\ Projects \\ training \\ IDTest \\ IDTest \\ Controllers \\ AccountController.cs行:155

堆棧跟蹤:

[Win32Exception(0x80004005):系統找不到指定的文件]

[SqlException(0x80131904):建立與SQL Server的連接時發生與網絡相關或特定於實例的錯誤。 服務器未找到或無法訪問。 驗證實例名稱正確,並且已將SQL Server配置為允許遠程連接。 (提供者:SQL網絡接口,錯誤:52-無法找到本地數據庫運行時安裝。驗證是否正確安裝了SQL Server Express並啟用了本地數據庫運行時功能。)]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException異常,Boolean breakConnection,Action`1 wrapCloseInAction)+92
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj,布爾調用方HasConnectionLock,布爾asyncClose)+285
System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo,SqlInternalConnectionTds connHandler,布爾ignoreSniOpenTimeout,Int64 timerExpire,布爾加密,布爾trustServerCert,布爾IntegratedSecurity,布爾withFailover,SqlAuthenticationMethod authType)+372
System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo,字符串newPassword,SecureString newSecurePassword,布爾值ignoreSniOpenTimeout,TimeoutTimer超時,布爾值withFailover)+172
System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo,字符串newPassword,SecureString newSecurePassword,布爾型redirectedUserInstance,SqlConnectionString connectionOptions,SqlCredential憑據,TimeoutTimer超時)+849
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer超時,SqlConnectionSt

更像上面

  1. 查找DataContext類
  2. 設置連接字符串鍵在web.config文件中寫入的默認值

我認為問題在於,當您嘗試創建用戶時,它會創建無法找到您的連接字符串的數據上下文。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM