Monday, 31 October 2011

SharePoint 2010 : Make Access by Anonymous Users

SP2010 Tips – Turn on Anonymous Access

Ok, its not really a branding tip, but I’m on a roll here. In SharePoint 2010 if you want to setup your site to allow anonymous visitors, the process is much like it is in SharePoint 2007 except that the ribbon is now part of of the process. While I have really gotten used to the ribbon, this option I find particularly confusing. Just like in SharePoint 2007 the process begins in Central Administration, either you set the web application to Allow Anonymous access in the initial web application creation screen OR you need to set it afterward. If you are going to set it after, click on Manage Web Applications and select a web application from the list and take a look at the ribbon:
image
You might be inclined to click Anonymous Policy as I was initially but this does NOT allow you to turn on Anonymous access. Instead click Authentication Providers:
image
From this menu you select an Authentication Provider:
image
The from the next menu you can check Enable anonymous access:
image
After you click save, the web application will allow Anonymous access to be set, but you have to set this from the actual web application. So now, navigate to the top level site collection for the web application and click Site Actions > Site Settings > Site Permissions. From that menu you can click Anonymous Access:
image
From there select Entire Web Site and click OK:
image
That’s all you have to do, now the site will be available for browsing by anyone. Really only the first step is confusing compared to SharePoint 2007.

Sunday, 30 October 2011

DB2 : Select Current Year Records

Example:

SELECT Count(EL.SCREEN_MODULE_NAME) as ESH_NOOFHITS_CY,AT.DATE_TIME as ESH_TIMESTAMP_CY
FROM AUDT.TBL_AUDIT_TRAIL_SYSTEM AT ,ESERVICES_LIST EL
WHERE
RTRIM(AT.SCREEN_MODULE_NAME) LIKE  '%'  CONCAT RTRIM( EL.SCREEN_MODULE_NAME) CONCAT '%'  AND
Year(CURRENT TIMESTAMP)=Year(DATE_TIME)
GROUP BY AT.DATE_TIME
ORDER BY DATE(AT.DATE_TIME) ;

DB2 : Select Current Month Records

Example:

SELECT Count(EL.SCREEN_MODULE_NAME) as ESH_NOOFHITS_CM,AT.DATE_TIME as ESH_TIMESTAMP_CM
FROM AUDT.TBL_AUDIT_TRAIL_SYSTEM AT ,ESERVICES_LIST EL
WHERE
RTRIM(AT.SCREEN_MODULE_NAME) LIKE  '%'  CONCAT RTRIM( EL.SCREEN_MODULE_NAME) CONCAT '%'  AND
days(AT.DATE_TIME) between days(CURRENT TIMESTAMP)-34 AND days(CURRENT TIMESTAMP) AND Year(CURRENT TIMESTAMP)=Year(AT.DATE_TIME)
GROUP BY AT.DATE_TIME
ORDER BY DATE(AT.DATE_TIME) ;

DB2 : Select Last 7 days

Example:
SELECT Count(EL.SCREEN_MODULE_NAME) as ESH_NOOFHITS_WEEK,AT.DATE_TIME as ESH_TIMESTAMP_WEEK
FROM AUDT.TBL_AUDIT_TRAIL_SYSTEM AT ,ESERVICES_LIST EL
WHERE
RTRIM(AT.SCREEN_MODULE_NAME) LIKE  '%'  CONCAT RTRIM( EL.SCREEN_MODULE_NAME) CONCAT '%'  AND
YEAR(AT.DATE_TIME)=YEAR(CURRENT TIMESTAMP) AND
days(AT.DATE_TIME) between days(CURRENT TIMESTAMP)-6 AND days(CURRENT TIMESTAMP)
GROUP BY AT.DATE_TIME
ORDER BY DATE(AT.DATE_TIME) ;

Wednesday, 26 October 2011

SharePoint 2010 : exception occurred when trying to issue security token

How to deal with SharePoint 2010 exception "An exception occurred when trying to issue security token: The server was unable to process the request due to an internal error"

Scenario:

You receive the below exception when you try to logon to a site that has been configured to use Claims Based Authentication with a custom membership provider using FBA credentials:

Event ID from Event Log  - 8306

An exception occurred when trying to issue security token: The server was unable to process the request due to an internal error.  For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs..

Explanation:

This error started to appear in our QA environment which does not have Visual Studio installed. I have tried starting the service "Claims to Windows Token Service" but that did not help either.

I have made sure that all configuration changes required for FBA have been made properly in the below web.config files:

  • Web Applications
  • CA Web Aplication
  • \14\WebServices\SecurityToken
This post can get you started with building a custom membership provider and making changes to the required configuration files.

Error
Resolution:
To view more information about the actual error that is preventing the secure token service from being able to issue security token, I added the service debug in the web.config for the web service, under \14\WebServices\SecurityToken:
<serviceDebug includeExceptionDetailInFaults="True" httpHelpPageEnabled="True"/>
After adding the above to SecurityToken's web.config, the event log reported the below:
ServiceDebug

An exception occurred when trying to issue security token: The configuration section for Logging cannot be found in the configuration source..

