VB.NET SQLServer web app

Hi Guys

I have a VB.NET application with a local sqlserver back-end.

I now want to have this sqlserver database hosted on the internet. How would I change the VB.NET application such that it used the database on the internet?

Thanks
dalsandhuAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
smolamConnect With a Mentor Commented:
Hi you would just need to change the connectiong string to as below, for the internet DB you will need to create a SQL Server user account which has read/write permissions to the DB.  I wouldn't recommend connecting using the SA account as that would be bad for security.

"Data Source=ServerIPAddress; Initial Catalog=DatabaseName; User ID=user; Password=password; "
0
 
LlamaJoeConnect With a Mentor Commented:
All should have to do is change your connection string.  What is you current connection string?
0
 
dalsandhuAuthor Commented:
oops - long time getting back on this...

My connection string was generated by the wizard...

"workstation id=MyWSID;packet size=4096;integrated security=SSPI;data source=""(local)"";persist security info=False;initial catalog=MySQLDBName"
0
Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

 
dalsandhuAuthor Commented:
Hi - thanks for your reply. I shall try this once I have found a hoster.

I'd like to find out more - i.e.

1. What are the security issues re having direct access to sqlserver like this (rather than via a web server)?
2. Is there a best way to do this - e.g. third-party web service, or some sort of hand-shaking between vb.net client and database (so that stored proc statements aren't simply sent to db by malicious person who has listened in on communication and determined the commands that are sent from app to db)?
3. Are there any issues re communicating through a firewall?
4. Are there any web hosters who  provide a shared (i.e. cheap) sqlserver which can be accessed directly in this way (i.e. not via a web server that then communicates through a firewall)?

Any answers to these, or pointers to resources, gratefully received.
0
 
smolamCommented:
Sorry but I don't think I am qualified to answer that question, you would be better off opening a new question to get that answered!
0
 
dalsandhuAuthor Commented:
Hi - I have tried these questions before, but never got an answer. You seemed as though you might have some experience of this, so I thought I'd try my luck! Fair enough though, I'll try opening a new question.

Thanks,
Dal
0
 
smolamCommented:
Well I can maybe give you a couple of the answers.   But I am no pro because I use WebApps with the SQL DB on the same machine.

1. The password is send as clear text so you do run a risk of someone intercepting the username and password so you would want to set up a VPN to the server.
2. I would know what is the best way to do it, I would think that a webservice would be the best way because the XML would probably be meaningless to a hacker.
3. I don't think there are any firewall issues except on the hosting side.
4. As for the hosting there are tonnes of people who will host it for you, it depends on where you are as to what direction I could point you, as I am in the UK??
0
 
dalsandhuAuthor Commented:
Thanks for these answers. It's clear to me that I shouldn't communicate direct with sqlserver on the internet due to the clear text password issue, and I don't want to go the VPN route. I think therefore I should use a webservice. This means I could use a cheap shared hosting service (e.g. oneandone.co.uk - I'm also based here).

I think I'll look around for a third-party webservice component that I could use with minimum change to my code. I have also asked this previously on EE, but shall try again...

Thanks again for your help.
0
 
smolamCommented:
A word of advice it to be quite wary about shared hosting, especially if you have worried about uptime, we went with shared hosting for a year and we kept getting error messages, like timeouts and General Network errors, then switched to dedicated and haven't had an error since.  It was basically other people on the shared hosting were running bad code.  So that is one thing you should seriously consider before doing that!
0
 
dalsandhuAuthor Commented:
Hmmm, interesting re shared vs dedicated. I'm involved in a web development (seperate to what I've been talking about) and we're with oneandone shared hosting. I've read loads of postings slagging them off, but we've found them OK. We've had the very very occasional unexplained error during testing which could be like you say because of other users/network errors etc. We launch today and I'm keeping my fingers crossed... I think I'll organise a dedicate server to jump to if we find our setup can't cope.

BTW - I've found a couple of great resources on web services for sql. After reading these I'm convinced that that I'm going to create a web service to encapsulate the sql data. My VB.NET and ASP.NET apps can then use the same webservice...

http://www.west-wind.com/presentations/dotnetwebservices/DotNetWebServicesData.asp
http://www.ftponline.com/wss/2003_05/magazine/columns/sqlconnection/default.aspx
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.