RSS

Monthly Archives: December 2011

How to fix Copy/Paste for Remote Desktop Sessions

Steps to enable copy/paste on remote server:

1. Go to task manager

2. Kill rdpclip.exe process.

3. Go to services by typing “services.msc” in command prompt window.

4. Find rdpclip.exe service and start it.

That is it. Happy programming.

 
1 Comment

Posted by on December 19, 2011 in MISC

 

Tags: , , , , ,

Configuring ASP session state on SQL server

Following are the steps to create ASPState Database using command line:

  1. Open a command prompt (window+R) and locate the following path: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
  2. Select Any one option from the following
  • A default ASPState database and SQL security

Type following line in command prompt. Replace “servername”, “username” and “password” with your respective credentials and press enter.

aspnet_regsql -S serverName -U UserName -P Password -ssadd -sstype p

 Web.Config Entry:

<sessionstate mode=”SQLServer” timeout=”20″ allowcustomsqldatabase=”true” sqlconnectionstring=”Data Source=Server;User ID=UserID;Password=Password;” cookieless=”false”>

  • A default ASPState database and windows security

Type following line in command prompt. Replace “servername”  with your servername and press enter.

aspnet_regsql -S serverName -E -ssadd -sstype p 

Web.Config Entry:

<sessionstate mode=”SQLServer” timeout=”20″ allowcustomsqldatabase=”true” sqlconnectionstring=”Data Source=Server;Integrated-Security=SSPI;” cookieless=”false”>

  • A custom database and SQL security

Type following line in command prompt. Replace “tablename”, “servername”, “username” and “password” with your respective credentials and press enter.

aspnet_regsql -d TableName -S serverName -U UserName -P Password  – ssadd -sstype c

Web.Config Entry:

<sessionstate mode=”SQLServer” timeout=”20″ allowcustomsqldatabase=”true”  sqlconnectionstring=”Data Source=Server;Initial Catalog=tablename; User ID=UserID;Password=Password;” cookieless=”false”>

Explanation of options:

  • t – Stores session data in the SQL Server tempdb database. This is the default. If you store session data in the tempdb database, the session data is lost if SQL Server is restarted.
  • p – Stores session data in the ASPState database instead of in the tempdb database.
  • c – Stores session data in a custom database. If you specify the c option, you must also include the name of the custom database using the -d option.

Happy Programming!!!

 
2 Comments

Posted by on December 6, 2011 in SQL SERVER

 

Tags: , , , ,