
Steve Holdorf
Top achievements
Rank 1
Steve Holdorf
asked on 15 Aug 2011, 12:15 AM
When I try to run the demo website on my machine I get the following error:
Database 'C:\PROGRAM FILES\TELERIK\RADCONTROLS FOR ASP.NET AJAX Q1 2011\LIVE DEMOS\APP_DATA\NORTHWIND.MDF' cannot be upgraded because it is read-only or has read-only files. Make the database or files writeable, and rerun recovery.
An attempt to attach an auto-named database for file C:\Program Files\Telerik\RadControls for ASP.NET AJAX Q1 2011\Live Demos\App_Data\Northwind.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
I have uninstalled and restalled the 2011 ajax version and am still having the same problem. I did install mysql on my machine today and uninstalled sql server 2008, then removed 2005 and reinstalled sql server 2008. Am running vs studio 2010 professional trial.
Please assist.
Thanks,
Steve Holdorf
Database 'C:\PROGRAM FILES\TELERIK\RADCONTROLS FOR ASP.NET AJAX Q1 2011\LIVE DEMOS\APP_DATA\NORTHWIND.MDF' cannot be upgraded because it is read-only or has read-only files. Make the database or files writeable, and rerun recovery.
An attempt to attach an auto-named database for file C:\Program Files\Telerik\RadControls for ASP.NET AJAX Q1 2011\Live Demos\App_Data\Northwind.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
I have uninstalled and restalled the 2011 ajax version and am still having the same problem. I did install mysql on my machine today and uninstalled sql server 2008, then removed 2005 and reinstalled sql server 2008. Am running vs studio 2010 professional trial.
Please assist.
Thanks,
Steve Holdorf
8 Answers, 1 is accepted
0

Steve Holdorf
Top achievements
Rank 1
answered on 15 Aug 2011, 02:24 AM
Also, here is the stack trace:
Exception Details: System.Data.SqlClient.SqlException: Database 'C:\PROGRAM FILES\TELERIK\RADCONTROLS FOR ASP.NET AJAX Q1 2011\LIVE DEMOS\APP_DATA\NORTHWIND.MDF' cannot be upgraded because it is read-only or has read-only files. Make the database or files writeable, and rerun recovery.
An attempt to attach an auto-named database for file C:\Program Files\Telerik\RadControls for ASP.NET AJAX Q1 2011\Live Demos\App_Data\Northwind.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
Source Error:
Stack Trace:
Exception Details: System.Data.SqlClient.SqlException: Database 'C:\PROGRAM FILES\TELERIK\RADCONTROLS FOR ASP.NET AJAX Q1 2011\LIVE DEMOS\APP_DATA\NORTHWIND.MDF' cannot be upgraded because it is read-only or has read-only files. Make the database or files writeable, and rerun recovery.
An attempt to attach an auto-named database for file C:\Program Files\Telerik\RadControls for ASP.NET AJAX Q1 2011\Live Demos\App_Data\Northwind.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
Source Error:
The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL: |
Stack Trace:
|
0

milos
Top achievements
Rank 1
answered on 16 Aug 2011, 12:44 PM
Hi Steve, I also have the same error. I also uninstalled SQL Server 2005 and installed SQL Server 2008 Express but it didn't resolve it. I couldn't attach the example MDF database due to the write restrictions (I had the same error message as you). Did you manage to resolve this? Good luck! Milos
0

Steve Holdorf
Top achievements
Rank 1
answered on 16 Aug 2011, 01:47 PM
Hi,
When I create apps that use my Telerik controls they work fine with MySQL. What I am doing is use the on-line internet site example demo to help implement my code. What I did notice is that when I installed the MySQL ODBC connection namespace and dll for Windows it added the MyDB conection to my list of databases in VS 2010 along with the Telerik SQL demo databases. In this case the Telerik databases appear red x'ed out when I open the telerik sample demo solution. I removed all database connections in VS and rebuild your solution. When I run in debug the site comes up but anytime data binding occurs. I still get the error and stack trace. Now, what my dba said is that what I need to do is add myself, owner account, to the security database for SQL server. He is writting a script to help me do this today and I will get back with you once I try this and let you know if it works. If it works I will add the script to my next post. If you find a solution before then please let me know.
Thanks,
Steve Holdorf
When I create apps that use my Telerik controls they work fine with MySQL. What I am doing is use the on-line internet site example demo to help implement my code. What I did notice is that when I installed the MySQL ODBC connection namespace and dll for Windows it added the MyDB conection to my list of databases in VS 2010 along with the Telerik SQL demo databases. In this case the Telerik databases appear red x'ed out when I open the telerik sample demo solution. I removed all database connections in VS and rebuild your solution. When I run in debug the site comes up but anytime data binding occurs. I still get the error and stack trace. Now, what my dba said is that what I need to do is add myself, owner account, to the security database for SQL server. He is writting a script to help me do this today and I will get back with you once I try this and let you know if it works. If it works I will add the script to my next post. If you find a solution before then please let me know.
Thanks,
Steve Holdorf
0

