SQLExpress local connection not working

2 posts, 0 answers
  1. Chad
    Chad avatar
    13 posts
    Member since:
    Aug 2012

    Posted 15 Aug 2014 Link to this post

    I have 2 websites that I am running in localhost. 1 is the main web app and the 2nd is the telerik reporting application.
    My connection string looks like this:
    Data Source=.\SQLExpress;AttachDbFilename=C:\ODI\ODI_AGBSafety.mdf;Trusted_Connection=Yes;

    I keep getting the following error and don't know what to do

    "CREATE DATABASE permission denied in database 'master' An attempt to attach an auto-named database for the C:\ODI\Example.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share. 

    Any help would be greatly appreciated.

    thannks,

    Chad
  2. Stef
    Admin
    Stef avatar
    3036 posts

    Posted 20 Aug 2014 Link to this post

    Hello Chad,

    Please verify the connection strings is correct - Attach a database file on connect to a local SQL Server Express instance. Then check if the path to the database is the correct one on the server, where the application is deployed. Finally grant access to the running process to access the database, which can be done trough the used application pool.

    Let us know if you need any further help.

    Regards,
    Stef
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. DevCraft banner
Back to Top