Sending query to a database using WPF Browser Application

O

ofiras

Hi everyone,
As far as I know, you cannot connect directly to a SQL Server database
from a web browser application because of the security restrictions.
Is there any other way to connect to a SQL Server database through a
WPF Browser Application? (All I need is something that will let me
connect and send queries to a database)
Please help,
Ofir
 
P

Pavel Minaev

ofiras said:
Hi everyone,
As far as I know, you cannot connect directly to a SQL Server database
from a web browser application because of the security restrictions.
Is there any other way to connect to a SQL Server database through a
WPF Browser Application? (All I need is something that will let me
connect and send queries to a database)

I assume that the database here is server-side. In this case, you can build
a web service layer on top of it, encapsulating all the queries you need,
either manually via WCF, or just use ADO.NET Entity Framework + ADO.NET Data
Services to automate it.
 
O

ofiras

I assume that the database here is server-side. In this case, you can build
a web service layer on top of it, encapsulating all the queries you need,
either manually via WCF, or just use ADO.NET Entity Framework + ADO.NET Data
Services to automate it.

Is sending "post" to a .php web page (like when I have a form that I
send data using "post" method) easier? That way I can make a .php file
that will get the posted data and send the query I want. I tried it
but it didn't work too because of the security restrictions...
Please help,
Ofir.
 
P

Pavel Minaev

I assume that the database here is server-side. In this case, you can
build
a web service layer on top of it, encapsulating all the queries you need,
either manually via WCF, or just use ADO.NET Entity Framework + ADO.NET
Data
Services to automate it.
Is sending "post" to a .php web page (like when I have a form that I
send data using "post" method) easier?

I don't think so. Why bring PHP into equation
That way I can make a .php file that will get the posted data and send the
query I want.
I tried it but it didn't work too because of the security restrictions...

If you construct the query on the client, and just make the server accept
and execute any query that it receives, then you are opening a very wide
security hole. You need to encapsulate strictly the queries you need for
your client app on the server side.
 
O

ofiras

I don't think so. Why bring PHP into equation


If you construct the query on the client, and just make the server accept
and execute any query that it receives, then you are opening a very wide
security hole. You need to encapsulate strictly the queries you need for
your client app on the server side.

Ok... I see... so what is this ADO.NET Entity Framework an ADO.NET
Data Services? Is there a tutorial or article or something that
explains what is it and how to use it?
Please help,
Ofir.
 
P

Pavel Minaev

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top