Thursday, February 2, 2012

SSRS Scale Out Web Farm 401.1 - Unauthorized

Our topology:
Internal corporate network domain utilizing Integrated Windows Authentication between local workstations and the web and database servers. (domain similiar to: http://reports.ourdomain.com)

Machine #1: Windows 2003 Server w/SQL Server 2005 (SP2 and hotfixes applied) running SSRS.
Machine #2: Windows 2003 Server w/SSRS only. (pointing to the SQL DB on Machine #1)
Machine #3: Windows 2003 Server w/SSRS only. (pointing to the SQL DB on Machine #1)
Device #1: Arrowpoint load balancer for Machines #2 & #3 (w/sticky sessions).


We recently added 2 web servers and configured them to load balance the web requests to a seperate SQL Server machine. (the load balancing is done thru an Arrowpoint device not Microsoft NLB)

The installation of reporting services (on Machine #2 & #3) went smoothly and the configuration was a breeze. But we could not access the "http://reports.ourdomain.com/Reports" directory for reporting services on the 2 web server machines. We received the "401.1 - Unauthorized" http error.

Since we were using a domain name to access the report server we made sure to update the <URL> tag in the config files.

File location 1:
C:Program FilesMicrosoft SQL ServerMSSQL.2Reporting ServicesReportManagerRSWebApplication.config

<ReportServerUrl>http://reports.ourdomain.com/ReportServer</ReportServerUrl>



File location 2:
C:Program FilesMicrosoft SQL ServerMSSQL.2Reporting ServicesReportServer
sreportserver.config

<UrlRoot>http://reports.ourdomain.com/reportserver</UrlRoot>

We still received the error, so then we added a couple of entries to the HOSTS file on each web server:
File location -->
C:WINDOWSsystem32driversetcHOSTS

In order for the load balancers to "see" themselves from the domain reference we had to update the HOSTS file
on each web server to have the domain name "reports.ourdomain.com" point to the IP Address of the specific web server.
(we also added the IP of Machine #1 just to be safe):

MACHINE #2's HOSTS file:
127.0.0.1 localhost
10.10.0.1 Machine1
10.10.0.2 reports.ourdomain.com #IP of Machine2


MACHINE #3's HOSTS file:
127.0.0.1 localhost
10.10.0.1 Machine1
10.10.0.3 reports.ourdomain.com #IP of Machine3

Then the web servers were able to authenticate the users using IWA and NTLM
and we could access the report servers normally. Even the the scheduled reports
were being load balanced and emailed from the web servers which we didn't
expect to happen. (pretty cool!)

Wednesday, January 25, 2012

PowerPivot: Could not load type ‘Microsoft.AnalysisServices.SharePoint.Integration.ReportGalleryView’


I have got this issue when i create PowerPivot library in my New Site collection.
Site_ReportGalleryView_LoadFailure
The error occurs when you try to select a Document Library of type PowerPivot Gallery (sometimes referred to as Report Gallery). After installing Power Pivot for SharePoint, all new site collections you create have the option to create a new document library of this type and if you use the PowerPivot Site template when creating the site collection, we automatically add a library of this type (that is the main thing we do in this template). The ability to add this type of library in all new site collections is there because we defined the library in a feature which is subsequently stapled to all sites. This means it is automatically activated on all site collections. The problem is that the page which is loaded when you click on the library as its default view uses an ASP.Net control whose code behind is found in a dll which is not being found. So when does this happen. Every case I have seen so far, this occurs when the user creates a new Web Application and does not deploy our WebApp solution to the new Web Application. Because of how we reference the classes for our pages, we need to have the associated assembly in the <vdir>\bin directory. This assembly is Microsoft.AnalysisServices.SharePoint.Integration.dll. The dll is “pushed” to the web applications on every WFE in the farm via the SharePoint solution infrastructure.

Ignoring any of the questions around “how should we have done this to avoid this error” .. to fix this situation, you simply need to deploy our web app solution to the Web Application you just created. To do this, go first to the System Settings page in Central Admin
CentralAdmin_SystemSettings
Under Farm Management, select Manage farm solutions.
CentralAdmin_ManageFarmSolutions
Click on the powerpivotwebapp.wsp solution to see its properties
CentralAdmin_SolutionProperties
On the properties page, you will see the “Deployed To” list and notice that your new web application is not on this list. Select the “Deploy Solution” link at the top of this page
CentralAdmin_DeploySolution
You can now chose to deploy our solution to the new Web Application you have created (and you can chose to do it “Now”).

Happy SharePointing.

PowerPivot The referenced file is not allowed on this page.

After installing PowerPivot for SharePoint 2010 for the first time, I added a PowerPivot Gallery to one of my existing sites and I was presented with the following error message:
“The referenced file ‘/_layouts/PowerPivot/ReportGalleryView.ascx’ is not allowed on this page.”
PowerPivot Error

After doing some research. For whatever reason, Microsoft missed a step for the feature activation of the PowerPivot controls that adds the controls to the Safe Controls in the Web.Config file of your web application. You have to do this manually. For each Web.Config file on each server for each web application, you have to add the following Safe Control:

<SafeControl Src="~/_layouts/powerpivot/*" IncludeSubFolders="True" Safe="True" AllowRemoteDesigner="True" SafeAgainstScript="True" />

After adding that to your Safe Controls in each web.config, do an IISRESET and you are all set.

Wednesday, January 11, 2012

SharePoint redirect for site collections

SharePoint redirect for site collection is possible with IIS virtual site creation. This is not possible with AAM Configuration.

If you want users to use http://intranet.domain.com/ and have it forwarded to http://intranet.domain.com/sites/portal, there are several ways you can do it.

One easy way is to use IIS directly and not involve Sharepoint at all.

Create a new virtual server in IIS Manager (New Web Site) and give it a descriptive name like "Sharepoint Redirect".--> choose the default settings when running the wizard and select a local directory (any path is fine). -> after the virtual server is created, edit the properties, open the "Home Directory" tab and click "A redirection to a URL", then type your Sharepoint URL in the "Redirect to:" box.

http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=48

Happy SharePointing.

Configuring Kerberos Authentication in SharePoint 2010

Wednesday, December 21, 2011

IE & Sharepoint 2010 UserProfile Cache Issue

When you using Windows Authentication (NTLM + AD) with your sharepoint site you may want to enter credential after you sign out from your site.But it is not easy and somehow imposible when using authentication NTLM and IE .Beacuse after you sign out and try to login again ,automatic login proccess logs you in immediately.

I can explain you two alternative way two prevent automatic log on.
First solution which is my suggested way. Dont use windows authentication . Use Claim Based Authentication (CBA)+ (Forms Based Authentication) FBA with Active Directory (AD) membership.

http://blogs.msdn.com/b/sridhara/archive/2010/01/07/setting-up-fba-claims-in-sharepoint-2010-with-active-directory-membership-provider.aspx
And Second way:
1) Upload jquery 1.4.1.1.js file in one of your library and copy the path.
Edit your v4.master and add fallowing js codes. (Using JQuery)

<script type="text/javascript" src="<<Path of the jquery library >>"></script>
<script type="text/javascript" >
$(document).ready(function(){$("#zz15_ID_Logout").attr("onMenuClick","STSNavigate2(event,'/SitePages/logout.aspx');");});
</script>
 
2) create a new “logout.aspx” page which masterpage is v4.master using Sharepoint Designer

3) add the fallowing code to your new sign out page
<script type="text/javascript">
function _spBodyOnLoad()
{
try
{
   /* Note : this command is support with only IE  */
  document.execCommand("ClearAuthenticationCache",false);
}
  catch (e) { }
  window.location='/_layouts/signout.aspx'; 
}
</script>
4) For testing choose a different machine than sharepoint server and configure your browser Tools->Internet Options->Security->Local Intranet
Click Custom Level and find Logon and change it to “Prompt for user name and password”
And be sure your site not added to trusted zone sites.


Login your site and type your browser’s addres bar
http://[SharepointSiteURL:port]/SitePages/logout.aspx and press enter
Try again to login and see asking your credentials.
when your sharepoint site url does not contain dot “.” that IE suppose that its a Local Intranet site. Thats why we changes the Local Intranet Zone settings to “Prompt for user name and password”

Monday, December 12, 2011

SharePoint Sites Keeps Asking Users to Login

Goto
Computer Configuration | Policies | Windows Settings | Security Settings | Local Policies | Security Options: Network access: Do not allow storage of credentials or .NET Passports for network authentication - set it to Disabled.
As explained in GMPC:
Network access: Do not allow storage of credentials or .NET Passports for network authentication

This security setting determines whether Stored User Names and Passwords saves passwords, credentials, or .NET Passports for later use when it gains domain authentication.

If it is enabled, this setting prevents the Stored User Names and Passwords from storing passwords and credentials.

Note: When configuring this security setting, changes will not take effect until you restart Windows.
For more information about Stored User Names and Passwords, see Stored User Names and Passwords.

Default: Disabled.
Equivalent registry hack: HKLM\System\CurrentControlSet\Control\Lsa\disablecreds
Value type: REG_DWORD
Value: 0 = allow domain credentials  to be stored