SQL CLR types for Report Viewer 2012 -Error







Install SQL CLR types & Report Viewer 2012 on Sql 2008 server


http://serverfault.com/questions/465722/install-sql-clr-types-report-viewer-2012-on-sql-2008-server

Troubleshooting: Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel...'

Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
This error can occur when there are multiple versions of the .NET Framework on the computer that is running IIS, and IIS was installed after .NET Framework 4.0 or before the Service Model in Windows Communication Foundation was registered.

For Windows 7 and Windows Server 2008, use the ASP.NET IIS Registration Tool (aspnet_regiis.exe,) to register the correct version of ASP.NET. For more information about the aspnet_regiis.exe, see ASP.NET IIS Registration Tool.

To register the correct version of ASP.NET

  1. On the computer that is running Microsoft Dynamics NAV Web Server components, open a command prompt as an administrator as follows:
    1. From the Start menu, choose All Programs, and then choose Accessories.
    2. Right-click Command Prompt, and then choose Run as administrator.
  2. At the command prompt, type the following command to change to the Microsoft.NET\Framework64\v4.0.30319 folder, and then press Enter.
    cd\Windows\Microsoft.NET\Framework64\v4.0.30319
    
  3. At the command prompt, type the following command, and then press Enter.
    aspnet_regiis.exe -iru
    

Font Size Decreases When Export to PDF in Crystal Report

If barcode size is not what you expect when export to PDF in Crystal Report, you need to look no further for solution.

To fix the bug, just follow steps below by adding 2 registry keys.

1. Select Start > Run. Type regedit and click OK.

2. For Crystal Reports 2008, Expand HKEY_CURRENT_USER\Software\Business Objects\Suite 12.0\Crystal Reports\Export.

For Crystal Reports 11.0, Expand HKEY_CURRENT_USER\Software\Business Objects\Crystal Reports.

For Crystal Reports 10.0, Expand HKEY_CURRENT_USER\SOFTWARE\Crystal Decisions\10.0\Crystal Reports\Export

For Crystal Reports 9,0, Expand HKEY_CURRENT_USER\software\crystal decisions\9.0\Crystal Reports\Export

3. Right-click the Export folder and select New > Key. This creates a new folder. Name the new folder PDF.

4. Right-click the PDF folder and select New > DWORD Value.

5. Name this 'ForceLargerFonts' with no quotes and note that it is case sensitive.

6. Double-click ForceLargerFonts and change the Value data to 1 and click OK.

7. Close all the registry folders and expand the following registry For Crystal Reports 2008, HKEY_LOCAL_MACHINE\Software\Business Objects\Suite 12.0\Crystal Reports.

For Crystal Reports 11.0, HKEY_LOCAL_MACHINE\Software\Business Objects\Suite 11.0.

For Crystal Reports 10.0, HKEY_LOCAL_MACHINE\SOFTWARE\Crystal Decisions\10.0\Crystal Reports

For Crystal Reports 9.0, HKEY_LOCAL_MACHINE\Software\Crystal Decisions\9.0\Crystal Reports

8. Right-click the Crystal Reports folder and select New > Key. Name this key Export.

9. Right-click the Export folder and select New > Key. This creates a new folder. Name this folder PDF.

10. Repeat steps 4 through 6.

11. Close the Registry Editor and restart Crystal Reports.


After adding these two registry keys, Crystal Reports won't have this font size problem any more.


However, if you want to generate barcode in Crystal Reports from IIS server, you need to modify permissions of these registry keys.

IIS security model prevents the application pool identity to read those registry entries by default.

Open Windows application Regedit and browse to

HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 12.0\Crystal Reports\Export\PDF

Right click the key and choose “Permissions” from context menu.

Add in default IIS user account. Usually it's IUSR_MachineName.

How to solve Microsoft.Jet.OLEDB.4.0 and Microsoft.ACE.OLEDB.12.0 problem IIS 7, IIS 8


https://www.microsoft.com/en-us/download/confirmation.aspx?id=23734

Excel data export to SQL database

'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine Error


Download and install the following link,


https://www.microsoft.com/en-us/download/details.aspx?id=23734

Public key authentication using Cygwin

Public key authentication using Cygwin


Overview

Enabling public key authentication allows us to seamlessly, without having to interactively enter credentials, perform the following tasks...

  • scp files from one host to another
  • Execute commands on remote host
  • Log on to remote host
The Cygwin sshd server runs as a Windows service under the Local SYSTEM account created with special privileges to run the service. For a Windows 2003 Server, sshd runs under local account, sshd_server. The sshd server authenticates user logins using a public/private key-pair.

Configure Cygwin sshd

