Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Background:

I'm trying to get the Live Demos of Telerik's Rad Controls for ASP.NET AJAX working on my local machine in IIS 7. I'm getting an error when I view the ComboBox demo.

Error I get:

Server Error in '/' Application .... CREATE DATABASE permission denied in database 'master'. An attempt to attach an auto-named database for file C:\Users\MacGyver\MyDocuments\Visual Studio 2008\Projects\TelerikDemos\Telerik\RadControls for ASP.NET AJAX Q2 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.

Same error is here:
(search for "THE SOLUTION IS HERE" .. half way down in huge font)

http://social.msdn.microsoft.com/forums/en-US/sqlexpress/thread/6dfdcc22-7a81-4e8f-a947-c1ce6982d4b3/

I'm on Windows 7.. slightly different clicks, but same problem I'm guessing. I get to the "Advanced Security Settings for App_Data" window, and I have two check boxes. Initially, the "Include inheritable permissions from this object's parent" (box 1) box is checked. But the "Replace all child object permissions with inheritable permissions from this object" (box 2) is unchecked. When I try checking box 2, and click "Apply", it doesn't stay checked. Why would this be?

===================================

9/9/2011 update @ 9:19am

Here are my connection strings:

<connectionStrings>
<add name="NorthwindConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|Northwind.mdf;Integrated Security=True;User Instance=False" providerName="System.Data.SqlClient" />
    <add name="TelerikConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|Telerik.mdf;Integrated Security=True;User Instance=False" providerName="System.Data.SqlClient" />
    <add name="NorthwindConnectionString35" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|Northwind.mdf;Integrated Security=True;User Instance=False" providerName="System.Data.SqlClient" />
    <add name="TelerikConnectionString35" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|Telerik.mdf;Integrated Security=True;User Instance=False" providerName="System.Data.SqlClient" />
    <add name="NorthwindEntities" connectionString="metadata=res://*;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Northwind.mdf;Integrated Security=True;User Instance=False;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />
    <add name="TelerikEntities" connectionString="metadata=res://*;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Telerik.mdf;Integrated Security=True;User Instance=False;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />
    <add name="QSFRatingsConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|QSFRatings.mdf;Integrated Security=True;User Instance=False" providerName="System.Data.SqlClient" />
    <add name="SelfReferencingDbConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|TelerikSelfReferencingDb.mdf;Integrated Security=True;User Instance=False" providerName="System.Data.SqlClient" />
</connectionStrings>

Here is a screen shot of the files in App_Data:

enter image description here

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Sounds like you already have a database on the instance called Northwind.

See this link for more details on entire setup, issues and solution:

http://stackoverflow.com/questions/7366295/sqlexpress-connection-fails-in-iis-7-w-user-instance-error-failed-to-generate

share|improve this answer
    
These are *.mdf files in the App_Data folder that the site is reading from. I did in fact have the Telerik and Northwind databases that I attached in DEV-SQL-MAC\SQLEXPRESS yesterday because I didn't realize you could read directly from the files in the web_root\App_Data folder directly. But after you added this answer, I removed the ones I attached (expecting just the files in the App_Data folder to be used) and it is still giving me the same error. The article above explains it's a permissions problem, but tried different combinations and couldn't resolve. Any other ideas? –  MacGyver Sep 9 '11 at 14:17
    
I'll add my connection strings.. that might show more. –  MacGyver Sep 9 '11 at 14:18
    
You don't need the "AttachDbFilename=|DataDirectory|\Northwind.mdf" section of the connection string as the database is already attached. –  mrdenny Sep 9 '11 at 20:25
    
Figured out this all works great when running under Visual Studio's play button (ASP.NET Development Server). So that attribute can stay in that case, can't it? See this new question for more details: stackoverflow.com/questions/7366295/… –  MacGyver Sep 9 '11 at 20:31
2  
You wouldn't want to deploy an application with the AttachDbFilename parameter. This is telling the driver to attach the database. If the database doesn't exist on the server that could cause errors to be thrown. –  mrdenny Sep 9 '11 at 20:36
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.