views:

34

answers:

1

Hi,

I have developed a web application that has a SqlServerMembershipProvider with it and a db interface using linqtosql. But we had some problems with the membership provider when we deployed the application to our web host. It was because of some application pool configurations which we could fix in our local IIS server but we couldn't fix it with the plesk in our web host.

We decided to change our web hosting firm and we are now thinking to use xml as datasource because the cost of the sql server is too much for the project. Is there any membership provider exists for xml ?

What are the main differences between Sql and XML ? Slower ? More secure ? Does it become slower to load if the xml file becomes bigger ?

Thanks

+1  A: 

LINQ stands for Language INtegrated Query. It's a new language feature introduced with both C# and VB.NET in Visual Studio 2008.

LINQ gives you the ability to write queries directly in your code. LINQ to SQL converts the LINQ code you write into SQL statements that are sent to SQL Server. LINQ to XML provides syntax for consuming XML. They both use LINQ, but they are not interchangeable technologies.

The other major built in LINQ provider is LINQ to Objects, which allows you to write queries against Collections (specifically those that implement the IQueryable interface) in .NET.

There are a number of other lesser known LINQ providers as well -- even a LINQ to Twitter, which translates LINQ into REST web requests to the Twitter API.

SQL Server is a database. XML is a method of structuring information, typically stored in text files or transmitted over the wire. One large text file (or even a set of files) with XML in it would make a horrible data back end for a website. You'd have to write a bunch of code to handle concurrent writes to the data and transactions. SQL Server does those things for you without any extra effort. That's what it's designed to do.

If you had a small set of information that was read-only for your web visitors, then storing it in an xml file might make sense.

Just because you can access information from both SQL Server and an XML file via LINQ doesn't mean you can substitute one for the other.

Also, all the Windows web hosts I've looked at include at least one SQL Server database in the basic hosting plan, so cost should not be an issue.

Dennis Palmer