?
Solved

VB.NET SQLServer web app

Posted on 2004-10-12
10
Medium Priority
?
481 Views
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?

Thanks
0
Comment
Question by:dalsandhu
[X]
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
10 Comments
 
LVL 5

Assisted Solution

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

Author Comment

by:dalsandhu
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"
0
 
LVL 7

Accepted Solution

by:
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; "
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 

Author Comment

by:dalsandhu
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.
0
 
LVL 7

Expert Comment

by:smolam
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!
0
 

Author Comment

by:dalsandhu
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.

Thanks,
Dal
0
 
LVL 7

Expert Comment

by:smolam
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??
0
 

Author Comment

by:dalsandhu
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.
0
 
LVL 7

Expert Comment

by:smolam
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!
0
 

Author Comment

by:dalsandhu
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...

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

Featured Post

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
The purpose of this video is to demonstrate how to connect a WordPress website to Google Analytics. This will be demonstrated using a Windows 8 PC Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php :…
The purpose of this video is to demonstrate how to make a WordPress Site faster and smaller in size by cleaning up the database. This will be demonstrated using a Windows 8 PC. Plugin WP Optimize will be used. Go to your WordPress login page. T…
Suggested Courses

771 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