I then realized that it is Microsoft.Practices.EnterpriseLibrary.Logging from my custom membership code that is causing the issues and not FBA configuration as I originally thought.

I then went ahead and added the required configuration for Microsoft.Practices.EnterpriseLibrary.Logging
Everything after that worked as desired. So I strongly advice everyone not to panic and take such drastic steps as re-installing SharePoint 2010 etc.. When I googled for this error, many people suggested to reinstall SharePoint 2010, change server names, etc.. Remember that these things happen for a reason. It just requires some patience to figure out the exact problem.

Tuesday, 25 October 2011

SCOM 2007 R2 - Operations Console will not open

Operations Console will not open – SDK service has not yet initialized

Answer:

Restart the blow services
  • SNMP Trap
  • System Center Data Access
  • System Center Management
  • Remote Access Auto Connection Manager
  • Remote Access Connection Manager
  • Remote Desktop Services
  • Remote Desktop Configuration

Saturday, 22 October 2011

Setting your Browser Options for Automatic Login

This page tells you how to set the options in your web browser (Internet Explorer or Firefox) to enable automatic login to Confluence. This will make it much more pleasant to use the Confluence SharePoint Connector.
What happens if you do not configure your browser as described below? You will keep getting the standard browser login popup each time you access Confluence. The popup looks like this:
Screenshot: Login dialogue from Internet Explorer

Setting up Internet Explorer

Set your options as follows for IE 6, 7 and 8.
  1. Ensure that your SharePoint site(s) and Confluence site are included in the list of 'Local Intranet' sites.
    • Open Internet Explorer's 'Tools' menu and select 'Internet Options'.
    • Click the 'Security' tab.
    • Select the 'Local intranet' zone.
    • Click 'Sites'.
      Screenshot: Selecting Internet Explorer options

    • Click 'Advanced'.
    • Check the list of 'Websites' displayed.
      Screenshot: Configuring local intranet settings

    • If not already present, enter the web address (URL) of your SharePoint site(s) and your Confluence site into the textbox titled 'Add this website to the zone' and click 'Add' to add each address.
    • Click 'Close' to close the window showing the list of websites.
    • Click 'OK'.
  2. Set automatic login in the intranet zone. If you are currently logged in with an Active Directory account, you will be automatically logged into SharePoint and Confluence.
    • On the 'Security' tab, make sure the 'Local intranet' zone is still selected and click 'Custom level'.
      Screenshot: Selecting custom intranet settings

    • Scroll down to the 'User Authentication' section (near the bottom of the list) and select the 'Automatic logon only in Intranet Zone' option.
      Screenshot: Choosing automatic 'log on' settings

  3. Set the option to access data sources across domains. This will prevent a warning message from appearing when the browser attempts to log in to Confluence.
    Please check with your system administrator that this setting is acceptable for your environment
    Setting this option may increase the susceptibility of your browser to XSS (cross-site scripting) attacks within the local intranet zone. This should be fine if your intranet is accessible to trusted users only.
    • Scroll up to the 'Miscellaneous' section (about half way down) and select 'Enable' under to 'Access data sources across domains'.
      Screenshot: Enabling data source access across domains

    • Click 'OK'.
  4. Close all your Internet Explorer tabs and windows, and start Internet Explorer again, to ensure that the new settings take effect.

Wednesday, 19 October 2011

DB2 : Alter Column Datatype Resize

Syntax:

Alter table tablename Alter column columnname set DATA TYPE VARCHAR(10)

Example:

ALTER TABLE TBL_EMPLOYEE ALTER COLUMN EMP_NAME SET DATA TYPE VARCHAR(300)

Monday, 10 October 2011

QlikView : Auto Reload With Batch File & System Scheduler

Step : 1

Create .bat   file .

Put this below coding into .bat file

@echo off
REM #####################################################
REM #
REM # This script will run .qvw file mentioned below
REM #  to load relevant .qvd automatically
REM #
REM #####################################################

 "C:\Program Files\QlikView\Qv.exe" /r "E:\QlikView\Actual Stocks V2.qvw"

REM #####################################################
REM #
REM # End
REM #
REM #####################################################

Step:2

Schedule this batch file from your system

Sunday, 9 October 2011

QlikView : Add Calculation Expression in Chart

1. We can use this expression any ware.

2.You can rectify this "Error in calculated dimension" problem.

 Example : 1
=if(len(GetCurrentSelections(PH_Month))=0 AND len(GetCurrentSelections(PH_Year))=0,PH_Date1,PH_Date)

Example : 2
=if(len(GetCurrentSelections(PH_Month))=0 AND len(GetCurrentSelections(PH_Year))=0,num(SUM(PH_NoofHits2), '#,###,###,#00'),num(SUM(PH_NoofHits), '#,###,###,#00'))

Saturday, 8 October 2011

QlikView : Animation - Text Scrolling

Left Scrolling
=left('Ministry of Interior Portal Operations',mod(round((now()-now(2))*86400),len('Ministry of Interior Portal Operations')))

Right Scrolling

=right('Ministry of Interior Portal Operations',mod(round((now()-now(2))*86400),len('Ministry of Interior Portal Operations')))