首页 文章

ASP.NEt Identity不工作或注册

提问于
浏览
0

我目前正在开发一个网络应用程序,但我甚至不能注册第一个用户 . Webconfig的连接字符串正常工作 . 我可以立即更新删除或创建应用程序产品和数据库更新,这表明(我认为)连接字符串工作正常 . 我在MVC中创建了一个新的proyect我没有改变任何东西而且stil无法注册用户它在30-60秒之后显示以下错误 . 我提到连接字符串的原因是错误提到SQL异常并谈论错误的连接字符串,但显然它工作正常,这是一个新的未更改的MVC proyect谢谢

系统找不到指定的文件说明:执行当前Web请求期间发生未处理的异常 . 请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息 . 异常详细信息:System.ComponentModel.Win32Exception:系统找不到指定的文件源错误:第153行:{第154行:var user = new ApplicationUser {UserName = model.Email,Email = model.Email};第155行:var result = await UserManager.CreateAsync(user,model.Password);第156行:if(result.Succeeded)第157行:{源文件:C:\ Users \ IronMan \ Documents \ Visual Studio 2015 \ Projects \ training \ IDTest \ IDTest \ Controllers \ AccountController.cs行:155堆栈跟踪:[Win32Exception (0x80004005):系统找不到指定的文件] [SqlException(0x80131904): Build 与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,Boolean callerHasConnectionLock,Boolean asyncClose)285 System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo,SqlInternalConnectionTds connHandler,Boolean ignoreSniOpenTimeout ,Int64 timerExpire,Boolean encrypt,Boolean trustServerCert,Boolean integratedSecurity,Boolean withFailover,SqlAuthenticationMethod authType)372 System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo,String newPassword,SecureString newSecurePassword,Boolean ignoreSniOpenTimeout,TimeoutTimer timeout,Boolean withFailover)172 System ·DA ta.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo,String newPassword,SecureString newSecurePassword,Boolean redirectedUserInstance,SqlConnectionString connectionOptions,SqlCredential credential,TimeoutTimer timeout)849 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout,SqlConnectionSt

更像是上面的

1 回答

  • 1
    • 查找DataContext类

    • 设置在web.config文件中写入的连接字符串键的默认值

    我认为问题在于,当您尝试创建用户时,它会创建无法找到您的连接字符串的数据上下文 .

相关问题