Click here to Skip to main content
15,881,852 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Greetings,

I have a portfolio website at a discount ISP. I just replaced most of my Web Forms App with a nice MVC app. The ISP provides Access and MySQL(4.x) for free, so you can do some Db stuff, but working with anything MVC or ASP.Net default security is a hassle. It is $50 a month for SQL Server, but they really intend that for a business user. I don't know how many prospective employers have ever looked at this site, but I doubt it is many, so I cannot possibly see paying for that.

I was wondering. If you published the website, setting the references you need for SQL Server as Copy Local=True, do you think you could read the MDF data file? What references would you need? System.Data ... ?

Really, this is a bit over my head, but it would be great if I had a little SQL Server capability on my web site.

Thanks for any answers, Mike ... For that matter, thanks for the many answers over the years.
Posted
Comments
RedDk 21-Apr-13 20:17pm    
I've been thinking about that $50.00 for several years now ... addressing your problem though ... why not just stick the .mdf in afolder to which the user has read rights and let him take care of the rest of the details of getting info out of it?
Michael Breeden 21-Apr-13 20:23pm    
Well I want it available for basic ASP.Net Authentication and Authorization, which you can do without SQL Server, but it would be more convenient with it.
Plus, while MySQL can be used as a database, it's quite limited and does not greatly lend itself to Entity stuff (Yes there does seem to be an adapter available, but just more hassle and I get buried keeping track of configurations.) I'm getting more into MVC / LINQ and they want SQL Server.
... I think I understood your question. It is about my application using data in the MDF file, not a user having access to the file.
RedDk 22-Apr-13 14:59pm    
Absoultely. And the answer is size constraint.

At the moment.

1 solution

You cannot read MDF file using C#. You can query meta data of the file but not the database data.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900