In this example, we configure password-less public key authentication to a remote Worklight host. We will leverage a user named "WorklightAdmin"


  1. Install Cygwin.During installation, select the following packages...

    • Admin --> cygrunsrv
    • Net --> openssh
  2. After installation, edit...
      C:\cygwin\Cygwin.bat
    ...add the following line...

      set CYGWIN=binmode ntsec
    For example...

      @echo off

      C:
      chdir C:\cygwin\bin
      set CYGWIN=binmode ntsec
      bash --login -i
  3. Start a Cygwin terminal using "Run as Administrator"
  4. Verify Cygwin is installed property...
      cygrunsrv -h
    All Cygwin help options should display on the screen.
  5. From a bash shell, configure SSH...
      ssh-host-config
    You are prompted to answer the following questions:

      *** Query: Should privilege separation be used? : yes
      *** Query: New local account 'sshd'? : yes
      *** Query: Do you want to install sshd as a service?
      *** Query: : yes
      *** Query: Enter the value of CYGWIN for the deamon: [] binmode ntsec
      *** Query: Do you want to use a different name? (yes/no) yes/no
    At this point, for our example, we enter yes, and then plug in our WorklightAdmin user name and password...

      *** Query: Enter the new user name: WorklightAdmin
      *** Query: Reenter: WorklightAdmin
      *** Query: Create new privileged user account 'WorklightAdmin'? (yes/no) yes
      *** Query: Please enter the password:
      *** Query: Reenter:
    If the configuration is successful, you will see the following message:

      Host configuration finished. Have fun!
  6. If you ever want to change the login ID of the Cygwin sshd service afterwards...

    1. Open the Services panel
        Windows Start | Administrative Tools | Services
    2. Stop the sshd service.
        Cygwin sshd (right-click) | Properties | General | Stop
    3. Next, select the Log on tab. Under the Log on as section or prompt, clear the Local System account radio button, and select This account.
    4. Type .\WorklightAdmin as the ID and type the password for the account. Click Apply.
  7. Grant additional rights to the WorklightAdmin account. Ensure that the account has the required privileges in addition to membership to the Administrators group.


    1. From the Windows Start menu, click...
        Settings | Control Panel | Administrative Tools | Local Security Policy | Local Policies | User Rights Assignment
    2. Verify the WorklightAdmin account has the following four rights:
      • Adjust memory quotas for a process
      • Create a token object
      • Log on as a service
      • Replace a process level token
      If not, add WorklightAdmin as a user with the four rights.
  8. Close the Local Security Settings window.
  9. From a Cygwin console panel, change ownership of the following directories and files to WorklightAdmin:
    • chown WorklightAdmin /var/log/sshd.log
    • chown -R WorklightAdmin /var/empty
    • chown WorklightAdmin /etc/ssh*
  10. Restart the Cygwin sshd service.
      Cygwin sshd service | Properties | General | Start
    ...or...

      cygrunsrv -S sshd
  11. To achieve a password-less login from HostA --> remoteWLhost

    1. Login to HostA as user WorklightAdmin
    2. Copy contents of...
        $HOME/.ssh/id_rsa.pub
      If .ssh/id_rsa.pub does not exist, run..

        $ ssh-keygen -t rsa
        Generating public/private rsa key pair.
        Enter file in which to save the key (/usr/local/wasuser/.ssh/id_rsa):
        Enter passphrase (empty for no passphrase):
        Enter same passphrase again:
        Your identification has been saved in /usr/local/wasuser/.ssh/id_rsa
        Your public key has been saved in /usr/local/wasuser/.ssh/id_rsa.pub
        The key fingerprint is:
        05:db:12:51:9f:48:dc:43:cd:8f:22:b0:a7:47:2d:17 wasuser@hostname
      Leave passphrase blank.
    3. Log on to remote host (remoteWLhost) and paste the public key to...
        $HOME/.ssh/authorized_keys
      If the directory and/or file do not exist, create them.
    4. Set permissions...
        chmod go-w $HOME $HOME/.ssh
        chmod 600 $HOME/.ssh/authorized_keys
        chown `whoami` $HOME/.ssh/authorized_keys
  12. You can now run commands such on HostA such as...
      $ ssh -l WorklightAdmin remoteWLhost 'ls /cygdrive/c/path/to/Worklight/logs'
      console.log
      ffdc
      messages.log
      messages_13.02.28_13.37.37.0.log
      status.log

      $ ssh -l WorklightAdmin remoteWLhost 'tail /cygdrive/c/path/to/Worklight/logs/messages.log'
      [2/28/13 13:38:16:747 EST] jdbc.internal.DataSourceService A J2CA8001I
      [2/28/13 13:38:16:747 EST] jdbc.internal.DataSourceService A J2CA8001I
      [2/28/13 13:38:16:762 EST] jdbc.internal.DataSourceService A J2CA8001I
      [2/28/13 13:38:16:762 EST] jdbc.internal.JDBCDriverService A J2CA8001I
      [2/28/13 13:38:16:778 EST] tcpchannel.internal.TCPChannel I CWWKO0220I

      $ ssh WorklightAdmin@remoteWLhost
      Last login: Fri Mar 15 17:40:10 2013 from pavftrptwrb.sonebiz.com
      WorklightAdmin@remoteWLhost ~
      $

      scp WorklightAdmin@remoteWLhost:/cygdrive/c/path/to/Worklight/logs/messages.log messages.log.txt

Non-admin userID

If you try to connect to the Windows workstation using a non-administrator user ID, you might get error...

    XCIM0010E: An error occurred while connecting to the remote target ip_address.
    Cause: CTGRI0011E An error occurred when accessing the remote registry or service control manager.
...add the user account to the Administrators group...

  1. Go to...
      My Computer (right-click) | Manage | Local Users and Groups Users | user account | Member Of
  2. Add the Administrators group to the list of groups that this account belongs to.
  3. From the admin console, click...

Change public location in sshd_Config


# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
AuthorizedKeysFile /home/.ssh/authorized_keys

Database cannot attached because it is already existed in MVC 5

PM> sqllocaldb.exe stop v11.0
LocalDB instance "v11.0" stopped.

PM> sqllocaldb.exe delete v11.0
LocalDB instance "v11.0" deleted.