Wednesday, December 9, 2009

Error: Configuration file is not well-formed XML

This error message occured on the IIS 7 on my SharePoint server this morning (running on win server 2008). How come? Well it all started with this: I was going to add an account on a site, but the AD did not reply, which forced me in to the server to have a look. Turned out that the SharePoint server had 0 KB left on C: drive! No wonder you can't do anything on the site... Found out that the inetpub\logs folder had grown to a whole 16 GB! Log files!! Crazy! Started IIS 7 and looked in the "Logging":

By default the settings are set to schedule Daily (!) and without limits. It has nothing to do with the usage logging in SharePoint because those files resides in the 12 hive under logs there. And those were "only" 4 GB. Entered a new path from c: drive to the E:drive that has more space, and clicked on "Apply".... and the IIS crashed. With this message:



Performed an IIS reset, same error message.
Restarted the server, same error message.

Panic! The IIS was dead.

Googled it, and found this article (thanks!!):
http://www.tekniken.nu/drift_och_underhall/forefront_saboterar_iis_7

So I looked inside the C:\Windows\system32\inetserv\config\applicationHost.config folder and the applicationhost.config file size was 0 KB so I renamed that one to old_applicationhost.config and opened the \history folder and selected the newest applicationhost.config file. Pasted it to the C:\Windows\system32\inetserv\config\ and performed an IISRESET. Phew.... it's all back again....

Steps for the future are:

- move all log files to the E drive

- config the IIS log settings and add a limit

Sunday, November 29, 2009

Display week number in a view

To calculate the week number in a view, enter following formula in a calculated column:

Replace the "Yourdatefieldhere" with the column that contains the date field you want to calculate the formula on. Thanks to http://lamahashim.blogspot.com/2009/10/sharepoint-calculated-field-week-number.html for the formula.

Swedish version
=HELTAL((Yourdatefieldhere-DATUM(ÅR(Yourdatefieldhere);1;1)+(TEXT(VECKODAG(DATUM(ÅR(Yourdatefieldhere);1;1));"d")))/7)+1

English version
=INT((Yourdatefieldhere-DATE(YEAR(Yourdatefieldhere),1,1)+(TEXT(WEEKDAY(DATE(YEAR(Yourdatefieldhere),1,1)),"d")))/7)+1

More examples of view formulas here

Tuesday, October 6, 2009

Center align a div in IE 8

Usually when I want to center align a div on a page, I use margin:auto auto and set my width to a specific width, like 940px in my stylesheet. But, this does NOT work in IE 8. So to make that work, use

width:940px
height:100%
position:absolute
left:50% (to tell that your div should start in the middle of the page)
margin-left:-490px (half of your div size)

Thanks to this site

Sunday, October 4, 2009

Calculate date fields in SharePoint lists

I wanted a custom view where the news are sorted per Year and Month, and then after modified date descending order. I created a new field called Year and used the following formula to calculate year which is really easy:

=YEAR(Created)

Then I wanted to get the name of the month instead of the number so I used this formula (this is the swedish version, use comma instead of semicolon in the english version):

=OM(MÅNAD(Skapad)=1;"Januari";"")&OM(MÅNAD(Skapad)=2;"Februari";"") and so on... You must put an empty "" after or else it will write the word "False" in your view =)

In English:

=IF(MONTH(Created)=1, "January","")


Friday, September 25, 2009

Stop running this script

If you connect a secondary data source to your InfoPath form, and connect to a udcx file which contains a large amount of data: then you might get this error message inside the form:




Very irritating! I did not find any solution to it, only that you can disable the script debugger in IE, but hey - we are talking clients here! I will not be able to edit IE settings on my users computers right =)

The solution to this issue was to import the sql table to a SharePoint list, and then lookup against that list. Error message? GONE! :)

Monday, September 21, 2009

Create your own search control

I was looking for a way to get rid of the icon gosearch.gif in the Search Area in SharePoint:
There is no way to replace the image with a css class, the only thing you can do is hide it with a new class that is called td.sbgo img and add the display:none to it.

So you must create a new feature, which is really easy.

Copy the OSearchBasicFeature folder in the Feature directory in the 12 hive.

Rename to whatever you like, LisesSearch is fine =)

Edit the feature.xml file and add a new GUID (link here)

Edit the SearchArea.xml file and add the path to your own search button (I put an image in the IMAGES folder, actually I created a new folder beneath it where I put my own search image):


