Solved

VB.NET SQLServer web app

Posted on 2004-10-12
10
458 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
  • 5
  • 4
10 Comments
 
LVL 5

Assisted Solution

by:LlamaJoe
LlamaJoe earned 250 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 250 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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Web Developer 7 274
How to display HTML content in APEX 5.0? 5 158
Adobe Dreamweaver Remote database test scripts vunerabilities? 3 120
graphic software 6 91
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…
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 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…

861 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