Last post Oct 18, 2015 09:20 AM by francesco abbruzzese
Oct 18, 2015 05:05 AM|mehta.rahulit|LINK
I am selecting SPA from wizard in visual studio.
The connection string in config is
<add name="DefaultConnection" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\aspnet-spatest-20151018094246.mdf;Initial Catalog=aspnet-spatest-20151018094246;Integrated Security=True"
Although I can connect to sql express (It has machinename\sqlexpress) from "sql sever object explorer and there are only system databases".
database is missing in app_data as well.
I made machine wise search and mdf is missing.
Oct 18, 2015 05:54 AM|francesco abbruzzese|LINK
If you dont modify the default template database is created on first usage in app_data, so you dont find it as soon as project is created, but after you register the first user.
Oct 18, 2015 07:07 AM|mehta.rahulit|LINK
Before posting issue i tried that...
i tried creating first user and still getting error
Line 167: var result = await UserManager.CreateAsync(user, model.Password);
Exception Details: System.ArgumentException: Invalid value for key 'attachdbfilename'.
Oct 18, 2015 07:47 AM|francesco abbruzzese|LINK
There is something wrong with the attachdbfilename value within the connection string. Possible causes:
Anyway SPA template works fine on my machine.
Oct 18, 2015 08:02 AM|mehta.rahulit|LINK
small path and using windows 10
does it has to do with connection string username and pass [i mean windows authentication] or sql server settings?
when i connect to sqlexpress from sql object explorer in visual studio
i am selecting windows authentication
server name : myname\SQLEXPRESS: s
username : my windows name
this is my second attempt without any changes to config: still same error
1) i am using windows 10
2) C:\Program Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DATA: it shows master, masterlog, model...
<add name="DefaultConnection" connectionString="Data Source=(mymachine)\SQLEXPRESS;AttachDbFilename=|DataDirectory|\aspnet-spatest-20151018094246.mdf;Initial Catalog=aspnet-spatest-20151018094246;Integrated Security=True"
Oct 18, 2015 08:22 AM|francesco abbruzzese|LINK
Maybe sql settings. Namely asp.net user has not authorization to create a database in sql server.
Oct 18, 2015 08:45 AM|mehta.rahulit|LINK
there is a public role already there
Also when i try to add a new
CREATE LOGIN [Login] WITH PASSWORD = 'asdasdasd----'
Can you guide how do i proceed. Or some way to uninstall and install again
Oct 18, 2015 09:20 AM|francesco abbruzzese|LINK
just add all database privileges to that role (if that is a develpment machine this should not be a problem)...