locked
Connection problems between SQL Server and Visual Studio 2012 Pro RRS feed

  • Question

  • I recently installed VS 2012 Pro which I know also by default installs express aka localDB.  I already had SQLEXPRESS on my machine before installing VS.

    So now I am trying to connect to SQLEXPRESS and am getting the following connection error:

    First the stats:

    Visual Studio 2012

    Net Framework 4.5

    My server name is .\SQLEXPRESS

    Trying to create an ASP application.

    Here is my current connection Strings:

    <connectionStrings>     <add name="DefaultConnection" providerName="System.Data.SqlClient" connectionString=".\SQLEXPRESS;Initial Catalog=aspnet-learning1-20130420131735;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnet-learning1-20130420131735.mdf" />       <add name="WingtipToys"            connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\wingtiptoys.mdf;Integrated Security=True"            providerName="System.Data.SqlClient " />

    Now I am getting an access denied code 5 when I try to run my code.

    Specifically:

    Directory lookup for the file "c:\users\austens samsung\documents\visual studio 2012\Projects\learning1\learning1\App_Data\wingtiptoys.mdf" failed with the operating system error 5(Access is denied.). CREATE DATABASE failed. Some file names listed could not be created. Check related errors.

    I have my server set to allow creation of a database.  Probably don’t understand what needs to be set properly.

    Any help appreciated, just trying to learn. 

    Saturday, April 20, 2013 9:17 PM

Answers