Hi
In IE 8 we used to have a load bar in the browser . But in IE 9 when the page is loading a circle keeps on moving in the address bar-tab area.
I have a question now for my SharePoint site.
after the circle in the address bar – tab has stopped rotating and when the page actually comes to the screen , there is a difference of 7 seconds!!!!!
If you have concrete explanation for this or something like a wild guess please reply down.
P.S. 1 The issue is with latest version of IE 9 also downloaded today
P.S.2 One of the comment I got offline:
http://support.microsoft.com/kb/2398082
This issue can also occur if Internet Explorer 9 is running in Software Rendering mode.
By default, Internet Explorer 9 uses GPU Rendering mode. However, some outdated video cards and video drivers do not support GPU hardware acceleration. If Internet Explorer 9 determines that your current video card or video driver does not support GPU hardware acceleration, Internet Explorer 9 uses Software Rendering mode.
To determine whether Internet Explorer 9 is using Software Rendering mode, follow these steps:
Start Internet Explorer 9.
Click Internet Options on the Tools menu.
On the Advanced tab, locate the Accelerated graphics section.
Verify that the Use software rendering instead of GPU rendering check box is selected.
If this option is selected, Internet Explorer 9 is running in Software Rendering mode. If the option is greyed out, your current video card or video driver does not support GPU hardware acceleration.
Reply 1 http://social.technet.microsoft.com/profile/smidha/?ws=usercard-mini
I've experienced the same in Mozilla as well.
For IE9, also checked IE Options-> advanced -> Accelerated graphics section -> Use software rendering instead of GPU rendering check box is selected.
But no luck. A quick solution will be helpful.
Friday, April 15, 2011
Tuesday, February 22, 2011
User's Role Specific Theme - SharePoint 2010
e are digging out the possibility to give user's role specific themes in SharePoint 2010.
We are OK with going for custom coding for this.
Do you have any clues how to achieve this?
so based on:
http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010general/thread/bc5c26e8-4a84-4120-9f44-ffb83db73836
http://efreedom.com/Question/1-2640711/Dynamically-Adding-CSS-File-ASPNET-Server-Control
http://stackoverflow.com/questions/2153310/user-specific-theme-in-sharepoint
http://efreedom.com/Question/1-2640711/Dynamically-Adding-CSS-File-ASPNET-Server-Control
we are going to override css in our custom control referred in the master page
Reply 1 http://social.technet.microsoft.com/profile/ishaan%20puniani/?ws=usercard-mini
take a look at :
http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010general/thread/bc5c26e8-4a84-4120-9f44-ffb83db73836
to make it light weight you can write only those classes that modifies the Look nd feel of the site in the CSS .
We are OK with going for custom coding for this.
Do you have any clues how to achieve this?
so based on:
http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010general/thread/bc5c26e8-4a84-4120-9f44-ffb83db73836
http://efreedom.com/Question/1-2640711/Dynamically-Adding-CSS-File-ASPNET-Server-Control
http://stackoverflow.com/questions/2153310/user-specific-theme-in-sharepoint
http://efreedom.com/Question/1-2640711/Dynamically-Adding-CSS-File-ASPNET-Server-Control
we are going to override css in our custom control referred in the master page
Reply 1 http://social.technet.microsoft.com/profile/ishaan%20puniani/?ws=usercard-mini
take a look at :
http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010general/thread/bc5c26e8-4a84-4120-9f44-ffb83db73836
to make it light weight you can write only those classes that modifies the Look nd feel of the site in the CSS .
Thursday, February 17, 2011
List Level backups for multiple sub sites -Poweshell
In SharePoint projects, there are scenarios, where a number of sub sites are created using a same template (now WSP).
We come across requirements where these templates require updation in due course of time. And hence the sub sites already created may require an update. But it is not feasible to go to each and every sub site created and make the changes.
So best way could be take backup of variable components ( Lists) and then recreate all the sub sites and then restore back the lists to the newly created sub sites.
The below mentioned PowerShell script can be used to take backup export the content from a specific named list in a shared folder structure, where each sub site will have a specific folder for backup in format cmp :
$mainBackuppath="\\abc2010\exportimport"
$File="export.txt"
Get-SPSite -Identity $spsite | Get-SPWeb -limit all| ForEach-Object {
if(($_.URL -eq $spsite+"/xyz") -or ($_.URL -eq $spsite+"") -or ($_.URL -eq $spsite+"/lmn") )
{
write-host -f Green "Skipping " $_.URL
"Skipping " + $_.URL | Out-File $File -append
}
else
{
write-host -f Green "processing for " $_.URL
"processing for " + $_.URL | Out-File $File -append
$currentSubSiteTitlewithoutspace= ""
$currentSubSiteTitlewithoutspace=$_.Title.Replace(" ","")
write-host -f Blue "Creating Directory: "$mainBackuppath"\"$currentSubSiteTitlewithoutspace
"Creating Directory: "+$mainBackuppath+"\"+$currentSubSiteTitlewithoutspace | Out-File $File -append
$error.clear()
[IO.Directory]::CreateDirectory($mainBackuppath+"\"+$currentSubSiteTitlewithoutspace)
if($error.count -gt 0){$error | out-file $File -append}
$filesystemPath=""
$filesystemPath = $mainBackuppath+"\"+$currentSubSiteTitlewithoutspace
if(Test-Path $filesystemPath)
{
$filesystemPath =$mainBackuppath+"\"+$currentSubSiteTitlewithoutspace+"\"+$currentSubSiteTitlewithoutspace+".cmp"
$DocLibPath=""
$DocLibPath= "/"+$_.Title+"/Shared Documents"
write-host -f Yellow "Taking Backup for "$DocLibPath " at location " $filesystemPath "...."
"Taking Backup for "+$DocLibPath +" at location "+ $filesystemPath +"...."| Out-File $File -append
$error.clear()
export-spweb -identity $_.URL -path $filesystemPath -ItemUrl $DocLibPath -Force -IncludeUserSecurity -IncludeVersions All | Out-File $File -append
if($error.count -gt 0){$error | out-file $File -append}
write-host -f Yellow "Backup for "$DocLibPath " at location " $filesystemPath "Completed."
"Backup for "+$DocLibPath +" at location "+ $filesystemPath +"Completed."| Out-File $File -append
}
else
{
write-host -f Red $filesystemPath " does not exist."
$filesystemPath +" does not exist." | Out-File $File -append
}
write-host -f Green "End of " $_.URL"`n`n`n`n"
"End of "+ $_.URL+"`n`n`n`n"| Out-File $File -append
}
}
The below mentioned PowerShell script can be used to restore backup /exported content shared folder structure, where each sub site will have a specific folder for backup in format cmp, to the subsites created using new template :
$spsite= "http://abc:1104"
$mainBackuppath="\\abc2010\exportimport"
$File="export.txt"
Get-SPSite -Identity $spsite | Get-SPWeb -limit all| ForEach-Object {
if(($_.URL -eq $spsite+"/xyz") -or ($_.URL -eq $spsite+"") -or ($_.URL -eq $spsite+"/lmn") )
{
write-host -f Green "Skipping " $_.URL
"Skipping " + $_.URL | Out-File $File -append
}
else
{
write-host -f Green "processing for " $_.URL
"processing for " + $_.URL | Out-File $File -append
$currentSubSiteTitlewithoutspace= ""
$currentSubSiteTitlewithoutspace=$_.Title.Replace(" ","")
write-host -f Blue "Checking if directory exist for current web"
"Checking if directory exist for current web" | Out-File $File -append
$filesystemPath=""
$filesystemPath =$mainBackuppath+"\"+$currentSubSiteTitlewithoutspace+"\"+$currentSubSiteTitlewithoutspace+".cmp"
if(Test-Path $filesystemPath)
{
$DocLibPath=""
$DocLibPath= "/"+$_.Title+"/Shared Documents"
write-host -f Yellow "Restoring Backup at "$DocLibPath " from " $filesystemPath "...."
"Restoring Backup at "+$DocLibPath +" from " +$filesystemPath +"...." | Out-File $File -append
$error.clear()
Import-SPWeb -Identity $_.URL -Path $filesystemPath -IncludeUserSecurity -Force -UpdateVersions Overwrite | Out-File $File -append
if($error.count -gt 0){$error | out-file $File -append}
write-host -f Yellow "Backup for "$DocLibPath " at location " $filesystemPath "Completed."
"Backup for "+$DocLibPath +" at location " +$filesystemPath +"Completed." | Out-File $File -append
}
else
{
write-host -f Red $filesystemPath " does not exist."
$filesystemPath +" does not exist." | Out-File $File -append
}
write-host -f Green "End of " $_.URL"`n`n`n`n"
"End of " +$_.URL+"`n`n`n`n" | Out-File $File -append
}
}
___________________________________________________________________________________________________________________
description of commands being used:
1. Get-SPSite : creates object for the spsite as given by identity parameter.
2. Get-SPWeb -limit all gets all the spweb in the site collection
3. Out-File $File –append : put entry in a log file.
4. write-host -f Green "processing for " $_.URL : to write a text on screen
5. $error.clear() : clears the current error
6. [IO.Directory]::CreateDirectory() : used to create a folder on the shared path
7. if($error.count -gt 0){$error | out-file $File –append : if the error count is greater than 0, that is logged in the log file.
8. Test-Path $filesystemPath : verifies if the folder has been created
9. export-spweb -identity $_.URL -path $filesystemPath -ItemUrl $DocLibPath -Force -IncludeUserSecurity -IncludeVersions All | Out-File $File –append
: the heart of all commands, which is actually creating the cmp file
10. Import-SPWeb -Identity $_.URL -Path $filesystemPath -IncludeUserSecurity -Force -UpdateVersions Overwrite | Out-File $File –append
: the heart of all commands, which is actually restoring the cmp file.
We come across requirements where these templates require updation in due course of time. And hence the sub sites already created may require an update. But it is not feasible to go to each and every sub site created and make the changes.
So best way could be take backup of variable components ( Lists) and then recreate all the sub sites and then restore back the lists to the newly created sub sites.
The below mentioned PowerShell script can be used to take backup export the content from a specific named list in a shared folder structure, where each sub site will have a specific folder for backup in format cmp :
$mainBackuppath="\\abc2010\exportimport"
$File="export.txt"
Get-SPSite -Identity $spsite | Get-SPWeb -limit all| ForEach-Object {
if(($_.URL -eq $spsite+"/xyz") -or ($_.URL -eq $spsite+"") -or ($_.URL -eq $spsite+"/lmn") )
{
write-host -f Green "Skipping " $_.URL
"Skipping " + $_.URL | Out-File $File -append
}
else
{
write-host -f Green "processing for " $_.URL
"processing for " + $_.URL | Out-File $File -append
$currentSubSiteTitlewithoutspace= ""
$currentSubSiteTitlewithoutspace=$_.Title.Replace(" ","")
write-host -f Blue "Creating Directory: "$mainBackuppath"\"$currentSubSiteTitlewithoutspace
"Creating Directory: "+$mainBackuppath+"\"+$currentSubSiteTitlewithoutspace | Out-File $File -append
$error.clear()
[IO.Directory]::CreateDirectory($mainBackuppath+"\"+$currentSubSiteTitlewithoutspace)
if($error.count -gt 0){$error | out-file $File -append}
$filesystemPath=""
$filesystemPath = $mainBackuppath+"\"+$currentSubSiteTitlewithoutspace
if(Test-Path $filesystemPath)
{
$filesystemPath =$mainBackuppath+"\"+$currentSubSiteTitlewithoutspace+"\"+$currentSubSiteTitlewithoutspace+".cmp"
$DocLibPath=""
$DocLibPath= "/"+$_.Title+"/Shared Documents"
write-host -f Yellow "Taking Backup for "$DocLibPath " at location " $filesystemPath "...."
"Taking Backup for "+$DocLibPath +" at location "+ $filesystemPath +"...."| Out-File $File -append
$error.clear()
export-spweb -identity $_.URL -path $filesystemPath -ItemUrl $DocLibPath -Force -IncludeUserSecurity -IncludeVersions All | Out-File $File -append
if($error.count -gt 0){$error | out-file $File -append}
write-host -f Yellow "Backup for "$DocLibPath " at location " $filesystemPath "Completed."
"Backup for "+$DocLibPath +" at location "+ $filesystemPath +"Completed."| Out-File $File -append
}
else
{
write-host -f Red $filesystemPath " does not exist."
$filesystemPath +" does not exist." | Out-File $File -append
}
write-host -f Green "End of " $_.URL"`n`n`n`n"
"End of "+ $_.URL+"`n`n`n`n"| Out-File $File -append
}
}
The below mentioned PowerShell script can be used to restore backup /exported content shared folder structure, where each sub site will have a specific folder for backup in format cmp, to the subsites created using new template :
$spsite= "http://abc:1104"
$mainBackuppath="\\abc2010\exportimport"
$File="export.txt"
Get-SPSite -Identity $spsite | Get-SPWeb -limit all| ForEach-Object {
if(($_.URL -eq $spsite+"/xyz") -or ($_.URL -eq $spsite+"") -or ($_.URL -eq $spsite+"/lmn") )
{
write-host -f Green "Skipping " $_.URL
"Skipping " + $_.URL | Out-File $File -append
}
else
{
write-host -f Green "processing for " $_.URL
"processing for " + $_.URL | Out-File $File -append
$currentSubSiteTitlewithoutspace= ""
$currentSubSiteTitlewithoutspace=$_.Title.Replace(" ","")
write-host -f Blue "Checking if directory exist for current web"
"Checking if directory exist for current web" | Out-File $File -append
$filesystemPath=""
$filesystemPath =$mainBackuppath+"\"+$currentSubSiteTitlewithoutspace+"\"+$currentSubSiteTitlewithoutspace+".cmp"
if(Test-Path $filesystemPath)
{
$DocLibPath=""
$DocLibPath= "/"+$_.Title+"/Shared Documents"
write-host -f Yellow "Restoring Backup at "$DocLibPath " from " $filesystemPath "...."
"Restoring Backup at "+$DocLibPath +" from " +$filesystemPath +"...." | Out-File $File -append
$error.clear()
Import-SPWeb -Identity $_.URL -Path $filesystemPath -IncludeUserSecurity -Force -UpdateVersions Overwrite | Out-File $File -append
if($error.count -gt 0){$error | out-file $File -append}
write-host -f Yellow "Backup for "$DocLibPath " at location " $filesystemPath "Completed."
"Backup for "+$DocLibPath +" at location " +$filesystemPath +"Completed." | Out-File $File -append
}
else
{
write-host -f Red $filesystemPath " does not exist."
$filesystemPath +" does not exist." | Out-File $File -append
}
write-host -f Green "End of " $_.URL"`n`n`n`n"
"End of " +$_.URL+"`n`n`n`n" | Out-File $File -append
}
}
___________________________________________________________________________________________________________________
description of commands being used:
1. Get-SPSite : creates object for the spsite as given by identity parameter.
2. Get-SPWeb -limit all gets all the spweb in the site collection
3. Out-File $File –append : put entry in a log file.
4. write-host -f Green "processing for " $_.URL : to write a text on screen
5. $error.clear() : clears the current error
6. [IO.Directory]::CreateDirectory() : used to create a folder on the shared path
7. if($error.count -gt 0){$error | out-file $File –append : if the error count is greater than 0, that is logged in the log file.
8. Test-Path $filesystemPath : verifies if the folder has been created
9. export-spweb -identity $_.URL -path $filesystemPath -ItemUrl $DocLibPath -Force -IncludeUserSecurity -IncludeVersions All | Out-File $File –append
: the heart of all commands, which is actually creating the cmp file
10. Import-SPWeb -Identity $_.URL -Path $filesystemPath -IncludeUserSecurity -Force -UpdateVersions Overwrite | Out-File $File –append
: the heart of all commands, which is actually restoring the cmp file.
Monday, November 15, 2010
Not able to login to Claims based auth. sweb apps in sharepoint 2010
Hi till yesterday I was able to login to claim based web apps in my sharepoint 2010 server. but today they are giving below mentioned error! even though classic mode auth web apps are running fine.
Nor it allow to activate /deactivate any fature to a site collection under claims based web app with same error in event log:
Please help.
error message in event viewer:
Log Name: Application
Source: Microsoft-SharePoint Products-SharePoint Foundation
Date: 10/8/2010 1:30:59 PM
Event ID: 8311
Task Category: Topology
Level: Error
Keywords:
User: SHAREPOINT2010\administrator
Computer: sharepoint2k8.sharepoint2010.com
Description:
An operation failed because the following certificate has validation errors:\n\nSubject Name: CN=SharePoint Security Token Service, OU=SharePoint, O=Microsoft, C=US\nIssuer Name: CN=SharePoint Root Authority, OU=SharePoint, O=Microsoft, C=US\nThumbprint: 85F230FF68A8107A14667844D6741A6C2199C60E\n\nErrors:\n\n UntrustedRoot: A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.
NotTimeValid: A required certificate is not within its validity period when verifying against the current system clock or the timestamp in the signed file.
RevocationStatusUnknown: The revocation function was unable to check revocation for the certificate.
OfflineRevocation: The revocation function was unable to check revocation because the revocation server was offline.
.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Microsoft-SharePoint Products-SharePoint Foundation" Guid="{6FB7E0CD-52E7-47DD-997A-241563931FC2}" />
<EventID>8311</EventID>
<Version>14</Version>
<Level>2</Level>
<Task>13</Task>
<Opcode>0</Opcode>
<Keywords>0x4000000000000000</Keywords>
<TimeCreated SystemTime="2010-10-08T08:00:59.446924300Z" />
<EventRecordID>524180</EventRecordID>
<Correlation ActivityID="{87C3E3A1-1134-43A6-A06E-150BA71C73C8}" />
<Execution ProcessID="6052" ThreadID="1540" />
<Channel>Application</Channel>
<Computer>sharepoint2k8.sharepoint2010.com</Computer>
<Security UserID="S-1-5-21-2138102958-2007814619-3387492156-500" />
</System>
<EventData>
<Data Name="string0">CN=SharePoint Security Token Service, OU=SharePoint, O=Microsoft, C=US</Data>
<Data Name="string1">CN=SharePoint Root Authority, OU=SharePoint, O=Microsoft, C=US</Data>
<Data Name="string2">85F230FF68A8107A14667844D6741A6C2199C60E</Data>
<Data Name="string3">UntrustedRoot: A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.
NotTimeValid: A required certificate is not within its validity period when verifying against the current system clock or the timestamp in the signed file.
RevocationStatusUnknown: The revocation function was unable to check revocation for the certificate.
OfflineRevocation: The revocation function was unable to check revocation because the revocation server was offline.
</Data>
</EventData>
</Event>
Reply1
Hi ,
Your certificate is no longer valid. Please visit below link for error details for certificate.
http://msdn.microsoft.com/en-us/library/system.security.cryptography.x509certificates.x509chainstatusflags.aspx
Please follow http://technet.microsoft.com/en-us/library/cc700843.aspx for troubleshooting
Pathik Rawal Blog: http://pathikhrawal.wordpress.com
Nor it allow to activate /deactivate any fature to a site collection under claims based web app with same error in event log:
Please help.
error message in event viewer:
Log Name: Application
Source: Microsoft-SharePoint Products-SharePoint Foundation
Date: 10/8/2010 1:30:59 PM
Event ID: 8311
Task Category: Topology
Level: Error
Keywords:
User: SHAREPOINT2010\administrator
Computer: sharepoint2k8.sharepoint2010.com
Description:
An operation failed because the following certificate has validation errors:\n\nSubject Name: CN=SharePoint Security Token Service, OU=SharePoint, O=Microsoft, C=US\nIssuer Name: CN=SharePoint Root Authority, OU=SharePoint, O=Microsoft, C=US\nThumbprint: 85F230FF68A8107A14667844D6741A6C2199C60E\n\nErrors:\n\n UntrustedRoot: A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.
NotTimeValid: A required certificate is not within its validity period when verifying against the current system clock or the timestamp in the signed file.
RevocationStatusUnknown: The revocation function was unable to check revocation for the certificate.
OfflineRevocation: The revocation function was unable to check revocation because the revocation server was offline.
.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Microsoft-SharePoint Products-SharePoint Foundation" Guid="{6FB7E0CD-52E7-47DD-997A-241563931FC2}" />
<EventID>8311</EventID>
<Version>14</Version>
<Level>2</Level>
<Task>13</Task>
<Opcode>0</Opcode>
<Keywords>0x4000000000000000</Keywords>
<TimeCreated SystemTime="2010-10-08T08:00:59.446924300Z" />
<EventRecordID>524180</EventRecordID>
<Correlation ActivityID="{87C3E3A1-1134-43A6-A06E-150BA71C73C8}" />
<Execution ProcessID="6052" ThreadID="1540" />
<Channel>Application</Channel>
<Computer>sharepoint2k8.sharepoint2010.com</Computer>
<Security UserID="S-1-5-21-2138102958-2007814619-3387492156-500" />
</System>
<EventData>
<Data Name="string0">CN=SharePoint Security Token Service, OU=SharePoint, O=Microsoft, C=US</Data>
<Data Name="string1">CN=SharePoint Root Authority, OU=SharePoint, O=Microsoft, C=US</Data>
<Data Name="string2">85F230FF68A8107A14667844D6741A6C2199C60E</Data>
<Data Name="string3">UntrustedRoot: A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.
NotTimeValid: A required certificate is not within its validity period when verifying against the current system clock or the timestamp in the signed file.
RevocationStatusUnknown: The revocation function was unable to check revocation for the certificate.
OfflineRevocation: The revocation function was unable to check revocation because the revocation server was offline.
</Data>
</EventData>
</Event>
Reply1
Hi ,
Your certificate is no longer valid. Please visit below link for error details for certificate.
http://msdn.microsoft.com/en-us/library/system.security.cryptography.x509certificates.x509chainstatusflags.aspx
Please follow http://technet.microsoft.com/en-us/library/cc700843.aspx for troubleshooting
Pathik Rawal Blog: http://pathikhrawal.wordpress.com
Thursday, October 21, 2010
custom actions on work flow suspended sharepoint 2010
Hi
I need few custom actions like sending emails and few logs update using enterprise library. What will be the best approach for this .
will SPWorkflowEventReceiver > WorkflowPostponed solve my pupose
if yes, is there any alternate solution possible?
Reply 1
Sending emails from the custom actions sounds like a custom application page to me.
SharePoint Solution Architect, Developer
I need few custom actions like sending emails and few logs update using enterprise library. What will be the best approach for this .
will SPWorkflowEventReceiver > WorkflowPostponed solve my pupose
if yes, is there any alternate solution possible?
Reply 1
Sending emails from the custom actions sounds like a custom application page to me.
SharePoint Solution Architect, Developer
Thursday, October 7, 2010
a primary AD group should not be added to a SharePoint Site Group.....
Hi
as per http://msdn.microsoft.com/en-us/library/bb975136%28office.12%29.aspx and the problem we are facing:
Primary group membership In Active Directory, each user has a primary group. When the LDAP Role provider is used with Active Directory, a user's primary group is not included in the list of roles for the user. By default, a user's primary group is the Domain Users group. As a result, the Domain Users group is not a good choice to add to a SharePoint group when you are provisioning permissions because unless the user's primary group is changed, no user is returned in the membership of that role. For more information, see the primaryGroupID attribute in User Security Attributes.
My requirement is:-
I have added user 'us1' in an ADGroup 'ADG1'. The ADGroup( via FBA ) is added to sharepoint site group "SiteGroup1" . The sharepoint site group "SiteGroup1" has 'view only' rights on a subsite in my Sharepoint portal - "Mysite1" .
Problem :
when user 'us1' tries to access my sub site "Mysite1" on my FBA portal,he is not authorized to access it .....
any clues how to get it working?
Reply 1
Hi,
Please grant SiteGroup1 ‘full control’ and try again.
If you get the same result, please check your FBA configuration settings.
Here is a useful article:
http://blogs.technet.com/b/speschka/archive/2009/11/05/configuring-forms-based-authentication-in-sharepoint-2010.aspx
Hope it is helpful!
Seven
Reply 1.1
Hi
its not about giving Full Control or view only.
suppose a user has rights on the site being part of an ad group, and this ad group is its primary group.
ad group is added to the sharepoint site group.
but as the link i had given, the user is not having rights as given by the sharepoint site group, since ladap does not retive this user under the given role, cause its through primary group as membership group in AD.
Reply 1.1.1
Hi,
From the link you given, the thing is that, only the domain users group will be unavailable to the SharePoint site since it is the default primary group. If you add this group to the SharePoint site, only the users who have changed the primary list will receive the role from this group in SharePoint site. For other primary groups you have set for some users, there is no this limitation.
If your need in your post is still not meted, please check your FBA configuration settings as I have mentioned.
Hope it is helpful!
Seven
Reply 1.1.1.1
Hey Seven you could replicate the exact scenario and verify what I meant here. I not pointing out specific Group who is Primary Group for all users by default.
Its like Primary AD Groups should not be used for providing rights. What I have understood till now . reason being if a user is member of a group and this group is also primary ad group for this user and if we add this primary group in a sharepoint site group, that's not done, user is still not having the intended rights!!!!
as per http://msdn.microsoft.com/en-us/library/bb975136%28office.12%29.aspx and the problem we are facing:
Primary group membership In Active Directory, each user has a primary group. When the LDAP Role provider is used with Active Directory, a user's primary group is not included in the list of roles for the user. By default, a user's primary group is the Domain Users group. As a result, the Domain Users group is not a good choice to add to a SharePoint group when you are provisioning permissions because unless the user's primary group is changed, no user is returned in the membership of that role. For more information, see the primaryGroupID attribute in User Security Attributes.
My requirement is:-
I have added user 'us1' in an ADGroup 'ADG1'. The ADGroup( via FBA ) is added to sharepoint site group "SiteGroup1" . The sharepoint site group "SiteGroup1" has 'view only' rights on a subsite in my Sharepoint portal - "Mysite1" .
Problem :
when user 'us1' tries to access my sub site "Mysite1" on my FBA portal,he is not authorized to access it .....
any clues how to get it working?
Reply 1
Hi,
Please grant SiteGroup1 ‘full control’ and try again.
If you get the same result, please check your FBA configuration settings.
Here is a useful article:
http://blogs.technet.com/b/speschka/archive/2009/11/05/configuring-forms-based-authentication-in-sharepoint-2010.aspx
Hope it is helpful!
Seven
Reply 1.1
Hi
its not about giving Full Control or view only.
suppose a user has rights on the site being part of an ad group, and this ad group is its primary group.
ad group is added to the sharepoint site group.
but as the link i had given, the user is not having rights as given by the sharepoint site group, since ladap does not retive this user under the given role, cause its through primary group as membership group in AD.
Reply 1.1.1
Hi,
From the link you given, the thing is that, only the domain users group will be unavailable to the SharePoint site since it is the default primary group. If you add this group to the SharePoint site, only the users who have changed the primary list will receive the role from this group in SharePoint site. For other primary groups you have set for some users, there is no this limitation.
If your need in your post is still not meted, please check your FBA configuration settings as I have mentioned.
Hope it is helpful!
Seven
Reply 1.1.1.1
Hey Seven you could replicate the exact scenario and verify what I meant here. I not pointing out specific Group who is Primary Group for all users by default.
Its like Primary AD Groups should not be used for providing rights. What I have understood till now . reason being if a user is member of a group and this group is also primary ad group for this user and if we add this primary group in a sharepoint site group, that's not done, user is still not having the intended rights!!!!
Monday, August 9, 2010
'Microsoft.SharePoint.IdentityModel.SPClaimsUtility' does not contain a definition for 'AuthenticateFormsUser'
Hi
I am trying to use SPClaimsUtility for au8thenticating my user as per http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.identitymodel.spclaimsutility.authenticateformsuser.aspx .
But I get error 'Microsoft.SharePoint.IdentityModel.SPClaimsUtility' does not contain a definition for 'AuthenticateFormsUser'
in my object browser for the 'Microsoft.SharePoint.IdentityModel.dll I am not able to find the def for this static function.
What could be the possible cause?
Cheers-hemant
we could not solve above problem but I used below mentioned code for FBA authentication finally:
Authenticate returns true or false according to user is authenticated or not .
private SecurityToken GetSecurityToken(string loginName,string psswrd)
{
return SPSecurityContext.SecurityTokenForFormsAuthentication(newUri(SPContext.Current.Site.Url),"memebershipprovidername","roleprovidername",loginName,psswrd);
}
private bool Authenticate(string loginName, string psswrd)
{
bool flag = false;
SecurityToken securityToken = null;
if (loginName==null && psswrd==null)
{
throw new ArgumentException("Please provide username and password");
}
using (new SPMonitoredScope("Retrieve security token and establish session."))
{
securityToken =
this.GetSecurityToken(loginName,psswrd);
if (securityToken == null)
{
flag =
false;
}
else
{
this.EstablishSessionWithToken(securityToken);
flag =
true;
}
}
return flag;
}
internal void EstablishSessionWithToken(SecurityToken securityToken)
{
if (securityToken == null)
{
throw new ArgumentNullException("securityToken");
}
Microsoft.SharePoint.IdentityModel.
SPFederationAuthenticationModule fam = this.Context.ApplicationInstance.Modules["FederatedAuthentication"] asMicrosoft.SharePoint.IdentityModel.SPFederationAuthenticationModule;
if (fam == null)
{
throw new ArgumentException(null, "FederationAuthenticationModule");
}
//Microsoft.SharePoint.Utilities
// .SecurityContext.RunAsProcess(delegate
//{
fam.SetPrincipalAndWriteSessionToken(securityToken,
true, SPSecurityTokenServiceManager.Local.UseSessionCookies);
//});
}
this function is not available in beta version of sharepoint 2010. in licensed version dll , the reference is there.
further the alternative code mentioned above has minor change wrt licensed version of new dll:
fam.SetPrincipalAndWriteSessionToken(securityToken);
instead of
fam.SetPrincipalAndWriteSessionToken(securityToken,
true, SPSecurityTokenServiceManager.Local.UseSessionCookies);
further we may like to have our own custom sign out:-
protected void lnkBtnSignOut_Click(object sender, EventArgs e)
{
HttpContext httpCntxt = HttpContext.Current;
//Signing out
FormsAuthentication.SignOut();
//Request.Cookies.Clear();
// nullifies current context
HttpContext.Current =
null;
//refills current context
HttpContext.Current = httpCntxt;
//abandons user's session
Session.Abandon();
//Clears authentication cookies if present
if (Response.Cookies.Count > 0)
{
if(Response.Cookies["FedAuth"] != null)
Response.Cookies[
"FedAuth"].Expires = DateTime.Now.AddDays(-1);
if (Response.Cookies[".ASPXAUTH"] != null)
Response.Cookies[
".ASPXAUTH"].Expires = DateTime.Now.AddDays(-1);
}
//Redirects to login page
FormsAuthentication.RedirectToLoginPage();
}
Reply 1 by http://social.technet.microsoft.com/profile/shantha%20kumar/?ws=usercard-mini
Hi,
This error occurs because of, you didn't have the Microsoft.SharePoint.IdentityModel.dll as a reference in your project.
If you need that, Search for that dll under installation drive (C:\Windows)
For me, that dll appears under (C:\Windows\Installer\$PatchCache$\Managed\00004109410100000100000000F01FEC\14.0.4763 )
Copy that dll and paste it some where, add this dll as a reference in your project.
I hope, this will help for you.
Shantha Kumar T - MCTS
I am trying to use SPClaimsUtility for au8thenticating my user as per http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.identitymodel.spclaimsutility.authenticateformsuser.aspx .
But I get error 'Microsoft.SharePoint.IdentityModel.SPClaimsUtility' does not contain a definition for 'AuthenticateFormsUser'
in my object browser for the 'Microsoft.SharePoint.IdentityModel.dll I am not able to find the def for this static function.
What could be the possible cause?
Cheers-hemant
we could not solve above problem but I used below mentioned code for FBA authentication finally:
Authenticate returns true or false according to user is authenticated or not .
private SecurityToken GetSecurityToken(string loginName,string psswrd)
{
return SPSecurityContext.SecurityTokenForFormsAuthentication(newUri(SPContext.Current.Site.Url),"memebershipprovidername","roleprovidername",loginName,psswrd);
}
private bool Authenticate(string loginName, string psswrd)
{
bool flag = false;
SecurityToken securityToken = null;
if (loginName==null && psswrd==null)
{
throw new ArgumentException("Please provide username and password");
}
using (new SPMonitoredScope("Retrieve security token and establish session."))
{
securityToken =
this.GetSecurityToken(loginName,psswrd);
if (securityToken == null)
{
flag =
false;
}
else
{
this.EstablishSessionWithToken(securityToken);
flag =
true;
}
}
return flag;
}
internal void EstablishSessionWithToken(SecurityToken securityToken)
{
if (securityToken == null)
{
throw new ArgumentNullException("securityToken");
}
Microsoft.SharePoint.IdentityModel.
SPFederationAuthenticationModule fam = this.Context.ApplicationInstance.Modules["FederatedAuthentication"] asMicrosoft.SharePoint.IdentityModel.SPFederationAuthenticationModule;
if (fam == null)
{
throw new ArgumentException(null, "FederationAuthenticationModule");
}
//Microsoft.SharePoint.Utilities
// .SecurityContext.RunAsProcess(delegate
//{
fam.SetPrincipalAndWriteSessionToken(securityToken,
true, SPSecurityTokenServiceManager.Local.UseSessionCookies);
//});
}
this function is not available in beta version of sharepoint 2010. in licensed version dll , the reference is there.
further the alternative code mentioned above has minor change wrt licensed version of new dll:
fam.SetPrincipalAndWriteSessionToken(securityToken);
instead of
fam.SetPrincipalAndWriteSessionToken(securityToken,
true, SPSecurityTokenServiceManager.Local.UseSessionCookies);
further we may like to have our own custom sign out:-
protected void lnkBtnSignOut_Click(object sender, EventArgs e)
{
HttpContext httpCntxt = HttpContext.Current;
//Signing out
FormsAuthentication.SignOut();
//Request.Cookies.Clear();
// nullifies current context
HttpContext.Current =
null;
//refills current context
HttpContext.Current = httpCntxt;
//abandons user's session
Session.Abandon();
//Clears authentication cookies if present
if (Response.Cookies.Count > 0)
{
if(Response.Cookies["FedAuth"] != null)
Response.Cookies[
"FedAuth"].Expires = DateTime.Now.AddDays(-1);
if (Response.Cookies[".ASPXAUTH"] != null)
Response.Cookies[
".ASPXAUTH"].Expires = DateTime.Now.AddDays(-1);
}
//Redirects to login page
FormsAuthentication.RedirectToLoginPage();
}
Reply 1 by http://social.technet.microsoft.com/profile/shantha%20kumar/?ws=usercard-mini
Hi,
This error occurs because of, you didn't have the Microsoft.SharePoint.IdentityModel.dll as a reference in your project.
If you need that, Search for that dll under installation drive (C:\Windows)
For me, that dll appears under (C:\Windows\Installer\$PatchCache$\Managed\00004109410100000100000000F01FEC\14.0.4763 )
Copy that dll and paste it some where, add this dll as a reference in your project.
I hope, this will help for you.
Shantha Kumar T - MCTS
Subscribe to:
Posts (Atom)