Rename the Control Id in this file to something else like "LisesSearch"

Install and activate the feature

stsadm -o installfeature -filename LisesSearch\feature.xml
stsadm -o activatefeature -id "YourGUIDhere" -url http://yoursitehere/

Now, in your masterpage just edit the Control Id of the aspcontentholder "PlaceHolderSearchArea" to your own Id (in this example LisesSearch).
Now (after some branding on the sbcell and sbgo classes) the search should have your own buttons:

Thursday, September 10, 2009

Gert rid of those login prompts

This post belongs to my issue described here which I have not found a solution to yet. Except from one of the issues: the login prompts!
When you run a Vista client against your SharePoint site that you have installed on a Win Server 2008 then you are in trouble. First thing: dont run Vista, but if you do, then you will have the following issues:

1) you get three (!) login prompts when you want to open, edit or modify stuff on your site
2) you cannot map network drive
3) you cannot open a library in explorer view

But, yesterday I laborated and found that there is a solution to nr 1 - the login prompts. If you stop the WebClient service on your Vista client, add your site as a Local intranet in IE and set your LAN settings in IE to "Automatically detect settings", the login prompts will disappear!!

If you don't set your WebClient service to manual then you have to stop it each time you restart the PC so remember to turn it off and not just stop the service.

I will register a case at MS to find a solution for the other issues.

Thursday, September 3, 2009

Filter on secondary data sources in InfoPath

I have built many forms in InfoPath 2007 and you always find new interesting issues to deal with =)

When you think you have found a brilliant solution, then you can be sure that there is an obstacle when it comes to web enabled forms. So it works with filter on data sources.


I wanted to drag and drop a secondary data source to my form, but I wanted it to show only values that matched a field value in my form. Let me clear: only values in the data source that belonged to the current user should be displayed in the repeating table. Easy, I thought and clicked the "Value" button and then the "Filter data...". Got this error message:






Hmm after hours of trixing with setting the field from other fields and so on, I disabled the web enabled layout. Now you may press the "Filter data..." button and set your filter. Web enable the form again, publish it and just press the "Ignore error messages" and continue with the publishing.... It worked!

So that error message is BS. I have saved the form, and all data remains in the form.

Wednesday, September 2, 2009

And now - a commercial break :)

My good friend Tobias Zimmergren has released his awesome Forum product for SharePoint.
I hereby quote Tozit himself:
"The TOZIT SharePoint Discussion Forum solution is a product, or set of products, that makes the discussions in SharePoint become very intuitive and user friendly. It also adds on a bunch of features that doesn't normally exist in SharePoint's built-in discussion lists"
Have a look here, it looks really cool!!

Wednesday, August 19, 2009

SharePoint Saturday!

On Saturday I will attend this seminar in Copenhagen, called SharePoint Saturday. http://www.sharepointsaturday.org/default.aspx Thanks, T, for the ticket =)
I will listen to Mike Watson and Tobias Zimmergren, and they will deliver, I am sure! Optimization and performance are things that I work with daily so it will be very interesting. Maybe I will post a summary.... maybe...

Friday, July 31, 2009

Display a list view in InfoPath

If you want to display all entries from a SharePoint list inside your InfoPath form, browser enabled or not, then do the following.

You have a list in SharePoint already, right..
Add a data connection to that list the usual way in InfoPath
Open the "Data source" in the right task pane and select the list (it is listed as a Secondary):


Right click it and select "Repeating table" and drag and drop it to your form



The list is displayed with all entries:


Wednesday, July 29, 2009

Stream a wmv file

If you upload a .wmv file to a library in SharePoint you will be asked if you want to "Open" or "Save" the file, as usual:


















But if you want the user to be able to stream the file directly, without being presented that message box, then you must perform some more steps. Create a new virtual directory on your SharePoint site inside the IIS (in the inetpub folder, wss, virtual directores, and then the sites folder), I named mine to "Webcasts". Upload the wmv file to that Webcasts directory. Edit the directory security on the Virtual directory to Anonymous so that the user doesn't get a login prompt.

Then create a new file inside the Webcasts-directory with the extension .wvx. This will trigger the wmv file and stream it directly inside Windows Media Player.

Open a text editor, such as Notepad. Type the following metafile script, but replace the URL with that of your file. Reference the audio or video file just as you would any other Web file:



