Next step of programming

Just another WordPress.com weblog

Posts Tagged ‘NETWORK

SSL Part 1

without comments

One of the way to protect the data of the user visiting your website or accessing you application through network is by using SSL. SSL Also know as Secure Socket Layer. SSL was first developed by netscape. It was enhanced from version 1.0 to 3.0. Its latest version is known as TLS (Transport Layer Security) 1.2. for further details visit

http://en.wikipedia.org/wiki/Transport_Layer_Security

From the framework 2.0 it is also provided as the part of the libraries and with that we can develop our server or client application further on that. The class used for purpose is SslStream and it available in System.Net.Security namspace. For developing a server running on SSL we need a SSL certificate which contains the public and the private key. Sample for the server and the client application with complete information on the SslStream class is available in MSDN

http://msdn.microsoft.com/en-us/library/system.net.security.sslstream.aspx

In the 2 Part of this post i will try to put a sample application(server and client) working on the SSL

Written by A.Sethi

December 11, 2008 at 4:26 am

Listing SQL Server Instances running in network with details C#

without comments

To list the server running in the listbox or the grid we can use following code and give user a option to select the server to whom he wants to connect

using System;
using System.Data;
using System.Text;
using System.Windows.Forms;
using System.Data.Sql;

namespace ListSQLServer
{
public partial class serverListing : Form
{
public serverListing()
{
InitializeComponent();
}


private void listButton_Click(object sender, EventArgs e)
{
DataTable dtServer = SqlDataSourceEnumerator.Instance.GetDataSources();
serverDetailsGrid.DataSource = dtServer;
}
}
}

you will get the following result in the grid

List of servers on network

List of servers on network

Written by A.Sethi

September 10, 2008 at 2:23 pm

Check who all are connected to SQL Server

with 2 comments

To check who all are connected to sql server and what they are doing, is a very important requirement. It can be required when you want to perform some exclusive work on you database(s) or for some other work also. In order to check who all are there and connected to which database we can use following stored procedure.

–Check who all connected and doing what
exec sp_who
go

It will give you the following result 

 

Result of store procedure sp_who

Result of store procedure sp_who

Written by A.Sethi

September 8, 2008 at 7:04 am