Pages

Search This Blog

Showing posts with label Central Admin. Show all posts
Showing posts with label Central Admin. Show all posts

Sunday, January 5, 2014

All users are logged in as System Account

There is a very strange problem we were facing in which any contributor or user when logged in into SharePoint 2010 site then it started showing him / her as sharepoint\system account. This is very strange and we checked all the possible scenarios to confirm that nothing applies in my case :- 


Checked the user policy in central admin and there was nothing that was causing this issue





















Another possibility was to check if the farm admin account is operating as system account but that was also not the case.






Now another question came in my mind if this setting is not enabled then why does SharePoint showing system account at all. Strange but true. May be this setting is not at all applied on the farm account any by default it consider it as system account.



Then we checked the farm account is not set to the contributors ad account but it was correct and set to the farm admin account only





Then we checked if there is any problem with IIS pool Account and it was correctly set except that if was running as a specific user which is my farm admin account. Now I got the issue, this is the reason why all my users were being impersonated as system account. I changed it to Application user (pass-through authentication) and it solved the mystery. 






All my users are happy now as they can see their names as logged in user and and that makes me feel happy as well. It also solved lot of issues related to the authentication and access denied errors as and when user tries to perform any activity on which it doesn't has access by SharePoint.




Friday, February 1, 2013

Download all solutions wsp from sharepoint 2010 central admin using powershell

[void][reflection.assembly]::LoadWithPartialName("Microsoft.SharePoint")
[void][reflection.assembly]::LoadWithPartialName("Microsoft.SharePoint.Administration")
[void][reflection.assembly]::LoadWithPartialName("System")
[void][reflection.assembly]::LoadWithPartialName("System.Collections")
[Microsoft.SharePoint.Administration.SPFarm]$farm = [Microsoft.SharePoint.Administration.SPFarm]::get_Local()

Write-Host -foregroundcolor White "Starting solutions download process..."

foreach ($solution in $farm.Solutions)
{
Write-Host -foregroundcolor White ""
Write-Host -foregroundcolor Yellow "Downloading solution $solution..."
$file = $solution.SolutionFile
$solutionName = $solution.name
$file.SaveAs("c:\solutions\$solutionName")
Write-Host -foregroundcolor Green "Solution $solutionName downloaded successfully."
}

Write-Host Write-Host -foregroundcolor Green "All solutions downloaded in c:\solutions folder"
Read-Host 'Done...'

Wednesday, November 30, 2011

Start "Sharepoint 2010 Administration" Service using Powershell Script

Many a time we are into a situation that we have to deploy the WSP file by using Powershell script and it is required that if you want to deploy a wsp file in Sharepoint than "Sharepoint 2010 Administration" service has to be in Started status.

So if you want to start the "Sharepoint 2010 Administration" Service also through Powershell script than below is the snippet of Powershell script by using which we can start it before deploying the WSP.

Create a text file in notepad and add the below mentioned Script line and save this file as StartAdminService.ps1.

$AdminServiceName = "SPAdminV4"
$snapin="Microsoft.SharePoint.PowerShell"

if (get-pssnapin $snapin -ea "silentlycontinue")
{
    write-host -f Green "PSsnapin $snapin is loaded"
}
if ($(Get-Service $AdminServiceName).Status -eq "Stopped")
{
    $IsAdminServiceWasRunning = $false;
    Start-Service $AdminServiceName
    write-host -f Green "SPAdminV4 Service has been started Successfully."

}
else
{
    write-host -f Green "SPAdminV4 Service is already started."
}

Now drag and drop the text file in the Sharepoint 2010 Management Shell and Press Enter key. It will start the "Sharepoint 2010 Administration" service if it is not started.

Hope it will be a help to you.

Cheers!
Ravish

Monday, November 7, 2011

Self Service Site Creation

Bringing-up the out of box feature “Self Service Site Creation“, as the name suggests it does not create a site but actually it gives the freedom to create a site collection by any user (can also specify the permissions) other than the site administrator. It can be used for the end users to create their own site collection under the same URL domain.
In this post I will tell how to use the “Self Service Site Creation“ by customizing the permissions and creating the site using UI as well as the programmatically.
1. Login to the “SharePoint 2010 Central Administration”.
2. Click on the “Manage Web Application” under the “Application Management”.
3. Select the Web Application.
4. Click on the “Self Service Site Creation” icon present in the ribbon.



