views:

32

answers:

2

If there is a self contained web app, let's use the Screw Turn Wiki as an example, that utilizes the App_Data to store the MDF, is there any way another web app, living in the same domain, can also use that MDF?

Example IIS Setup:

http://wiki.domain.com | c:\web\wiki | port 80  
http://www.domain.com  | c:\web\site | port 80

My WWW web app would like to pull some data from the WIKI app. Without moving the MDF to a full fledged SQL Server is there a way to do this? Also note, the WIKI app is an installed app so I don't have access to its source.

TIA

A: 

Neither application should be using the MDF directly. Both should be accessing the data through a Data Access Layer of some kind.

John Saunders
This answer seems somewhat irrelevant given that he does not have the source to the App.
Nathan
A: 

Given that the Wiki app controls the data access for itself, it seems that your webapp should have its own datalayer component that accesses the SQL Server datastore from the wiki.

That would give any other app the ability to read into that SQL layer as it might want to.

If you want to connect to any .mdf on the server, use this connection string in your datalayer.

Server=MySqlServer;AttachDbFilename=c:\myDbFile.mdf;Database=dbName; Trusted_Connection=Yes;

More examples of connection strings to load an MDF into SQL Server.

p.campbell
I have not found a way to access the MDF (via a data layer of course) when it is part of another app. That is what I am asking about.
Keith Barrows