Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.4k views
in Technique[技术] by (71.8m points)

asp.net mvc - What does "The "DataDirectory" registry value is missing in the LocalDB instance registry key" error mean?

I have a MVC4/ASP.Net application that uses localdb. Everything "appears" to work correctly. However I am getting loads of errors in my event log:

The "DataDirectory" registry value is missing in the LocalDB instance registry key: {BB3F4304-E7E9-4EE7-9A25-B46BFAA73FB4}

The "DataDirectory" registry value is missing in the LocalDB instance registry key: {BB31321B-BEB9-465B-8C8E-DEF9C2C67FBE}

Each time the instance changes.

XML Detail of the error:

<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="SQLLocalDB 11.0" /> 
    <EventID Qualifiers="35269">512</EventID> 
    <Level>2</Level> 
    <Task>0</Task> 
    <Keywords>0x80000000000000</Keywords> 
    <TimeCreated SystemTime="2013-03-12T14:12:43.000000000Z" /> 
    <EventRecordID>1080755</EventRecordID> 
    <Channel>Application</Channel> 
    <Computer>XXXXXX</Computer> 
    <Security /> 
  </System>
  <EventData>
    <Data>{BB07CF13-2ABD-4FD5-AB2B-467FF08F28E6}</Data> 
  </EventData>
</Event>

Connection string:

<add 
    name="DefaultConnection" 
    connectionString="Data Source=(localdb)v11.0; Initial Catalog=WebMVCContext-20121205135209; Integrated Security=True; MultipleActiveResultSets=True; AttachDbFilename=|DataDirectory|WebMVCContext-20121205135209.mdf" 
    providerName="System.Data.SqlClient" />

Again, it is working and everything is connecting just get 10-20 of these for every connection.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I have the same issue. It seems like a bug of Localdb. I have solved this issue by deleting the registry key:

HKEY_USERS.DEFAULTSoftwareMicrosoftMicrosoft SQL ServerUserInstances[GUID_FROM_EVENT_LOG]

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...