Invalid value for key 'attachdbfilename'

Last post 08-05-2009 1:13 PM by africano. 2 replies.

Sort Posts:

  • Invalid value for key 'attachdbfilename'

    08-04-2009, 10:31 PM
    • Member
      5 point Member
    • africano
    • Member since 03-22-2007, 2:04 AM
    • Posts 29

     first i will show you the error ...

     

    Server Error in '/' Application.

    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:

    Line 5:  	void Application_Start(object sender, EventArgs e) {
    Line 6:  		SiteMap.SiteMapResolve += new SiteMapResolveEventHandler(AppendQueryString);
    Line 7:  		if (!Roles.RoleExists("Administrators")) Roles.CreateRole("Administrators");
    Line 8:  		if (!Roles.RoleExists("Friends")) Roles.CreateRole("Friends");
    Line 9:  	}


    Source File: c:\Clients\c8174\r1982\balticcontrol-eg.com\public_html\Global.asax    Line: 7

    Stack Trace:

    [ArgumentException: Invalid value for key 'attachdbfilename'.]
       System.Data.SqlClient.SqlConnectionString.VerifyLocalHostAndFixup(String& host, Boolean enforceLocalHost, Boolean fixup) +811724
       System.Data.SqlClient.SqlConnectionString..ctor(String connectionString) +2207
       System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous) +24
       System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(String connectionString, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions) +200
       System.Data.SqlClient.SqlConnection.ConnectionString_Set(String value) +62
       System.Data.SqlClient.SqlConnection.set_ConnectionString(String value) +4
       System.Data.SqlClient.SqlConnection..ctor(String connectionString) +24
       System.Web.DataAccess.SqlConnectionHolder..ctor(String connectionString) +54
    
    [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) +136
       System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +134
       System.Web.Security.SqlRoleProvider.RoleExists(String roleName) +478
       System.Web.Security.Roles.RoleExists(String roleName) +73
       ASP.global_asax.Application_Start(Object sender, EventArgs e) in c:\Clients\c8174\r1982\balticcontrol-eg.com\public_html\Global.asax:7
    



    Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053

     

    Secondly i wiil tell what i did

    i do have change the connection to fit my host server, which is supporting sql express, 2005 & 2008 anyway i used the express version and i tired to combine the ASPNET.mdf with Personal.mdf , also i did run the aspnet_regsql.exe and i made the roles and create users even that i got a blank tables in the Personal database for the users and roles and everytime when i call this page have to show me this error and i don't know how to fill these tables, i am lost.

    anyone can help me?

    3point5
    Color separation, Advertising, Decorate, Designs, 2D Animation, Web Design, Web Develop and web Host. All in One www.3-point-5.com
  • Re: Invalid value for key 'attachdbfilename'

    08-05-2009, 12:09 AM
    • Contributor
      2,980 point Contributor
    • santa_1975
    • Member since 06-30-2008, 6:20 AM
    • Posts 496

    Hi,

    This thread has a solution for the issue that you are facing.

    http://dotnetforum.lk/forums/t/8693.aspx

    Hope this helps.


  • Re: Invalid value for key 'attachdbfilename'

    08-05-2009, 1:13 PM
    • Member
      5 point Member
    • africano
    • Member since 03-22-2007, 2:04 AM
    • Posts 29

     i think my problem is a permission or roles problem but i can't handle it.

    my database connection is fine

    3point5
    Color separation, Advertising, Decorate, Designs, 2D Animation, Web Design, Web Develop and web Host. All in One www.3-point-5.com
Page 1 of 1 (3 items)