Last post May 01, 2017 09:19 PM by Gautam Sharma
Apr 28, 2017 02:22 PM|Gautam Sharma|LINK
I have made changes to my web.config file as :
<add name = "mydatabase" connectionString = "Data Source = |DataDirectory|mydatabase.sdf; Max Database Size = 4000; Persist Security Info = False;" />
but still, in webmatrix, database view i get the following error:
The database file is larger than the configured maximum database size. This setting takes effect on the first concurrent database connection only. [ Required Max Database Size (in MB; 0 if unknown) = 0 ]
System.Data.SqlServerCe.SqlCeException (0x80004005): The database file is larger than the configured maximum database size. This setting takes effect on the first concurrent database connection only. [ Required Max Database Size (in MB; 0 if unknown) = 0
at System.Data.SqlServerCe.SqlCeConnection.Open(Boolean silent)
at Microsoft.WebMatrix.DatabaseManager.SqlCeDatabase.SqlCeDatabaseProvider.TestConnection(String connectionString)
at Microsoft.WebMatrix.DatabaseManager.IisDbManagerModuleService.TestConnection(DatabaseConnection databaseConnection, String configPathState)
at Microsoft.WebMatrix.DatabaseManager.Client.ClientConnection.Test(ManagementConfigurationPath configPath)
Apr 28, 2017 02:31 PM|Rion Williams|LINK
Have you tried removing the Max Database Size attribute?
By default, SQL Compact has a maximum database size of 4GB, so if you don't specify a size, it should just use that. Additionally, is there any chance that the database you are attempting to open is larger than 4GB? If so, you'll have issues there as well
and may need to resort to another database provider.
Apr 28, 2017 02:46 PM|Gautam Sharma|LINK
removing the attribute give the same error... that attribute must be there...
The database size is 766MB... the app is working fine... Only issue is I am unable to open this in webmatrix
May 01, 2017 08:13 AM|Jean Sun|LINK
The Max Database Size property for connection string is required. Since your app is working fine. Try to restart webmatrix and check whether it could fix the issue.
May 01, 2017 09:19 PM|Gautam Sharma|LINK
did restart webmatrix.. same issue