You can place the metafile in the same folder as that of your digital media file. If you do so, you can use a relative path, which is simply the name of the file. The REF line would look like this:

add a href tag with only the filename: yourfile.wmv

Save the text file using the name of your digital media file followed by the .wvx extension if the metafile points to a file with a .wmv extension, or .wax if the metafile points to a file with a .wma extension, such as YourFile.wvx. You can also use the .asx file name extension for either audio or video.

Now, when you add the link to this wvx file by typing http://yoursharepointsite/webcasts/yourfile.wvx then the media file will stream in Media Player.

Friday, July 10, 2009

Error 6398

This is my platform:

A server farm with one SQL Server and one WSS 3 SP2 server (win server 2003). I have installed Search Server Express 2008 with Swedish language packs. Everything is working fine, the search is up and running and all. But, in Event Viewer I got this error message each time the indexer started (and I hate to have error messages, it is so disturbing! I want a clean log!):

Event Type: Error
Event Source: Windows SharePoint Services 3
Event Category: Timer
Event ID: 6398
Date: 2009-07-10
Time: 14:30:01
User: N/A
Computer: XXX
Description:The Execute method of job definition Microsoft.SharePoint.Search.Administration.SPSearchJobDefinition (ID aeb1e8f1-9341-417b-ab76-9442095f1019) threw an exception. More information is included below.

Retrieving the COM class factory for component with CLSID {629DA12E-9AD5-4FEC-B886-42C5982C5109} failed due to the following error: 80070422.

Hm. Looked in Central Administration on "Services on server", and both services were started there, that is Office Server Search and WSS Search. BUT, when I looked in Services (from the Control Panel) then the "Windows SharePoint Services Search" was disabled. Started it, and now all errors are gone.

Monday, June 29, 2009

Add a link inside the webdeleted page

One annoying thing when you delete a site in SharePoint is the page that you are directed to after the deletion, the webdeleted.aspx. For me it is easy, since I know that you must go up into the URL and delete from a certain slash to get back to the site above, but for the user... no not as easy.

So I thought that putting a link that redirects you up one level OR a link that simply closes the window would be great. Well it was easy made and delivers a really good result as well - if I may say so myself, and yes I may! :D

Remember to copy this page before editing it. And yes it will be overwritten maybe, but those are a few lines, not that hard to remember if that might happen. AND yes I want it to be used on ALL sites.

Find the webdeleted.aspx page
Copy and paste a copy inside the folder, just to be safe :)
Open the file in good old Notepad
Add the two following simple links above the last /font tag. One link is a javascript that closes the window and the other link brings you back to the site above and that is done with ../../ tag:


















Do NOT enter an entire path, only relative URLs! What this link does, is redirecting you back one level up to the parent site. That will work from any starting point. Now your "Delete web" looks like this instead of a blank page:


















Monday, June 22, 2009

Setup the VPC to use your wireless network

Today I tried to install a Cisco VPN client on my laptop which has Vista 64 installed. I know, but it was not my choice to install Vista, it is my work laptop. So, turns out that there is no client for this, and maybe they will not release one either. So, to be able to connect to a customer with this laptop I thought that I would use my VPC. I changed the settings in my VPC to use the wireless network that I use. Did not work. So I googled it, and this article was really helpful. Turns out that you can install a lookback adapter as a new network connection, and then let that network connection use your physical network connection (the wireless). And only allow that adapter to use the network connection (it does not say that in the article, but it is a setting in Vista). And, yes, I now had network connection in my VPC! I only had to download a cisco client that can be installed on Windows Server 2003 (I used version 4.8.00 but I will not write here were I found it....). You understand! :D

Friday, June 12, 2009

Script that delete old backup folders

Yey! If you want to save the server administrator (speaking!) some hell by deleting old backup folders and save disk space, then this is a solution for you!

