Question

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

Was it helpful?

Solution

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.

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top