5. Check the “On” button present on the dialogue box.
6. If require to permit the functionality only to the limited users, then click on the user policy and edit the settings and give the permission to the desired user.
7. Now logon to the http:///_layouts/scsignup.aspx and enter the details to create a new site collection.
8. Or you can also do it programmatically using the “objSite.SelfServiceCreateSite()” method

Monday, June 20, 2011

How to: Remove Server from MOSS Farm


In one of my project, I was stuck while uninstalling MOSS from one of the servers. After struggling with the issues, I found some solutions that were helpful in resolving the issue. I am putting those resolutions that may be helpful for you also.

I found four way to remove the server from MOSS server farm.
  • First one is disconnect by running the configuration wizard from the start menu. This is the same way to use if you want to leave MOSS 2007 installed on the server but disjoined from the farm.
1.        Run the Configuration Wizard and, on the second page, select Disconnect from this server farm and click Yes on the warning dialog. This will delete the IIS web site and the application pool.
2.        Then, run the uninstall from the Control Panel's Features and Programs application and click Yes on the warning dialog. This will take a reboot.
3.        Then, if you really want to get rid of it all, go to the database server and delete the Config and Admin Content databases
  • Second on is removes the server if you want to clean up the serer when it can contact the configuration database. This method also uninstalls the SharePoint from the server.
    • Use Add/Remove Programs in the control panel.
    • In "Add/Remove Programs", you can remove "Microsoft Office SharePoint 2007", and it wills pop-up a warning, Click Ok to continue.
  • The third method is removing the server from the server farm in the SharePoint Central Administration site. This way is easy and quickly, almost no latency, the action was completed. But this way don’t disconnect the server from the SharePoint database.
  • The last method is more advanced, it will disconnecting the server from the SharePoint configuration database. And then you can format the server or re-install MOSS, whatever you want for the server. The step is very easy:
    • Open a command prompt to c:\program files\common files\Microsoft shared\web server extensions\12\bin (the SharePoint installed path)
    • Run following command:
      psconfig -cmd adminvs -unprovision
      psconfig –cmd configdb –disconnect
Actually, I do server remove by the third and last one method, remove the server from MOSS farm by Central administration site, and then disconnected the server from configuration database. It is easy and cleanly, and without reset anything/reboot machine.

Sunday, April 17, 2011

Managing User Policy for an Web Application

When there is a need to set permission levels for the whole web application then there are the following four permission sets:
This is how we can create the user policy.
1. Open the SharePoint Central Administration
2. Click the “Manage Web Applications “under the “Application Management” heading.
3. Click the Web Application for which User Policy is to be created.
4. Now click on the User Policy.


Full Read - good for search/caching
Full Control - good for global admins
Deny Write - good for public facing
Deny All - good for restricted sites
Now click finish once done.

Monday, April 11, 2011

SharePoint Email configuration using TLS on Windows Server 2008


SharePoint Email configuration using TLS on Windows Server 2008
Steps:
1.       The foremost step in this configuration is to setup the SMTP server settings in SharePoint. This configuration setting is available in Central Admin > System Settings > E-Mail and Text Messages



2.       Now we need to specify the outbound SMTP server details. Here in our case we are going to use the current server as email sender to relay emails to remote mail server using TLS. So we need to specify the name of current machine where the central admin is hosted. It is advisable to specify the central admin host server name only because it will not conflict in farm environment with multiple WFE's. Specify the server name and from email address which is the admin email id that we are going to use in next steps also.




3.       It's time now to set the Front End Web server where central admin is hosted. We need to configure SMTP server settings in this step.
a.       If SMTP server is not installed on your server then install this feature from service manager. This is a screenshot of windows server 2008 which might be different in earlier versions





 b. Once you have successfully installed SMTP server tool then you need to go to IIS 6.0 settings


Open IIS6 and expand the properties of SMTP Virtual server node.


Now go to delivery tab and select outbound security button. Specify the user credentials that have access to send email on the remote exchange server. Enable TLS encryption settings here if the server requires TSL encryption.

Now go to outbound connections tab if you want to change the TCP Port settings. By default its set to 25 but we can change it to our configuration


Now go to advanced setting for specifying the server address. Put the URL or IP address in smart host text box.


These are all settings you need to do at the SharePoint end to send emails from SharePoint server with TLS encryptions on Windows server 2008. This post doesn't include any settings that you need to do at email server level. Feel free to ask if you want to know more about these configurations at either server.

SharePoint 2010 List Throttling



While I was searching for content for data optimization in case of large list and libraries, I found a new feature incorporated into SharePoint 2010 for putting limit on the amount of data to be retrieved from the servers. The feature is called List Throttling. 

What exactly it does is allow you to set a limit for how many rows of data can be retrieved for a list or library at any one time. As an example, you can consider a situation where user is having a list with 50,000 records and he creates a view to show all items in a single page, this could put unnecessary load on servers. List throttling ensures that such a request would not be allowed to execute. The hit on the server is alleviated, and the user gets a nice little message that says sorry, we can’t retrieve all of the data you requested because it exceeds the throttle limit for this list.  

List throttling is managed through web application. Click on Application Management --> Manage Web Applications.  Select the web application you want to configure list throttling, then in the ribbon click on the General Settings drop down and select the Resource Throttling item. Below figure shows how to enable list throttling in a web application.



Below is the list of options and their details:

List View Threshold – Specifies the maximum number of items that a database operation can involve at one time. Operations that exceed this limit are prohibited.  The default value is 5,000 and minimum value is 2,000.

Object Model Override – If you choose to allow object model override, users to whom you grant sufficient permission can override the List View Threshold programmatically for particular queries. This option needs to be enabled in order to enable super users to retrieve items through the object model, up to the amount defined in the List query size threshold for auditors and administrators.

List View Threshold for Auditors and Administrators – Specifies the maximum number of items that an object model database query can involve at one time for users to whom you grant sufficient permissions through Security Policy. This is a special limit for “super users”.  It is important to understand that this DOES NOT allow these super users to see more items in a list view.  This property is used in conjunction with the Allow object model override property described below.  That means that if Object Model Override is set to “Yes”, then these super users can retrieve up to the number of items set in this property, but only via the object model.  The way you become a “super user” is a farm admin creates a web application policy for you that grants you rights to a permission level that includes either the Site Collection Administrator and/or Site Collection Auditor rights. 
List View Lookup Threshold – Specifies the maximum number of Lookup, Person/Group, or workflow status fields that a database query can involve at one time.

Daily Time Window for Large Queries – Specifies a daily time window when large queries can be executed. Specify a time outside of working hours for this window because large queries may cause excessive server load.

List Unique Permissions Threshold - Specifies the maximum number of unique permissions that a list can have at one time.

Backward-Compatible Event Handlers - Turn on or off backward-compatible event handlers for this Web application. If this is turned off, users cannot bind document libraries to backward-compatible event handlers.

 

HTTP Request Monitoring and Throttling - Turn on or off the HTTP request throttling job. This job monitors front-end Web server performance, and in the event of HTTP request overload, rejects (throttles) low priority requests. You can turn request throttling off to allow services such as Search to run uninterrupted on the farm, however, in an unthrottled farm experiencing overload, front-end Web servers become less responsive, and may stop working.


In order to retrieve information using the object model in order to retrieve up to the number of items specified in the List query size threshold for auditors and administrators property, there is a property you need to set in your query object.  The property is called QueryThrottleMode and it applies to the SPQuery and SPSiteDataQuery classes.  You simply set this property to override and then use your class instance to query. 
using (SPSite objSPSite = new SPSite("http://<Your Site>")) 
{
using (SPWeb objSPWeb = objSPSite.RootWeb)
{
SPList objSPList = objSPWeb.Lists["Test List"];

SPQuery objSPQuery = new SPQuery();
objSPQuery.QueryThrottleMode = SPQueryThrottleOption.Override;


            SPListItemCollection objColl = objSPList.GetItems(objSPQuery);
            //Your custom logic here for processed data
}
}

Wednesday, March 23, 2011

Managed Path in Sharepoint 2010

In this article we will see how we can create managed path in Sharepoint 2010.
Sometimes we have to define which URL's SharePoint should maintain for a sitecolllection. To define this we have to create managed path for web application.
The managed paths are web application specific i.e. the managed path created for one web application will not appear in any other web application.
We can create two types of managed path:
1.   Wildcard Inclusion
2.   Explicit Inclusion
Explicit Inclusion managed path allows us to create a single site collection on that path and Wildcard Inclusion allows us to create multiple site collection on that managed path.
Let’s see how we can create managed path in Sharepoint 2010:
Go to Sharepoint 2010 Central Administration and click on Managed Path as shown in below image.
Now write the managed path which you want to create and click on Add Path button.

The managed path has been created for that particular web application.

Now click on create new site collection and select the same web application you will see the managed path created by you.