Create a new file with Notepad and name it like deletebackupfiles.vbs and paste the following code (I cannot write the code here of course, but you can copy the code from the site http://www.mssqltips.com/tip.asp?tip=1324):














Edit the number of days on the first line, that is how old files you want to delete from the backup share. Then on the next line, enter the path to your share where the backup files are.

Remove the ' sign before "objFile.Delete" so that the script executes the deletion :)
Put a ' sign before the MsgBox instead, or else you must press OK to every file it wants to delete.
Then, create a new file with Notepad and name that deletebackup.bat (or what ever) and enter one line to it, and that is the path to your vbs file:

c:\backupscripts\deletebackupfiles.vbs

Open Task Scheduler on your server and create a new task where you want your .bat file to start at a scheduled time. I run it the night before my fullbackup creates new folders, so that the backup share is empty.

Wednesday, June 3, 2009

Use a SQL data connection in InfoPath

If you want to receive data from a SQL table directly into a field in InfoPath then do the following. First, create a new library in your SharePoint site using the template ”Data connections library”:



Name the library like "SQLConnections" or something. (Choose not to display it in your QuickLaunch if you want to hide this library):


Open InfoPath and open the form in which you want your new data connection (or you can open a blank form and do the same thing there). Click on "Tools" and "Data connections" and create a new SQL database connection:



Connect to your SQL server:



Select the database:



Finish and your data connection is added. Now, click on "Convert" button:



Enter the URL of your SharePoint site and the Data Connection library that you created before. Remove the "Forms/Allitems.aspx" at the end of the URL and replace that with a filename instead, for example "myconnection.udcx":


When you finish, you'll see that the "Convert" button is grey. Press Close to return to the form:



Go to your field where you want to display data from the data connection source:




Publish it and test it in your browser:

Thursday, May 14, 2009

Collect user information from AD through InfoPath

I wanted a webpart in SharePoint that displays certain user information from the AD. Looked at a couple of webparts Bamboo, SharePoint Boost, etc but all of those are directly connected to the AD and I did not want the user to be able to push information back into the AD. Only display it so that the user can send a request to change the information through a simple list.
So I thought that InfoPath might be able to do some lookups for me, and yes the webservice that calls on UserProfiles was perfect for this! And since I am used to InfoPath and how you can perform lookups inside the form using one specific field I thought that it could not be that hard to get all information using the "Username" field. All fields in the form are read-only and it is published as a web form. The result is the following webpart:



Mail me if you want some more explanation or instructions!

I love that you can use InfoPath without any code... Powerful!

Tuesday, May 5, 2009

Unable to map a SharePoint site as a network drive

I am running WSS 3 on a Windows Server 2008 and want to map my site from ie Word or the explorer. But I get the message "Network path not found":



Or if I try to map to it or if I run "Net use" from inside the command prompt. I get the following message:

"C:\Users\lise.rasmussen>net use x: http://xxx.com/Shared%20Documents/
Enter the user name for 'xxx.com': domain\loginname
Enter the password for xxx.com:
System error 67 has occurred.
The network name cannot be found."

So I cannot open my site directly from the Explorer (via Map Network drive) cause then I get this message ("The folder you entered does not appear to be valid. Please choose another"):



Or in Explorer View from SharePoint, then I get this message ("Your client does not support opening this list with Windows Explorer", and yes it is from the client, not the server):


I run a Windows Vista client, and the client service is installed. And one more thing, if I open a document from the site I get THREE login prompts before I can open the document. I can only press Esc but... how irritating isn't that!!

The Desktop Experience is installed on the server, as well as WebDAV and it is rebooted. I also checked that the AAM is correct and can be reached from the server, check to that :)

Some blogs suggest that you update the Web Folders, but that are for really old browsers and stuff... Don't want to do that this early. That will have to be a backup plan..

I googled it many times but have not found a solution that works for me...

Simple redirect script

If you want to redirect your users to another URL when they press the "Save" button inside a list form, then just add the following in the link to the form:

/lists/yourlist/newform.aspx?Source=/thankyou.aspx

I usually use relative url's as in the example, but you may also write the whole URL of course...

Great!

Friday, April 24, 2009

SP2 on its way....

Service Pack 2 for Microsoft Office SharePoint Server 2007 and Windows SharePoint Services 3.0 due to ship April 28th. Office Service Pack team announced Service Pack 2 for Microsoft Office SharePoint Server 2007 and Windows SharePoint Services 3.0 would be available on April 28th. It provides many fixes and performance improvements, as well as some new features. Also with the new service pack, Internet Explorer 8 will be added into browser support matrix as level one, and Firefox 2.0 and 3.0 as level two.

Hmm will wait a while before I install this, to see what happens after... Always brings some new "features" :)

Event 2436 returns no search results

All of a sudden the search stopped working on a MOSS 2007 server. Looked into Event Viewer and found the error message:

