Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...auto-attach databaseauto-attach database
Previous
 
Next
New Post
8/28/2007 12:43 AM
 

I am having a heck of a time getting the auto-attach (user instance) database to work in 4.5.5.  I have ASPNET and NETWORK SERVICE to full control on the entire website folder.   On installing I get

ERROR: Could not connect to database specified in connectionString for SqlDataProvider

Here is a message I get in the eventlog.  This is using the 4.5.5 install zip

Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 8/27/2007 9:36:29 PM
Event time (UTC): 8/28/2007 4:36:29 AM
Event ID: 65e0265835c14f31bfcad518a01c1473
Event sequence: 6
Event occurrence: 1
Event detail code: 0
 
Application information:
    Application domain: /LM/W3SVC/1/Root/dnn455-11-128327492848943551
    Trust level: Full
    Application Virtual Path: /dnn455
    Application Path: c:\temp\dnn\dnn\dnn455\
    Machine name: HAMHOCKS
 
Process information:
    Process ID: 2292
    Process name: aspnet_wp.exe
    Account name: HAMHOCKS\ASPNET
 
Exception information:
    Exception type: SqlException
    Exception message: An attempt to attach an auto-named database for file c:\temp\dnn\dnn\dnn455\App_Data\Database.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
 
Request information:
    Request URL: http://localhost/dnn455/Default.aspx
    Request path: /dnn455/Default.aspx
    User host address: 127.0.0.1
    User: 
    Is authenticated: False
    Authentication Type: 
    Thread account name: HAMHOCKS\ASPNET
 
Thread information:
    Thread ID: 1
    Thread account name: HAMHOCKS\ASPNET
    Is impersonating: False
    Stack trace:    at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
   at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
   at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
   at System.Data.SqlClient.SqlConnection.Open()
   at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters)
   at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, CommandType commandType, String commandText)
   at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, String spName, Object[] parameterValues)
   at DotNetNuke.Data.SqlDataProvider.GetPortals()
   at DotNetNuke.Entities.Portals.PortalController.GetPortals()
   at DotNetNuke.Common.Global.CacheMappedDirectory() in c:\temp\dnn\dnn\dnn455\App_Code\Global.asax.vb:line 196
   at DotNetNuke.Common.Global.Application_Start(Object Sender, EventArgs E) in c:\temp\dnn\dnn\dnn455\App_Code\Global.asax.vb:line 316
 
 
Custom event details:

For more information, see Help and Support Center at

 

 
New Post
8/28/2007 1:55 PM
 

I found the solution.

After using ProcesMonitor to watch the sqlsrvr.exe process, I saw that the user ASPNET was trying to access C:\ directly after accesseing the Database.mdf file.

Giving ASPNET read/execute to the root of C:\ solved the problem

Scary but it worked.

 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...auto-attach databaseauto-attach database


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out