Database always being attached as 'master' when Atta

Posted by Community Admin on 05-Aug-2018 12:03

Database always being attached as 'master' when AttachDbFileName is used

All Replies

Posted by Community Admin on 29-Mar-2013 00:00

I'm trying to put my project to shared hosting and use mdf on file system as DB.
This is my connection string:

<
connectionStrings>
        <add connectionString="Database=podnikajmecom;data source=.\SQLEXPRESS;AttachDBFileName=|DataDirectory|sf_podnikajme_com.mdf;Integrated Security=SSPI;" providerName="System.Data.SqlClient;Trusted_Connection=Yes;UserInstance=True;" dbType="MsSql" name="Sitefinity" />

despite of 'Database=' I always get this error message:

Cannot attach the file 'W:\domains\www.podnikajme.com\public\www_root\App_Data\sf_podnikajme_com.mdf' as database 'master'.

Seems to me like Database= is ignored. Anyone has an idea? 
Thanks.

Posted by Community Admin on 03-Apr-2013 00:00

Hello,

The user who must have access to the database with permissions over the database (database owner) must be added over the .mdf database. I suppose the shared hosting have access to SQL server to attach the database and assign a database user to be used as a user to manage the database. For example here is how sitefinity database is assigned a database user on shared hosting with assigning permissions to the database.

All the best,
Richard Moore
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed