[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now


VB.NET SQLServer web app

Posted on 2004-10-12
Medium Priority
Last Modified: 2010-04-07
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?

Question by:dalsandhu
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4

Assisted Solution

LlamaJoe earned 1000 total points
ID: 12335807
All should have to do is change your connection string.  What is you current connection string?

Author Comment

ID: 12471786
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"

Accepted Solution

smolam earned 1000 total points
ID: 12582282
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; "
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks


Author Comment

ID: 12582560
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.

Expert Comment

ID: 12584344
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!

Author Comment

ID: 12602693
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.


Expert Comment

ID: 12602720
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??

Author Comment

ID: 12613546
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.

Expert Comment

ID: 12613654
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!

Author Comment

ID: 12623857
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...


Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When deciding to adopt any help desk solutions many factors should be explored before taking decisions. This will change from business to another but in general there are some kind of rule of thumb. Here are some quick tips: Do we need only ticket…
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question