Groups | Blog | Home
all groups > sql server (microsoft) > february 2007 >

sql server (microsoft) : C# and server connectivity


Marc Gravell
2/20/2007 9:22:20 PM
[quoted text, click to view]
It isn't very clear (to me) what this constraint does/doesn't allow,
given your HTML / PHP
comments. Personally my first stab would be to run a WCF site on the
server in a
dedicated server account (with access) and interface through that,
using any of a dozen
user authentication schemes as appropriate. Any good?

Marc
Jon Slaughter
2/20/2007 11:28:45 PM
I'm writing a C# app that needs access to a remote SQL database. The issue
is that I don't want users of the app to have directly access to the
database because of security reasons.

I do not have permissions to run any application on the server to write some
interface so I don't know what to do. My initial thought was to write a web
page in php and have the C# application access the page and transfer
information through the php web interface transparently to the user. (so
php will handle the SQL statements and the html web will interface with the
C# app.)

This doesn't seem the best way to do this and I was wondering if there is a
better way or some other approach? Maybe I can use the HTML request object
to send information back and forth simulating a web server application
interface? (not quite sure how that would work though since I have no
experience with it)

Thanks,
Jon

Jon Slaughter
2/22/2007 3:19:02 AM

[quoted text, click to view]

Because I don't have any access to run any server applications except those
that are already prescribed for the account. My current web hosting service
isn't going to allow me to run any old application I want and chances are
there not going to allow me to run any application I create because of
security issues.

Jon

mangist NO[at]SPAM gmail.com
2/23/2007 8:10:39 PM
On Feb 21, 10:19 pm, "Jon Slaughter" <Jon_Slaugh...@Hotmail.com>
[quoted text, click to view]

Use ASP.NET and web services. If your web hosting provider doesn't
allow ASP.NET, surely they don't allow a SQL database?

Ed Murphy
2/23/2007 9:31:48 PM
[quoted text, click to view]

Jon Slaughter
2/23/2007 11:18:20 PM

[quoted text, click to view]

No asp and no SQL. It uses php and mysql but I have sqlexpress that I'm
using to test with.

Jon Slaughter
2/24/2007 6:46:00 AM

[quoted text, click to view]

Did I ever say I wouldn't???

Jonathan Roberts
2/24/2007 4:28:43 PM
[quoted text, click to view]

This thread confuses me... Why aren't you simply connecting to your
database (whatever it is) through ODBC from your application? This
method you're trying seems very odd unless I have missed some critical
constraint of your environment.

Ed Murphy
2/24/2007 6:52:44 PM
[quoted text, click to view]

Adding extra levels is more likely to screw things up than add any
useful protection. You should simply restrict access at the database
server level. For instance, if a user should be able to update some
records in a table but not others, then you don't give them direct
access to the table (relying on the client software to behave) - you
only give them access to a stored procedure (or whatever equivalent
MySQL offers) that rejects any attempt to perform an unauthorized
Jon Slaughter
2/25/2007 1:58:50 AM

[quoted text, click to view]

Connecting to the database using any client side scripting is only a
security disaster. I have to keep the users as far away from the database as
possible. If they are connecting to the database directly then they could
potentially hack the server.

AddThis Social Bookmark Button