A company I work for has an application written in VB.net with a SQL Server database storing all information. Works fine no complaints, but we also want to upload/download files within the application, and have the files + SQL Server database on a remote server i.e. working over the internet.
We could just use a VPN but that's not the best method. What would you suggest we use to communicate securely between the application and the remote server for both the database and filesharing?
I was thinking of doing everything over HTTPS, but we would need some kind of agent on the other end to receive requests.
Sorry if this is a noob question, I have no experience with VB.net myself, I usually use PHP + C!
Thanks
Use a VPN. It implies just deployment and configuration.
'Going over HTTPS' means you rewrite your application, as the current VB app is expecting T-SQL and SMB endpoints to discuss with.
Related
I am trying to find code examples of:
1. Remote MVC App on IIS
2. Data is on the customers SQL Server and on the windows domain they are using their web browser from.
I have a MVC app that works well with IIS and SQL Server being on the same domain.
However, I am trying to figure out how to extend the MVC App to multiple customers by hosting the site on a remote IIS server and having the remote MVC application on IIS query the customers SQL Server database.
I am comfortable with MVC, Entity Framework, & SQL Server but have had a hard time finding examples for this scenario.
You can certainly change the connection string of your application to work with any remote SQL Server instance you please. Obviously being outside the domain poses some additional challenges and security risks that you should consider, however, to get them talking to each other you can simply specify the server address in your connection string like so:
Data Source=192.168.10.1,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;
The Network Library parameter forces the use of TCP/IP as a network protocol. Note that the customer will have to set up a SQL Server Authentication user on their database to simplify this scenario - using a trusted connection will be impossible unless you integrate your Windows domains, which could be a significant amount of work for little benefit.
I have not found enough information about this online but I am sure that is possible. I want to have a vb.net application in my computer and connect to a database in my hosting to add records.
Also, I want to access the database online to see those records from away from home. Kind of like having my own phone book online in my hosting..
Can someone point me in the right direction.
1. Do I use access or mysql?
2. Do I set up the connection string using a ftp or something different?
3. I want to develop in asp.net
Thanks to all
Access is probably not a good fit, as it is not really reliable across an Internet connection, so I would go with MySQL. Unless you want to consider SQL Server, which has better out-of-the-box support in Visual Studio.
For a server-based database (MySQL or SQL Server), your connection string will include the server address provided by your host and possibly a port. If you insist on using a file-based database (Access or SQL Server CE), the database will probably be on a shared folder on the host, and the connection string will include the path to that shared folder.
If you are developing in ASP.NET, your host may limit your choice of database.
In our development team we have:
4 developers
one application uses PHP and database Microsoft SQL Server 2008r2, except one using PowerBuilder instead of PHP and one using MySql instead of Microsoft SQL Server
All applications are database-centered, some of them are for general public, some are not.
Question is: for the procedures and functions shared by all applications, what does it make most sense to use, database procedures/functions or web services?
We could not find an agreement within the team.
Whatever you answer, please explain the reasons.
Webservices and Database Proc/Functions are two entirely different things.
Webservices are the services over the web, mainly used when a client and a server interact and client interacts with the server through web or HTTP or any other protocol.
Database proc/func - are created to interact with a login to a DB server.
In your case, if all the application are in the same domain... then you dont need to access through webservices and also it is a lot of overhead.
You can create a common DB server , where you can keep these proc/func and can be consumed by all.
I have a simple ms sql 2012 express database & a simple VB Express 2010 application as its front end.
Can I simply host my MS SQL database on Azure & update the application to interrogate the hosted database? This would mean, the application would still be local, but the DB would be hosted. My offices are distributed & if we could do this it would save quite a bit of hassle.
Do I need to use a virtual machine, cloud services or straight hosting? Its difficult for me to understand the subtleties each service.
I've had a look at the azure services information and the documentation is pitched a little high for me. I just wanted to know if this is relatively simple thing to do & if anyone has has any pointers to How To's or Noob guides to azure.
It's absolutely possible and in fact, super easy to set up.
Check out this simple step-by-step instruction on how to set up SQL Server DB on Windows Azure - https://www.windowsazure.com/en-us/develop/net/common-tasks/sql-azure-management/
You can even connect to it from your SQL Server Management Studio just like you would connect to a local database or a database on your network.
Ideally - yes, you can change the connection string used by the VB desktop app to reference the Windows Azure SQL Database instance instead of the local database. That said, SQL Database is not 100% compatible with SQL Server. Be sure to check out the differences at http://msdn.microsoft.com/en-us/library/windowsazure/ff394115.aspx
Can I simply host my MS SQL database on Azure & update the application
to interrogate the hosted database?
Yes, your SQL Azure database is accessible via a connection string, but you have to make sure that you create a firewall rule in SQL Azure to allow your locally hosted or remotely hosted applications to access the database. Everything is turned off by default.
Do I need to use a virtual machine, cloud services or straight
hosting?
I'm not exactly sure what you're asking here, but a VM may be overkill, as that gives you basically a place to host a VM in Azure. You control the O/S, patching, etc. A cloud service (a web or worker role) is a little less maintenance heavy as the O/S, patches, updates, etc. are maintained by Azure and you just worry about your application. Straight hosting - are you talking about hosting on 1&1 or GoDaddy or something? If so, that's really no different than your VB app running locally and accessing your Azure database. For this option, just make sure you have your firewall rules set properly, otherwise you won't be able to access the database.
Hopefully this helps. Good luck!
Azure has some specific requirements that need to be met (like every table has to have a Clustered Index), and it does not support some functionality that is available on "normal" SQL Server (like replication, FILESTREAM data, or data compression).
Other than that, as long as your app meets the requirements, there should not be a reason for it not to work on Azure. The majority of the functionality not supported by Azure is most likely out6 of the scope of what a "noob" would implement, so you probably are safe.
However, Azure might be overly expensive for your needs. It might be cheaper to go for hosting the database somewhere. This would mean you would only have to change the connection string of the application to point to the new database server (though there could be additional limitations imposed by your hosting provider).
Good luck with whichever option you end up taking!
I've been developing a site using ASP.NET MVC, and have decided to use the new SQL Server 2008 FILESTREAM facility to store files 'within' the database rather than as separate entities. While initially working within VS2008 (using a trusted connection to the database), everything was fine and dandy. Issues arose, however, when I shifted the site to IIS7 and changed over to SQL authentication on the database.
It seems that streaming a FILESTREAM doesn't work with SQL authentication, only with Windows authentication. Given this, what is the best practice to follow?
Is there a way to force this sort of thing to work under SQL authentication?
Should I add NETWORK SERVICE as a database user and then use Trusted authentication?
Should I create another user, and run both the IIS site and the database connection under this?
Any other suggestions?
Take a look at this article. I don't know a whole lot about FileStreaming and security, but there are a couple of interesting options in the FileStreaming setup such as allowing remote connections and allow remote clients to access FileStreaming