Monday, December 31, 2018

Amazon AWS, Create Access Key and Secret Key

AWS Amazon, Create Access Key and Secret Key

Creating, Disabling, and Deleting Access Keys for Your AWS Account Root User

  1. Use your AWS account email address and password to sign in to the AWS Management Console as the AWS account root user.
     
  2. Choose your account name in the navigation bar, and then choose My Security Credentials.
     
  3. If you see a warning about accessing the security credentials for your AWS account, choose Continue to Security Credentials
     
  4. Expand the Access keys (access key ID and secret access key) section.
     
  5. Choose Create New Access Key. If this feature is disabled, then you must delete one of the existing access keys before you can create a new key. For more information, see IAM Entity Object Limits in the IAM User Guide.
     
  6. A warning explains that you have only this one opportunity to view or download the secret access key. It cannot be retrieved later.
     
    1. Choose Show Access Key to copy the access key ID and secret key from your browser window and paste it somewhere else.
       
    2. Choose Download Key File to download the rootkey.csv file that contains the access key ID and the secret key. Save the file somewhere safe.
       



Thursday, December 27, 2018

IIS, Registering the ASP.Net with IIS server


  1. You need to start command prompt by typing cmd at the Run command and then execute the command prompt with Administrator rights by right clicking and choosing Run as administrator from the context menu.
     
  2. Then on the command prompt you need to navigate to the Directory that has the aspnet_regiis.exe file for that you need to type

      CD C:\Windows\Microsoft.NET\Framework64\v4.0.30319\
     
  3. Then you need to type the following command and hit enter to register ASP.Net with IIS

      aspnet_regiis -i
     

Tuesday, December 25, 2018

IIS, There was an error when trying to connect. Do you want to retype your credentials and try again?

IIS 8 error on windows server 2012 insufficient permission

There was an error when trying to connect. Do you want to retype your credentials and try again?

Details:

Filename: \?\C:Windows\system32\inetsrv\config\redirection.config Error: Cannot read configuration file due to insufficient permissions

screenshot:

Solution:

Steps to short out this issue:

  1. go to C:\Windows\Microsoft.Net\Framework64\v2.0.50727\CONFIG\machine.config
  2. here you got the redirection tag like the below

    <configurationredirection enabled="true" password="[enc:IISCngProvider:X0ObCWwZ4+PrTHiFVPtzFeCcL8u5P6KUOYfo1/0QrgZWATA5pKWqHvD8nL2crNJKyyqr4z/rBdLPjdRcaLxAMMj4l+lvp5EXXKSXueolvyGa34F4QZfbBVCM6oVNcq3M368TOTVjJv4POVFQWvu0MDVlGgReglXB+Lw5BRI4Htw=:enc]" path="C:\Windows\System32\inetsrv\config\import\" username="Administrator"> </configurationredirection"></li">

    you need to change this to

    <configurationRedirection />

  3. This will resolve the issue.
if you have missed your configuration in IIS then please follow the following steps:
  1. Open the IIS server and open the shared configuration, please check the below screenshots:
     

     
  2. please check the "Enable Shared Configuration" and select the path specified in the your configurationredirection (please check with yelow backgound)

    <configurationredirection enabled="true" password="[enc:IISCngProvider:X0ObCWwZ4+PrTHiFVPtzFeCcL8u5P6KUOYfo1/0QrgZWATA5pKWqHvD8nL2crNJKyyqr4z/rBdLPjdRcaLxAMMj4l+lvp5EXXKSXueolvyGa34F4QZfbBVCM6oVNcq3M368TOTVjJv4POVFQWvu0MDVlGgReglXB+Lw5BRI4Htw=:enc]" path="C:\Windows\System32\inetsrv\config\import\" username="Administrator"> </configurationredirection"></li"> 
  3. Then go to the machine.config file and revert the configurationredirection to previous setup that is

    <configurationredirection enabled="true" password="[enc:IISCngProvider:X0ObCWwZ4+PrTHiFVPtzFeCcL8u5P6KUOYfo1/0QrgZWATA5pKWqHvD8nL2crNJKyyqr4z/rBdLPjdRcaLxAMMj4l+lvp5EXXKSXueolvyGa34F4QZfbBVCM6oVNcq3M368TOTVjJv4POVFQWvu0MDVlGgReglXB+Lw5BRI4Htw=:enc]" path="C:\Windows\System32\inetsrv\config\import\" username="Administrator"> </configurationredirection"></li"> 
  4. Then go to Shared configuration and export the configuration 
  5. after this again change the machine.config configurationredirection  tag to

    <configurationRedirection />
  6. Now again import the Configuration from the Shared configuration from the Shared configuration in IIS.
This will also fix the IIS settings.

Tortoise SVN move SVN Repository To Another Server

How to take Backup and Restore of Tortoise SVN on window?

Back SVN
  1. Go to Run with Administrator privilege and then type cmd and open command prompt
  2. Run the following command

    svnadmin dump c:\Repositories\RepositoryName > c:\Repositories\svnbackup.dump

    Here
    1. c:\Repositories\RepositoryName is the source path of the repository
    2. c:\Repositories\ is the destination where the dump will create
    3. svnbackup.dump name of dump file

Restore SVN
  1. Go to Run with Administrator privilege and then type cmd and open command prompt
  2. Run the following command

    svnadmin load c:\Repositories < c:\Repositories\svnbackup.dump

    Here
    1. c:\Repositories is the destination path of the repository
    2. c:\Repositories\svnbackup.dump name of dump file that will be loaded

Saturday, December 15, 2018

C# - Copy DataTable from one DataSet to another

When we trying to add a DataTable (that is inside of a different DataSet) to new DataSet ds. If I add it directly, we will get the following error:

                   DataTable already belongs to another DataSet.

DataTable.Copy

use DataTable.Copy to create a copy of your data table; then insert the copy into the target DataSet:

dataSetX.Tables.Add( dataTableFromDataSetY.Table[0].Copy() );

DataSet.Merge

You could also use DataSet.Merge for this:

dataSetX.Merge(dataTableFromDataSetY); Note, however, that if you are going to use this method, you might want to make sure that your target DataSet doesn't already contain a table with the same name:

If the target DataSet doesn't contain a table by the same name, a fresh copy of the table is created inside the data set;

If a table by the same name is already in the target data set, then it will get merged with the one passed to Merge, and you end up with a mix of the two.