milos
Top achievements
Rank 1
answered on 16 Aug 2011, 02:43 PM
Hi Steve,
I just got it to work. Although I had set the mdf files as writable I didn't realise that the account I was using didn't have "FULL CONTROL". Right click on the folder and go to the Security Tab. Check that the account you are using has FULL CONTROL. I also moved the Telerik databases to a backup folder within SQLServer Express and used a stored procedure to do the attaching.
EXEC sp_attach_db @dbname = N'NorthwindTest',
@filename1 = N'C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\Backup\Northwind.mdf',
@filename2 = N'C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\Backup\Northwind_Log.ldf'
Good luck!
Cheers,
Milos
I just got it to work. Although I had set the mdf files as writable I didn't realise that the account I was using didn't have "FULL CONTROL". Right click on the folder and go to the Security Tab. Check that the account you are using has FULL CONTROL. I also moved the Telerik databases to a backup folder within SQLServer Express and used a stored procedure to do the attaching.
EXEC sp_attach_db @dbname = N'NorthwindTest',
@filename1 = N'C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\Backup\Northwind.mdf',
@filename2 = N'C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\Backup\Northwind_Log.ldf'
Good luck!
Cheers,
Milos
0

Ziji
Top achievements
Rank 1
answered on 17 Sep 2011, 04:04 PM
I use only SQL SQLExpress 2008 and no SQL Server or SQL Server Dev installed on my Windows 7 laptop.
The account running SQLExpress on my laptop is Network Service.
I had trouble running AJAX Demo as I kept getting above errors for months. I tried many tricks posted here but no luck.
Finally, I tried to grant Full Conctrol to Network Service on 'C:\PROGRAM FILES\TELERIK\RADCONTROLS FOR ASP.NET AJAX Q1 2011\LIVE DEMOS' folder (NOT the App_Data under it !!!) and the Demo works without any database connection error.
The important thing is the folder needs the Full Conctrol permission is LIVE DEMOS, NOT App_Data under it !!!
The account running SQLExpress on my laptop is Network Service.
I had trouble running AJAX Demo as I kept getting above errors for months. I tried many tricks posted here but no luck.
Finally, I tried to grant Full Conctrol to Network Service on 'C:\PROGRAM FILES\TELERIK\RADCONTROLS FOR ASP.NET AJAX Q1 2011\LIVE DEMOS' folder (NOT the App_Data under it !!!) and the Demo works without any database connection error.
The important thing is the folder needs the Full Conctrol permission is LIVE DEMOS, NOT App_Data under it !!!
0

pat
Top achievements
Rank 1
answered on 25 Jan 2012, 11:44 PM
I just copied out of the program files dir into a junk dir and it ran.
0

Lasse
Top achievements
Rank 1
answered on 18 Nov 2014, 10:29 AM
I prepended "Initial Catalog=uniquenamehere;" to the connection string, then it worked.
I also messed with permissions, adding "Everybody" with full permissions to the App_Data folder.
The connection string now is:
<
connectionStrings
>
<
add
name
=
"Northwind"
connectionString
=
"metadata=res://*/Models.Northwind.csdl|res://*/Models.Northwind.ssdl|res://*/Models.Northwind.msl;provider=System.Data.SqlClient;provider connection string="
Initial
Catalog
=
grid
-crud;data source=.\SQLEXPRESS;attachdbfilename=|DataDirectory|\Northwind.mdf;integrated
security
=
True
;user
instance
=
True
;
multipleactiveresultsets
=
True
;
App
=
EntityFramework
""
providerName
=
"System.Data.EntityClient"
/>
</
connectionStrings
>
0

Coen
Top achievements
Rank 2
answered on 03 Sep 2015, 11:53 AM
I am using SQLExpress on my PC and encountered the same issue with attaching the Telerik database in the demo. After trying all of the tricks listed here I decided to open SQL Server management Studio as Administrator. I then could attach the database without error.