Do I need SSL Certificate for SQL Server and Web Server? - ssl

I am currently developing a website in C#, It requires to send requests to remote SQL Server.
I need to encrypt any communications from the client to the web server and to the SQL Server.
The SQL Server is currently used locally by another windows application, so the SQL server is being used locally and remotely.
So my concern is do I need to install cert for both servers ? If so will there be any connection problem between windows application and sql server ?
Thanks

you would only need a certificate on your sql server
use the encypt=yes option in your connection string on the web server.

Related

Connect to SQL Server in VM using local machine

I would like to connect SQl server DB in VM using my local sql server management studio.
What should I need for server name ?
Can I use my server Windows authentication for VM in my local ?
Create an empty text file on your VM and give it extension .udl
Doubleclick on it now you can set the properties easy from combobox
Adjust the properties and click on "test connection" until it works
Now open the file in notepad and there you see a complete connection string.
Note that for SQL Server authentication you need to configure the protocol in SQL Server Configuration Manager
When you are in Management studio on your local machine, you will need the hostname or IP address of the VM.
For Windows Authentication, you will need an account on the local domain that both your workstation and the database VM are connected to.
For SQL server authentication, you will need an account in the SQL Server instance.
In both cases, security will need to be configured and associated with your account.
Are you on a domain, or is this just a private server?
Use name of the VM where SQL server is running.
And yes, you can use Windows authentication. Depending on your domain settings.
This will help you How to: Create a SQL Server Login It is not much difference from SQL login.
And if you are in Administrators group on machine running SQL Server, then your login already should be included.
And if your machine with Management Studio and server with SQL Server are in different domains, then you will need to run Management Studio under different account
runas /netonly /user:domain\username "c:\path\ssms.exe"
See Connect to SQL Servers in another domain using Windows Authentication

Set up SSL/Certificate for seperate server

I am new to SSL,here I have a question about how to set up SSL/certificate.
Our web site is hosted on server A(Windows server 2003 with IIS6), we also have a WCF web service that is used by the web site to get data from database, and this service is hosted on Server B(Windows server 2003 with IIS6).
So how to setup SSL/Certificate to make sure that the client server communication is encrypted? do I need to apply 2 certificate for each server?
I also have a very fundamental question, say my server's ip address is 192.168.0.5, it has multiple ports for different application, for example 8090, so which one is called domain? 192.168.0.5? or 192.168.0.5.8090?
Thanks
Since both server are running IIS 6, you can just export your certificate as PFX and install it on the other server.
Following sites might be helpful:
Export:
https://support.globalsign.com/customer/portal/articles/1231880-back-up-certificate---internet-information-services-iis-7
http://www.sslshopper.com/move-or-copy-an-ssl-certificate-from-a-windows-server-to-another-windows-server.html
Installation:
https://support.globalsign.com/customer/portal/articles/1290320-install-certificate---internet-information-services-iis-5-6
http://www.sslshopper.com/microsoft-iis-5-and-6-ssl-installation-instructions.html
Hope this helps!

How to find why application cannot connect to SQL Server 2008

Windows application is set to connect to the SQL Server using SQL Server authentication.
When I RDP to the box where the application resides and start the application, it successfully connects to the SQL Server.
When a customer runs the application on his desktop (he is on the network with the application box) and starts the application, connection fails (error. Server does not exist or access denied).
The customer can ping the SQL Server IP in his command prompt.
Yet, when I look at the error log on the SQL server I don't see the logs of his failure to connect.
What could be blocking his access to the SQL Server?
You may have to enable the TCP/IP protocol in SQL Server Configuration Manager - it's disabled by default.

SQL Server fails to connect to database on client

I have installed SQL Server 2008 R2 Express on a Windows Server 2008 R2 machine, and now when I want to open that database using SQL Server Management Studio on the client machine it fails to open.
But the database opens normally on the server.
The owner of the database is sa and on client I am logged in with windows authentication.
How to resolve this error??
the server priciple smtech/prabhu is not able to access the database
the user is of client under the server domain
I suggest making sure that the account you are trying to connect with actually has access.
Log onto the server, open up management studio, look in object explorer. There should be a Security folder icon in the treeview, Expand that and the Logins folder.
If the user you are trying to connect with isnt present you may need to add it.
Other than this instead of connecting with windows authentication maybe try connect with SQL Server Authentication as the SA user?
Is both Client and DB sever are on SAME domain ?? If not, then I think Windows Authentication will not work for you.
(As already suggested in above answer) create a SQL Login try with to connect DB from Client using that Login.
If both machine are on same domain and still you are not able to connect server, then few things you can check,
Can your client actually "see" this server over network ??
Most common reason is firewall. By default SQL Server communicates from port 1433 and 1434. Try to see if this MSDN link helps
Make sure that your SQL Server instance is configured to communicate using TCP/IP. This can be configured from SQL Server Configuration Manager.

Create Windows Desktop widget which connects to SQL Server

I want to create a desktop widget for Windows 7.
My requirements are below
I can provide SQL Server login credentials
It should connect to SQL Server
List out all the jobs in the server
Can anyone guide me on how to do this and where to start from?
Perhaps create a middle layer, that returns XML/JSON/HTML/..., that your widget can call through HTTP?
SQL Server 2005 supported native XML web services using SOAP/HTTP endpoints.
It's been deprecated in sql server 2008.
Your best bet would be to create a small HTTP server that acts as a broker between your SQL Server and desktop widgets.
You can find C# example code for HTTP server on Google.
http://www.google.is/search?hl=is&q=c%23+simple+http+server
Then let your widget just call the HTTP server for the information you want to display.
PS: Make your HTTP server log on and talk to the SQL Server, don't send database credentials (or ay other for that matter) over HTTP.