Event Type: Warning
Event Source: Office Server Search
Event Category: Gatherer
Event ID: 2436
Date: 24-04-2009Time: 13:29:31
User: N/A
Computer: DKxxx001
Description:The start address <http://xxx> cannot be crawled.
Context: Application 'SharedServices1', Catalog 'Portal_Content'
Details: Access is denied. Check that the Default Content Access Account has access to this content, or add a crawl rule to crawl this content. (0x80041205)

No changes have been made to the server, no accounts have been locked out or password has changed. First thing I did was to restart the Office Sharepoint Search Service. Did not help. Re entered the password for the Default Content Access Account. Did not help. Googled it. Found an article on Microsoft that you should enter the following in your registry:

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\Lsa3)
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 (now that I did not have to do! It worked immediately)

That helped!! Now the full crawl is crawling and all is well. Now I can really enjoy todays after work in the sun :=)

Monday, April 13, 2009

SharePoint BestPractices

I visited the SharePoint Best Practices UK in London last week and it was a really great conference with lots of interesting seminars. It was hard to select which seminars to attend, I wanted to go to them all! But I decided to pick one from each track, there were IW, BA, Dev and IT-Pro tracks. One of the news that many talked about was of course that SharePoint Designer now is free of charge and can be downloaded by everyone - hmm both good and bad! There are many creative persons out there :) One thing I found out during those seminars was that I pretty much work according to best practices! That was great news for me, as I have mostly worked alone with SharePoint and have not had any collegues to share ideas with. It's a big challenge to work like that, and you must learn everything the "hard way" but you get a bigger understanding of how the platform works and how it is connected with other systems and areas. Which is of huge importance when it comes to planning a customers platform and capacity.


But the most important thing for me was to meet all those interesting and fun people who are as geeky SharePointers as my self :) And they came from both Armenia as well from the US.. :D

I had a great time and I want to thank Combined Knowledge for a well planned event and excellent conference area (and all the fun stuff in the evenings, all from casino tables to fine dinners :))!!

Cheers!


Wednesday, March 25, 2009

SharePoint Online!

I got an account to SharePoint Online (with mr Z's song ringing in my head)! And of course you want to change to a new master page to get rid of the ugly boring usual interface. Easy. Just open SD and enter the URL to the site. Change to your customized master page and you are back to the old days when all customization took place in SharePoint Designer. And I who just got rid of that and only brands via site def's now. Hmm.

One thing happened when I changed to a new master page: You must enter a line of code inside the Body tag to link to the Privacy Statement for Online Services, otherwise you will get an error on your Default page:




Follow the link that is displayed with the error:

http://www.microsoft.com/online/help/en-us/bpos/index.html?page=html%2F73de6bbf-dadd-48dc-b2e6-01c7724e9d7f.htm


Copy the line of code on this page:




Put it inside the Body tags on your customized master page (I used one of the four samples that you find here. I have used those templates before and they are nice to start with if you want even more customizations and branding on your site):





Save your changes and there you go:




I guess you can always hide those links within a div tag with the display:none set if you don't want them on your page (they are listed up in the top left corner on your default page).

IE 8 and compatibility view

I installed Internet Explorer 8 yesterday - yeah a bit late, I know :) Entered a customers site that I have built on MOSS and paniced a little when I found out that the drop down menus where... white!! No, not again. Not another strange issue with my customized drop down menu... the last time I had issues with the menu was in the Safari browser and then I had to do this. .... Hm, then I thought about a setting that I had checked when installing IE 8 and that was the compatibility view setting. That if a site has been built for older versions then you could enable this view to make the site look better (well, in my case - worse!). So by simply disable the compatibility view, the drop down menus looked alright again. Phew....

This is how the drop down menu looked like while the browser had Compatibility View enabled:



There is a new button to the left of "Refresh" in your address bar when you enable this view:



When you enable it, it gives you the following message:



I simply clicked on the button for Compatibility View and the menu looked normal again:



So I right clicked on the toolbar in IE 8 and disabled the compatibility view.

Wednesday, March 18, 2009

No results matching your search were found

A search on "All sites" returns results, but when you select the "This site: xxx" no results are returned:






Match your default zone url in Alternate Access Mappings with the url used in the Content source, then you will fix this issue.

A clarification: This issue concerned a MOSS server, not a WSS installation.

Part 2: Search issues

This is the rest of the story regarding Search issues

