Asked by:
I uploaded to my ISP and now I getting this Stack Error Message

Question
-
User-1976936810 posted
Invalid value for key 'attachdbfilename'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: Invalid value for key 'attachdbfilename'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ArgumentException: Invalid value for key 'attachdbfilename'.] System.Data.SqlClient.SqlConnectionString.VerifyLocalHostAndFixup(String& host, Boolean enforceLocalHost, Boolean fixup) +843119 System.Data.SqlClient.SqlConnectionString..ctor(String connectionString) +847986 System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous) +24 System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(String connectionString, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions) +125 System.Data.SqlClient.SqlConnection.ConnectionString_Set(String value) +56 System.Data.SqlClient.SqlConnection.set_ConnectionString(String value) +4 System.Data.SqlClient.SqlConnection..ctor(String connectionString) +21 System.Web.DataAccess.SqlConnectionHolder..ctor(String connectionString) +40 [ArgumentException: An error occurred while attempting to initialize a System.Data.SqlClient.SqlConnection object. The value that was provided for the connection string may be wrong, or it may contain an invalid syntax. Parameter name: connectionString] System.Web.DataAccess.SqlConnectionHolder..ctor(String connectionString) +123 System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +108 System.Web.Security.SqlRoleProvider.RoleExists(String roleName) +482 System.Web.Security.Roles.RoleExists(String roleName) +242 ASP.global_asax.Application_Start(Object sender, EventArgs e) +10
And Here's what my web.config file looks like. Thanks for any direction you can point me in.
<?
xml version="1.0"?><
configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"><
location path="events_edit.aspx"><
system.web><
authorization><
allow roles="Administrators"/><
deny users="*"/></
authorization></
system.web></
location><
location path="locations_edit.aspx"><
system.web><
authorization><
allow roles="Administrators"/><
deny users="*"/></
authorization></
system.web></
location><
location path="news_edit.aspx"><
system.web><
authorization><
allow roles="Administrators"/><
deny users="*"/></
authorization></
system.web></
location><
location path="photoalbum_new.aspx"><
system.web><
authorization><
allow roles="Administrators"/><
deny users="*"/></
authorization></
system.web></
location><
location path="member_list.aspx"><
system.web><
authorization><
deny users="?"/></
authorization></
system.web></
location><
location path="member_details.aspx"><
system.web><
authorization><
deny users="?"/></
authorization></
system.web></
location><
location path="clubsite.css"><
system.web><
authorization><
allow users="*"/></
authorization></
system.web></
location><
location path="images"><
system.web><
authorization><
allow users="*"/></
authorization></
system.web></
location><
connectionStrings><
add name="ClubSiteDB" connectionString="Data Source=.\SQLExpress;Integrated Security=true;AttachDBFileName=|DataDirectory|Club.mdf;User Instance=True" providerName="System.Data.SqlClient" /></
connectionStrings><
system.web><
roleManager enabled="true"/><
authentication mode="Forms"><
forms name="bloForm" loginUrl="Default.aspx" /></
authentication><
authorization><
deny users="?" /></
authorization><
compilation debug="true" strict="true"><
assemblies><
add assembly="System.Xml, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/><
add assembly="System.Messaging, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/><
add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></
assemblies></
compilation><
membership defaultProvider="AspNetSqlMembershipProvider"/><
siteMap defaultProvider="AspNetXmlSiteMapProvider" enabled="true"><
providers><
remove name="AspNetXmlSiteMapProvider"/><
add name="AspNetXmlSiteMapProvider" description="SiteMap provider which reads in .sitemap XML files." type="System.Web.XmlSiteMapProvider" securityTrimmingEnabled="true" siteMapFile="Web.sitemap"/></
providers></
siteMap><
customErrors mode="Off"/><
globalization requestEncoding="utf-8" responseEncoding="utf-8"/></
system.web></
configuration>Saturday, February 11, 2006 2:18 AM
All replies
-
User-1909038188 posted
I am certainly no expert but since I am going through a similar process of trying to move an app to an ISP hosted page I'll offer an idea.
It looks like you are trying to attach a file in an SQL Express DB? Does your ISP offer SQL Express and do they also include the Club.mdf? I suspect you'll need to move the tables in that DB to whatever SQL Server you have access to.
HTH
Saturday, February 11, 2006 10:30 AM