Solved

VB.NET SQLServer web app

Posted on 2004-10-12
10
433 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
Comment Utility
All should have to do is change your connection string.  What is you current connection string?
0
 

Author Comment

by:dalsandhu
Comment Utility
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
Comment Utility
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
 

Author Comment

by:dalsandhu
Comment Utility
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
Comment Utility
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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

Author Comment

by:dalsandhu
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Now that Expression Web 4.0 (http://www.microsoft.com/expression/products/Upgrade.aspx) is free if you buy or have the full version of Expression Web 3.0, now is the best time to  migrate from FrontPage to Expression Web (http://www.frontpage-to-exp…
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 manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…
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…

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now