asp.net mvc 5 error on trying to register at newly created website

asp.net asp.net-mvc asp.net-mvc-4 c# entity-framework

Question

fresh os, fresh vs 2015, all i do is create new mvc project with individual authentication and once i try to register it give me that error (i edit nothing, i delete nothing)

Server Error in '/' Application.

The system cannot find the file specified

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ComponentModel.Win32Exception: The system cannot find the file specified

Source Error:

Line 153: { Line 154: var user = new ApplicationUser { UserName = model.Email, Email = model.Email }; Line 155: var result = await UserManager.CreateAsync(user, model.Password); Line 156: if (result.Succeeded) Line 157: {

Source File: c:\users****\documents\visual studio 2015\Projects\WebApplication5\WebApplication5\Controllers\AccountController.cs Line: 155

Stack Trace:

[Win32Exception (0x80004005): The system cannot find the file specified]

1
3
9/15/2015 9:15:51 AM

Popular Answer

I've had the same problem, I have found a solution to it .. problem exists in ConnectionString , change it from :

connectionString="Data Source(LocalDb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\aspnet-WebApplication3-20160303101342.mdf;Initial Catalog=aspnet-WebApplication3-20160303101342;Integrated Security=True"

To :

  connectionString="Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=YourDatabaseName;Data Source=YourServerName"

And it will work without any other changes

3
3/6/2016 9:09:57 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow