Showing posts with label SharePoint. Show all posts
Showing posts with label SharePoint. Show all posts

Wednesday, August 15, 2012

SharePoint Search problem after migration

After migrating from WSS 3.0 to Foundation 2010 cannot search inside a document.
Basically it shows in the document property "Pending", so the document waiting for approval.
Created a small PowerShell script to approve all documents on a site:
________________________________________________________________________

$mySite=Get-SPSite "http://yoursite"
$myWebSub=$mySite.AllWebs
foreach ($myWeb in $myWebSub)
{
    $myWeb=Get-SPWeb $myWeb.url
    $myWeb.url
    $myLIb=$myWeb.lists|where {($_.BaseTemplate -eq "DocumentLibrary")}
    foreach ($lib in $myLib)
    {
        $lib.Title
        $myDocs=$lib.Items
        foreach ($doc in $MyDocs)
        {
            $doc.name                             # only for information
            $doc.file.level                       # only for information
            if (($doc.file.level -eq "Draft") -or ($doc.file.level -eq "Pending")){$doc.file.Approve("script")}
            $doc.file.level                        # only for information
           
        }
    }
}

Thursday, June 28, 2012

SharePoint 2010 FBA Login and SSL


The problem was - users don't want to chose options in between FBA login and NTLM login.
First: User who is FBA user should see only FBA Login dialog and AD users want to login transparently, then they on LAN and already authenticated.
Second: Then you login using standard SharePoint FBA login page, it shows you red alert about - user name and password will be send in clear text over the connection.
Solutions:
  1. Instead creating AAM we need to extend web application:
    1. For example - create a web application with CBA (Claim Based Authentication) with NTLM and FBA providers. - name it MYTEST on port 80 - http://mytest . It will be default zone.
    2. Give at least  one FBA user full access to the site. Extend the web application as http://mytest.mydomain.com on port 80 with only FBA providers. It will be Extranet zone.
  1. For configuring SSL access (to remove red alert from FBA login page):
    1. Go to AAM collection for the web application and edit http://mytest.mydomain.com to https://mytest.mydomain.com
    1. Add binding in IIS to https (you need to link Public SSL certificate to http://mytest.mydomain.com).
    1. For the certificate - Wild card certificate can be used.

Wednesday, May 02, 2012

Sharepoint Foundation 2010 FBA and NTLM (no web.config edit)

Here some of my experience with SharePoint Foundation 2010 installation and NTLM with FBA configuration on Windows 2008 R2 sp1 platform. Farm configuration - one Front end and one Back end SQL 2008 R2 server. I did not manually edit any web.config files.
  1. Windows 2008 r2 installation on hyper-v virtual machine on Windows 2008 R2 cluster.
  2. SharePoint foundation 2010 prerequisite installation on Windows 2008 r2 server.
  3. SharePoint foundation 2010 installation.
  4. Service pack 1 for SharePoint foundation 2010 installation.
  5. Check if sp1 installation was successful.
  6. Create FBA user database.
  7. Configure additional SharePoint services for start.
  8. Configure IIS for FBA.
  9. Create SharePoint Web application, configure the Web application and IIS (web application site) for Claim Based Authentication (NTLM and FBA).
  10. Provision FBA roles and users, give FBA user access rights to the Web application.
  11. Test the solution.

Disclaimer: It is not "Best practices" - only the notes for myself.

Monday, July 12, 2010

PowerShell SharePoint 2010 Backup

I need to schedule SharePoint 2010 Backup (site):
First create a PowerShell script in Notepad:
Backup-SPSite -Identity http://wss-08r2 -Path "\\servername\sharepoint2010\one\wss-08r2.bak" -Force
name the file - backup.ps1

Second:
Under folder C:\Windows\System32\WindowsPowerShell\v1.0 create profile.ps1 file it will be default profile for all users on the SharePoint front end server, edit the file by adding -
Add-PSSnapin Microsoft.SharePoint.PowerShell
And save the file.

Third:
Create a scheduled job and in Action tab put:
Action: powershell.exe
Add arguments: -command "PATH\backup.ps1"
where is PATH - path to the script file.

Friday, January 08, 2010

SharePoint alerts and timer problem

The issue: MOSS2007 periodically stop run "Immediate Alerts" job - the job hangs in "Initializing" state and no alerts will be processed. The simple fix to stop and start "SharePoint Services Timer service" on the MOSS2007 server (if you cannot stop it - just end "OWSTIMER.EXE" process form "Task Manager". Additionally,that you might need to do is to clear SharePoint cache

  • Go to Services and stop Windows SharePoint Services Timer service
  • Go to C:\ProgramData\Microsoft\SharePoint\Config\GUID directory
  • Edit the cache.ini file and change the number to 1
  • Delete all the xml files
  • Start Windows SharePoint Services Timer service

Monday, May 11, 2009

Broken by updates.

Symptoms:
You can not access IIS web sites locally, search indexing does not work, any service what should authenticate to IIS with NTLM does not work.
Solution: 

I fixed it by this method on two MOSS 2007 servers -

"Method 2: Disable the loopback check

Follow these steps:
  1. Click Start, click Run, type regedit, and then click OK.
  2. In Registry Editor, locate and then click the following registry key:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
  3. Right-click Lsa, point to New, and then click DWORD Value.
  4. Type DisableLoopbackCheck, and then press ENTER.
  5. Right-click DisableLoopbackCheck, and then click Modify.
  6. In the Value data box, type 1, and then click OK.
  7. Quit Registry Editor, and then restart your computer. "

Monday, September 29, 2008

Ambiguous name detected

Then a user try to open MS Word document from a SharePoint library, he has a message "Ambiguous name detected" TmpDDE. In this case you need or delete all macros from NORMAL.DOT or replace the NORMAL.DOT.

Tuesday, September 16, 2008

SSP issues on MOSS2007 - Windows 2008

If you enable crawling for "Office SharePoint Server Search" on "Dedicated web front end ..." instead "Use all web front end..." it will be auto added lines in "HOSTS" file what will prevent MOSS2007 functioning properly, so do not do it. Blog about it: http://blogs.msdn.com/philirit/archive/2008/06/25/ssp-app-pool-failure-in-iis-7.aspx

Friday, August 22, 2008

Forms authentication and Microsoft documents.

The issue was - you can not open Microsoft document from MOSS2007 document library, then you use Forms authentication. You can save document on your local drive by clicking of right button on the link, but then you try to open it just by clicking the link it return you an error or blank document.
Solition was to go to the SharePoint "Central Administration > Application Management > Authentication Providers > Edit Authentication" for Zone with Forms Authentication and change "Enable Client Integration" to "No", after that a Microsoft Document can be open in Read Only mode just by clicking on the link. To edit the document you still need to save it outside of SharePoint and upload it back after. Here is good reference: http://msdn.microsoft.com/en-us/library/bb977430.aspx
Previous case was for HTTP access, but if you use HTTPS and try to open a Microsoft document - you have message "The website you want to view request identification. Please, choose a certificate." Solution was to use reverse proxy in my case ISA2006 and publish the SharePoint site. However, you will need to configure ISA rule properly. Below are some configuration screens:


What is very ipmportant here is ability ISA to translate HTTP links to HTTPS links back to user's browser, otherwise despite on initial HTTPS request SharePoint will answer with HTTP links (references) on it's pages.

Friday, April 04, 2008

Business Data Catalogs in MOSS 2007

Basically, it is required 3 steps to create BDC in MOSS 2007:
1. Create an application metadata XML file
2. Import the file to SSP
3. I recomend to use the utility - BDC Meta Man the link: http://www.bdcmetaman.com/knowledge%20base/MOSS%20BDC%20-%20getting%20started.aspx
it is free (currently) for a limited edition.

Monday, March 31, 2008

Log parser for MOSS 2007

The link is: http://blogs.msdn.com/leonidly/archive/2007/10/30/usage-analysis-processing-logs.aspx
It is a very good small parser, after converting MOSS 2007 logs to csv file, you can export it to excel with a macro and do what ever.

Friday, March 07, 2008

6482, 7076, 6398, 5401 errors in APPS log.

To fix those errors change all SharePoint services "log on" from "Local System" to sharepoint AD administration account.

Monday, February 04, 2008

Change How to change the Application Pool Identity for SharePoint Central Administration (SCA)

It is from http://weblogs.asp.net/erobillard/archive/2007/07/06/how-to-change-service-accounts-and-their-passwords-in-moss-and-wss-3-0.aspx blog:

"Repeat these steps on each server which hosts the SharePoint Central Administration web application. If the web front-end (WFE) and application (APP) server roles are served by separate machines, SCA should be enabled on one APP server (or more) and stopped and/or removed from the WFE servers. This allows control over access to the SCA. The SCA service account should not be the same as that used for the SharePoint application pool so even if one is compromised, the other remains secure.

  1. Open a command prompt.
  2. Run: stsadm -o updatefarmcredentials -userlogin domain\username -password password
    Be patient. This may take a few minutes to run.
  3. To restart the application pool, either open IIS and recycle the application pool, or open a command prompt and type iisreset -noforce
  4. Open SharePoint Central Administration in a browser to confirm that the change was successful.

The above steps create an Administration Application Pool Credential Deployment timer job. You can see this in the Timer Job Definitions page. The job is complete when it no longer appears in the list of definitions (refresh the browser, this isn't automatic).

The blog contain information how to change over accounts.

Thursday, September 27, 2007

SharePoint "calculated" field "TODAY"

Very usefull I test it (from somebodyes post):
It is possible to use "Today" in a function as a reference to today’s date
(despite what SharePoint tells you). There is a very simple work around that
doesn't involve very much effort or complexity.

First, create a new column in your list with the Column Name of "Today".
Click "OK". (It doesn't matter what type of column or data it is, this is
just a place holder).


Next, create a column with the data where you would like to use "Today" as a
reference to today’s date. The column type should be "Calculated". In the
formula field, create your formula using "Today" as if it held the current
date/time.


SharePoint will calculate the formula based on the assumption that you will
be using "Today" as a reference to the new column you just created.


Next, edit the new column named "Today" that you created in the first step.
On the very bottom of the page, click "Delete", to delete the column. In
your formula, SharePoint will keep the reference to "Today" but it will
change from referencing your column, to a reference to the current date.


This can be used in any of the Date and Time functions, but I haven't tested
it beyond that.

href="http://www.brianrudloff.com/post/Sharepoint-Services-2003---Workaround-for-filtering-on-today's-date.aspx">
Notes:
If you want to edit the formula containing "Today" SharePoint will not let
you, and will give you the same error about not using Today or Me in a
function. To get passed this problem you have to temporarily create another
Today column.


SharePoint Services 2003 does not initially come with a column for Today's Date. However, there is a workaround. Chris Johnson @ msdn wrote a great article on exactly how this works. But basically, you can trick SharePoint into using Today in a function and create whatever calculated field you need.

I recently had to use this technique to filter a SharePoint Calendar. I wanted it to display only upcoming events and out of the box, the calendar displays everything. Here's what I found:

How to Filter a SharePoint Services 2003 Web Part Calendar to Only Show Upcoming Events
1. Create a new column with the Column Name: Today (It doesn't matter what the type is, so leave it default)

2. Next, create a column with the Column Name: Begins. In the formula section, enter: =[Start Time]. The data type should be: Date and Time. The Date and Time format should be: Date Only.

3. Create a new column with the Column Name: Date_Range. (or something). In the formula section, enter: =Today-Begins. The data type should be: Number(1, 1.0, 100). Set the Number of decimal places to: 0.

4. Here's the weird part. Go back and delete the original Today column created in Step 1. I know what you're thinking...but trust me... If you had read the article I mentioned earlier, you'd understand where this is going.

5. Now Create the Calendar Web Part by Clicking on Edit Page > Add a Web Part > Check Calendar > Click Add.

6. Create the customer view by Clicking on the Calendar Hyperlink > Settings > Create View. Under "Start From an Existing View", Click Calendar. Give the Calendar View a Name and then scroll to the bottom of the page and Select "Show items only when the following is true:" In the first Dropdown box, Select: Date_Range. In the second Dropdown box, Select "is less than". Finally, enter a zero (0) into the textbox.

That's it! When you view your page, you should now have a Calendar Web Part that displays only upcoming events. If by any chance it’s still showing all events, you may have to play with the view setting for the calendar.

Monday, August 13, 2007

Rename SharePoint server (MOSS 2007)

You can follow Mirjam's blog:
http://www.sharepointblogs.com/mirjam/archive/2007/08/06/renaming-a-moss-server.aspx
Renaming a MOSS Server
Renaming a MOSS server is meticulous job. If anything goes wrong along the way chances are that you need to reconfigure your whole MOSS environment.
Here are the steps to take, and the order in which to take them if you want to rename a server that has MOSS already installed and configured on it:
*** NOTE: Use only letters, digits and minus for the machine name (so no underscores), max 15 characters.
Change each alternate access mapping for your MOSS/WSS deployment in Central Administration:
Open Central Administration, "Operations" Tab, "Alternate access mappings" link
Modify each mapping item to reflect your newly chosen server name
Use stsadm.exe to invoke the "renameserver" command option:
Open a command prompt window
cd "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN"
stsadm -o renameserver -newservername -oldservername
Rename your Server via Change Name Operation in Windows Server 2003:
Start Menu Control Panel System, "Computer Name" tab, "Change" button.
Input your new server name
Reboot the server NOW.
After reboot, open command prompt
cd C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN
stsadm -o updatefarmcredentials -userlogin -password
iisreset /noforce
Check all application pool identities in IIS, update where the old machine name is still there.
If you already have a search index drop this, and rebuild it
Your server is now renamed.


But if you already rename the server before doing first step from the blog, you will not be able to access SP server administrator site and SSP sites configuration. So you will need to put old name in the HOST file and after that change alternative mapping according the blog. You can do second step from the blog, you do not need to do 4 and 5 steps (it is already done). And I did not do 6 step.
You need to enter index server name for SSP again.

Saturday, May 05, 2007

Publishing style navigation in WSS v3

Tuesday, February 27, 2007, 12:02:43 AM E. Shupps
While working with some custom site definitions based on the built-in STS (Team Site) definition I came across an annoying navigation issue that derailed me for a couple of hours. It turns out the the drop-down functionality in the top navigation bar, which works perfectly well in the Publishing and Collaboration Portal definitions, is disabled in the Team Site definition. After digging around in the object model for a while and trying a few different combinations, I found the solution in the menu settings contained within the default master page.
To enable drop-down menu functionality, locate the following block of code in the Default.Master page (/_catalog/masterpage/default.master in the site collection or \12\Template\Global\default.master on the file system):
< asp:SiteMapDataSource
ShowStartingNode="False"
SiteMapProvider="SPNavigationProvider"
id="topSiteMap"
runat="server"
StartingNodeUrl="sid:1002" / >
This sets the data source for the menu control and its associated parameters. Each Site Map Provider is defined in the <> section of web.config. The SPNavigationProvider entry looks like this:
< name="SPNavigationProvider" type="Microsoft.SharePoint.Navigation.SPNavigationProvider, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
If you locate this entry in web.config you will notice another entry for "SPSiteMapProvider" immediately below it. After much trial and error I discovered that this is the data source that is required for the drop-down menus. To enable it, change the SiteMapDataSource settings in default.master (or your custom master page) to the following:
ShowStartingNode="True"
SiteMapProvider="SPSiteMapProvider"
id="topSiteMap"
runat="server" />
The navigation menu will now use the SPSiteMapProvider data source which contains all the nodes in the current site collection. Depending upon your requirements, you may also wish to modify the settings for the default number of static and dynamic levels (flyouts) the navigation control displays. To do that, adjust the following settings within the <> control:
StaticDisplayLevels="2"MaximumDynamicDisplayLevels="1"
Adjusting these values up or down will increase or decrease the number of levels. Be advised that setting the levels to a higher value may impact performance, as the control will need to fetch the relevant information from the database and build the complete menu structure before the page can finish loading.

Friday, March 23, 2007

Change between Kerberous an NTLM authentication

  1. Check Web Sites: Identifier in our case it is 421949310,
  2. Get settings for NTAutheticationProviders property:

  3. Change the property to Kerberous:

    C:\Inetpub\AdminScripts>cscript adsutil.vbs get w3svc/421949310/root/NTAuthentiationProviders "Negotiate,NTLM"

  4. Change the property to NTLM:

    C:\Inetpub\AdminScripts>cscript adsutil.vbs get w3svc/421949310/root/NTAuthentiationProviders "NTLM"

  5. You can check all properties for AD object by ENUM command, for example to see all objects and settings under the virtual server root:

    C:\Inetpub\AdminScripts>cscript adsutil.vbs enum w3svc/421949310/root

Wednesday, March 14, 2007

SharePoint 2003 server upgrade to MOSS2007

This Upgrade approach can be used in multiple cases as: test upgrade, moving to new hardware upgrade and basically in any other case. To use the approach you need to have virtual server with Sharepoint 2003 installation.
Conditions:
  1. VS SPS 2003 should be exactly patched as production one.
  2. Same SQL database server can be used, but if database server is different - it should be patched as production one.

Steps:

  1. Backup production SPS 2003
  2. Restore backuped databases to a SQL server under different name - if you will use same SQL server for the process.
  3. On VS SPS 2003 install post sp2 hotfix http://support.microsoft.com/?id=897722 to get databaserepair option for stsadm.
  4. Run stsadm -o databserepair on all virtual servers content databases, command line will be like "stsam -o databaserepair -url http://sps.company.com -databasename sps_site". http://support.microsoft.com/kb/918744 . In my cases I did not have any orphane objects, I beliave if you do - you need to fix the database.
  5. Do not use full-text index on any database, if an index exists - delete the index file and disable the indexing on the database (database properties - files option).
  6. Run prescan.exe tool from MOSS2007 installation CD, run as: "prescan.exe /all" any other option so far gave me an error like something wrong with uri.
  7. Fix any error, if you run prescan - failed, but if you will run MOSS2007 installation without fixing errors it can give you more specific error log.
  8. After main upgrade finished you need to check sharepoint timer service - it should be running, and if you have WSS V2 sites very possble you will need to run "psconfig -cmd upgrade -inplace b2b -wait -force" from "\...\12\bin" to finish provisioning SSP(s)

Friday, February 02, 2007

VBScript for SharePoint 2007 backup

Rem The VBScript was created by Boris Sirotin All Covered 02/02/2007
Rem Copy stsadm.exe to same folder with the script
Rem The script should be scheduled as a task
Rem It will backup sharepoint to folder, by Friday it will run full backup and delete all backups
Rem older then 2 weeks. All other days it will run differential

Dim weekdate, weekdate1, command1, command2, oFSO, backpath1,backpath2,myFolder, f
Set Sh = Wscript.CreateObject("Wscript.Shell")
Set oFSO = CreateObject("Scripting.FileSystemObject")
weekdate=datepart("w",date)
backpath="file://vega/sharepoint/weekly"
Set myFolder=oFSO.GetFolder(backpath)
command1="stsadm -o backup -directory " +backpath + " -backupmethod full"
command2="stsadm -o backup -directory " +backpath + " -backupmethod differential"
if weekdate=6 Then
CleanUp(myFolder)
Sh.run command1, 1
else
Sh.run command2, 1
end if
Function CleanUp (Folder)
For Each f In Folder.SubFolders
If DateDiff("d",Now,f.DateCreated,vbMonday)>2 then
f.Delete
End if
next
End function

Friday, January 05, 2007

My Site move MOSS 2007

It was a problem after upgrade from 2003 to MOSS, MySite link go nowhere, but I can still access my site s under /personal/username. So I install new SSP with web application for mysites and move the personal sites where.
My site move from one web application to another, batch for moving:
stsadm -o backup -url http://sps.arcweb.com/personal/%1 -filename c:\temp\%1
stsadm -o restore -url http://arcmysites.arcweb.com/personal/%1 -filename c:\temp\%1
stsadm -o deletesite -url http://sps.arcweb.com/personal/%1

there is %1 a user name.

After that deleted old portal (I did not have anything imortant on the portal) and creted a new portal. MySites link became OK.