Problem: the customer has a server farm (the platform is one SQL, two WFE with MOSS 2007) and NLB running. When accessing one of the servers, the Search Box is missing. This is what the customer reported to me, and where my troubleshooting started.

Summary: Resolving a database schema mismatch after applying Security Update KB 956716

So, I had tried to reset the content index on the WFE in the server farm. But that crashed and I got into a real mess where I restarted the search services, reset the passwords on all search accounts, etc. Nothing helped me so that I could perform a Full crawl again. I got a lot of errors within Search Settings and finally what happened was that when I clicked on Full Crawl it only jumped back to "Idle", so nothing could trigger the Full crawl.

Then I discovered the real issue: on the WFE where Search box was disabled, a patch for SharePoint had been installed. No one knows why that patch was installed, probably it has been downloaded and installed along with some other updates. So, there was a mismatch in patches since the KB956716 only was installed on one server and not on the other (as you can see, it is divided into three instances - strange):



So, I ran the Sharepoint Configuration Wizard. That was successful, and the search box came back! Success I thought and ran a Full Crawl. Everything was working perfectly. The morning after I tested the search again... No results!! Hm, what had happened during the night?? Looked through Event Viewer and there were some error messages saying that there was a database error:

Event Type: ErrorEvent Source: Office Server SearchEvent Category: Gatherer Event ID: 10036Date: 18-03-2009Time: 14:00:07User: N/AComputer: Dxxxx001
Description:A database error occurred.
Source: Microsoft OLE DB Provider for SQL
ServerCode: 4060 occurred 1 time(s)
Description: Cannot open database "SharedServices2_Search_DB" requested by the login. The login failed.

So I installed the kb on the search server as well, but the first time the server hung and we had to restart it. Then I ran the kb installation again and success this time. Restarted the server. Ran the configuration wizard. and it was successful. Started CA and Search settings and tada, there was a new link, Search Administration which is the same link that you get when you install the infrastructure upgrade.Performed a full crawl.... and yes! It started!

Conclusion: always make sure your server farm has a "patch match" :) And always run the Config Wizard after a patch has been installed, then all will work fine.

Tuesday, March 17, 2009

Attempted to read or write protected memory

I have installed WSS 3 and Search Server Express on a Windows Server 2008 machine. No problems with that, all is fine. But today I found that three errors were logged in Event Viewer. They are:

Event ID 6398
Event ID 6482
Event ID 7076



Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchAdminSharedWebServiceInstance (02203890-d48f-4db7-9704-017c33fe14ff).

Reason: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Techinal Support Details:

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at System.DirectoryServices.Interop.UnsafeNativeMethods.IntADsOpenObject(String path, String userName, String password, Int32 flags, Guid& iid, Object& ppObject) at System.DirectoryServices.Interop.UnsafeNativeMethods.ADsOpenObject(String path, String userName, String password, Int32 flags, Guid& iid, Object& ppObject) at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) at System.DirectoryServices.DirectoryEntry.Bind() at System.DirectoryServices.DirectoryEntry.get_IsContainer() at System.DirectoryServices.DirectoryEntries.CheckIsContainer() at System.DirectoryServices.DirectoryEntries.Find(String name, String schemaClassName) at Microsoft.SharePoint.Metabase.MetabaseObjectCollection`1.Find(String name) at Microsoft.SharePoint.Metabase.MetabaseObjectCollection`1.get_Item(String name) at Microsoft.SharePoint.Administration.SPProvisioningAssistant.ProvisionIisApplicationPool(String name, ApplicationPoolIdentityType identityType, String userName, SecureString password, TimeSpan idleTimeout, TimeSpan periodicRestartTime) at Microsoft.SharePoint.Administration.SPMetabaseManager.ProvisionIisApplicationPool(String name, Int32 identityType, String userName, SecureString password, TimeSpan idleTimeout, TimeSpan periodicRestartTime) at Microsoft.Office.Server.Administration.SharedWebServiceInstance.Synchronize() at Microsoft.Office.Server.Administration.ApplicationServerJob.ProvisionLocalSharedServiceInstances(Boolean isAdministrationServiceJob)

I have not noticed any errors inside of SharePoint or that any functions are corrupt. The only issue I found was that my scheduled task for the Backup has not run as it should.

