Reputation: 51063
I've just deployed an ASP.NET web site to my hosting provider, but I keep getting the following error when I try and log in:
SQLExpress database file auto-creation error: The connection string specifies a local Sql Server Express instance using a database location within the applications App_Data directory.
I have already set up a DB with the required schema on the host, and I can even log in through the host DB from my dev machine, but not on the hosted site itself. My provider configuration is as follows:
<connectionStrings>
<add name="Membership" connectionString="data source=localhost;initial catalog=bkelly_aspnetdb;user id=withheld; password=withheld;" />
</connectionStrings>
<system.web>
<membership defaultProvider="SqlMembershipProvider">
<providers>
<clear/>
<add name="SqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="Membership"
...
I find nothing at site level that suggests using the App_Data DB, but surely the directive should sort out any machine level provider config?
Upvotes: 1
Views: 260
Reputation: 11673
Not 100% on this, but try adding
<clear/>
...before you add your connectionStrings section:
<connectionStrings>
<clear/>
<add name="Membership" connectionString="data source=localhost;initial catalog=bkelly_aspnetdb;user id=withheld; password=withheld;" />
</connectionStrings>
Upvotes: 1
Reputation: 10526
Under mono you have to replace the "SqlMembershipProvider" text to something else (doesn't matter unless it's something else) in your config. I don't think your host is using mono, but worth a try.
Upvotes: 0
Reputation: 12215
Might the problem be the disk that the file is on is compressed. This would produce the error you experienced
Upvotes: 0