Asked by:
Visual Studios not Creating ASPNETDB.MDF

Question
-
User1464415539 posted
I'm running Windows 7, IIS 8.0 Express, Visual Studios 2010
I have the same problem Visual Studios not creating ASPNETDB.MDF . I have follow the troubleshooting instructions on (
http://go.microsoft.com/fwlink/?LinkId=160102) But they don't work. Visual studio still not creating ASPNETDB.MDF file. The App_Data Folder its already created. Does anybody know how to fix it?
Wednesday, February 14, 2018 11:32 PM
All replies
-
User541108374 posted
Hi,
which version of Visual Studio are you making use off?
Kris.
Thursday, February 15, 2018 8:42 AM -
User1464415539 posted
Hi,
I am running Visual Studio 2010 Premium 10.0
Marlo,
Thursday, February 15, 2018 10:27 AM -
User-166373564 posted
Hi Marlorb,
Please check the following connection string in the web.config:
<connectionStrings> <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" /> </connectionStrings>
Regards,
Angie
Friday, February 16, 2018 3:43 AM -
User1464415539 posted
Hi Angie,
I have the same connection string. I also tried creating a new website to see if it would work; but still it does not work. The problem with this website I created a long time ago. I had accidentally deleted SQLEXPRESS then when I realized that, I reinstalled it and then that's when the ASPNETDB.MDF did not work. I had another database that I built and it worked just find.so I don't know what the problem is.
<add name="ApplicationServices"
connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true"
providerName="System.Data.SqlClient" />Regards
Marlo,
Friday, February 16, 2018 5:59 AM -
User-166373564 posted
Hi Marlorb,
Did you use SQL Server on your side? If yes, you need check if it's actually running.
In Control Panel > Administrative Tools > Services
Screenshot: https://i.imgur.com/Yw2FPw5.png
Regards,
Angie
Wednesday, February 21, 2018 7:37 AM -
User1464415539 posted
Hi Angie,
I was able to recreate the ASPNETDB.MDF file. The SQLEXPRESS is actually running. But have another issue now. the admin roles are not working I go to ASP. Net Configuration and its not working.
<location path="ViewClients.aspx">
<system.web>
<authorization>
<allow roles="r_Admin2" />
<deny users="*" />
</authorization>
</system.web>
</location><location path="Schedule.aspx">
<system.web>
<authorization>
<allow roles="r_Admin2, Users" />
<deny users="?"/>
</authorization>
</system.web>
</location>
<system.web>
<authorization>
<allow roles="r_Admin2" />
<allow users="*" />
</authorization>
</system.web>Regards
Marlo,
Wednesday, February 21, 2018 8:05 PM