Found this article today, and I will probably not install the hotfix until other issues inside SharePoint are reported. The customer runs a Sharepoint agent within Backup Exec which should take care of the backup task issue.

Monday, March 16, 2009

AvePoint Migration tool

Today I tried out the Migration Tool from AvePoint, for migrating data from Lotus Notes to SharePoint. And I was impressed, very easy tool to use and simply drag and drop a view from Notes onto either a list or document library (or whatever template you will use).

So what you must do is to install an agent on your Notes client machine and an agent on the SharePoint server and install DocAve Manager (a web app). Make sure they are able to communicate through the ports that are set in DocAve Manager and go for it! As a former Lotus Notes developer and administrator (yes I converted to MS in 2003 hehe) I am used to the Notes UI and I found it very easy to browse through the databases on the Domino server, select the view you want to migrate and just drag and drop that view onto a new list or library in SharePoint. There were some minor issues with the Notes.ini and .id file, but if you are familiar with those then it should be no problem. One thing, you cannot select the user id with which you are using in the Notes client so inside the notes.ini on the line where it displays which ID file to use, make sure it differs from the one you use on your Notes client.

You may map Notes fields to SharePoint columns (create content types) and you may also map ACL against the permission levels inside of SharePoint.

Luckily, this customer is not using Notes applications with any kind of code behind so there were no functionality needed to migrate, only documents and forms. It would have been a lot more complicated to migrate an application from Notes with buttons that triggers DBLookups, code, scripts, workflows and so on. So that part is not tested.

And one other thing, you are able to refine the ACL on a Notes database with roles. That is, you may hide or disable certain functionality depending on which role you assign a user or a group to extend a permission. I am not sure how AvePoints tool handles that kind of permissions.

But as a pure migration tool for attachments and forms, I can really recommend this product! I did take a look at Microsofts own migration tool, but that seemed very complicated and you must write your commands in a DOS Shell prompt.

So the result inside of SharePoint? Yes the list got its fields from the Notes form, great. And the document library listed all embedded files. Two different approaches, with a really nice result.

Sunday, March 8, 2009

Part 1: Search issues.. again

Search had gone to status "Computing ranking", happens every now and then. Usually a Full crawl makes the index work again, and status changes to Idle, but sometimes you have to perform the "Reset all crawled content". Did that on a server yesterday, but this time the action hung and I got an error message due to a timeout in the connection. So, I opened services and stopped the Windows Sharepoint Search, worked fine. Tried to stop the Office Server Search, but that resulted in an error message due to a timeout..... Yuk. To do something and trying not to panic, since this is a production environment (of course...) I started the WSS Search again - worked. But the service Office Server Search still had the status "Stopping". And you cant stop it, not in Services and not in CA under Services on server. Now when I click on "Search settings" in CA, I get the message "The gatherer is shutting down". And there you go... stuck.
So my plan for tomorrow is the following:
- First, check out the Timer Job Definition to delete it there (if it is listed)
- Edit all passwords and re enter them on Services page and on the Services in Control Panel
- Make sure that the accounts are admins where they are supposed to be Admins
- If none of those works, I will setup a new SSP and associate my web apps to that. That should do it.
Now, I need to find out why the search hangs sometimes and gets into the "Computing ranking" state. I have had that problem on many servers, it might have to do with performance, timeout against the backend, password changes on the service accounts, and so on...
I hope that my fix list will be successful tomorrow!

Monday, February 9, 2009

Search and Basic Authentication

We wanted to add a Default Domain so that the users did not have to enter a domain name to logon to our site. Did that, using Basic Authentication and added our domains on the IIS site. Fine, worked perfectly - the user only had to enter the username and password to logon. Fine. But.... when you win some you loose some... then my Search stopped working and Event Viewer filled up with the following error:

Event Type: WarningEvent Source: Windows SharePoint Services 3 SearchEvent Category: Gatherer Event ID: 2436Date: 2009-02-09Time: 09:15:02User: N/AComputer: xxxDescription:The start address cannot be crawled.
Context: Application 'Search index file on the search server', Catalog 'Search'
Details: Access is denied. Check that the Default Content Access Account has access to this content, or add a crawl rule to crawl this content. (0x80041205)

Riiiight. What is your first thoughts on this error? Well, you update all passwords on the search account. On the services, on the Search settings, you check that the account has rights on your SQL server and so on... Until you realize that is has got nothing to do with permissions on the account. Must be something else that stops the crawl from working.

So I extended the site and used Windows Authentication. Search is working! So.. after endless testing back and forth it started to clear for me what was wrong.. Basic Authentication cannot be used as Default zone? During this weekend I came up with a solution that I tried today and that was successful! I did the following:

I have a web application on a site with SSL. Authentication provider is set to use Basic Authentication and on the IIS site I have entered a default domain.
I extended that web application to a site with Windows Authentication and select a zone for it, I chose Intranet. Now this is the site that the search will crawl, otherwise it cannot authenticate and it gives you the 2436 error message.
So therefore this site must be in the Default zone.
Enter Alternate Access Mappings and change places for your Default and Intranet Zone.
IISreset
Wait 5 minutes (or whatever timer you use for the indexer) and... wow!
Search is working!!!
And since our load balancing servers are using the site with SSL, then I do not have to use a host header on any of the web applications - it uses the 443 port anyhow.

Now the challenge is to install Search Server Express 2008 once again, as a single server deployment. To be continued....

Thursday, February 5, 2009

Search Server Express 2008 on a WSS farm NO NO

That will NOT work! Even if it says so when you read about it... or does it? Quite unclear information on MS pages I would say. But after having installing, trying to make it work, uninstalling, and install again I finally got an answer to why it didn't work:


So, do NOT install the advanced option of Search Server Express 2008 if you have a WSS 3 server farm. It will NOT work! So bad for me it had to take 2 days and nights to find that out... I thought that the issue with Search was that we are using Basic Authentication on our sites, since that is a problem as well. My work right now only consists of troubleshooting, errors, ugly sessionstate errors in web.config files etc. Read article on issues with using Basic Auth and Search here:
Now I will try to reinstall SSEX using Basic installation and not the Advanced....

Thursday, January 29, 2009

Installation of Microsoft Search Server 2008 Express

Yes that succeeded today! But not without some issues and error messages, hello what do ya think? I think those who writes the installation scripts are terrorists and they want you to fear heart failure each time you must install something new on the server. :)... To be continued, I will show you the errors and what must be done to get rid of those... but now I must sleep... working for 16 hours now... zzz

Wednesday, January 21, 2009

Edit the welcome-dropdown menu

If you want to remove the "MySettings" from the user dropdown menu (up in the right corner of a sharepoint page) so that it looks like this instead:



Then go to folder:C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\CONTROLTEMPLATES
Make a copy of welcome.ascx!
Then open the file Welcome.ascx in Notepad
Add the following attribute to each element you wish to hide:Visible="False"
For example:

SharePoint:MenuItemTemplate runat="server" id="ID_PersonalInformation"
Text="(%$Resources:wss,personalactions_personalinformation%)"
Description="(%$Resources:wss,personalactions_personalinformationdescription%)" MenuGroupId="100"
Sequence="100"
ImageUrl="/_layouts/images/menuprofile.gif"
UseShortId="true"
Visible="False"

Coolish!

Tuesday, January 20, 2009

Activate flyouts in WSS 3 menu

If you want to activate your TopNavigation with flyouts, edit the following code in your masterpage (I am not able to enter code directly onto the page so that is why I always must create an image of code in my blog, irritating. Click on it for larger image):


Thursday, January 8, 2009

Forms authentication using the AD

I am setting up an extranet site where the customer wants the user to be logged out after a certain idle time. Since there is no way to make the user logged out using windows authentication, for logical reasons, then I must activate forms authentication. But I dont want to have yet another user register like in a SQL db, so therefore I must activate it against the AD. So this is what I did:

Locate the web.config file that belongs to your site in the virtual directory (you find the path in your IIS site):



Make sure you backup your web.config file first! Locate the configSections tag. You can remark the authentication mode for windows, and instead enter this code:


These steps must be performed both in your sites web.config, and also in the web.config that belongs to the Central Admin site. Locate the tag system.web and add the following LDAP connection string to your Active Directory:


Also add the following section under the system.web tag:


Actually, I removed the connectionUsername and connectionPassword lines from my web.config since that file is quite unprotected on the server and you don't want the Administrator password out!! So if you remove those lines, the application pool user account will be used instead. So you must make sure that the account has rights on your AD.

Then in CA you go to the Authentication Provider link, select your site, click on the zone you would like to activate it on, and select "Forms" instead of "Windows".

Do an iisreset and you should have a login page on your site now: