WSSADMIN.EXE and OWSTIMER.EXE Memory Leaks
Windows SharePoint Services Administration (WSSADMIN.EXE ) and Windows SharePoint Services Timer (OWSTIMER.EXE ) are processes which always take up most of the memory on my Dev Env. SharePoint App Pools and SQL Server do take lots of memory but I do IISRESET very often and SQL Server is also very reasonable but WSSADMIN.EXE and OWSTIMER.EXE really consume ridiculous amount of memory.
MindSharp team has an stsadm extension for resetting OWSTIMER
Spencer Harbar has a good tool to recycle Application Pools (Screenshot below), I wish in future releases it could be extended to include WSSADMIN.EXE RESET and OWSTIMER.EXE RESET ... but until then a batch file with below commands will do it.
net stop "Windows SharePoint Services Timer" net start "Windows SharePoint Services Timer" net stop "Windows SharePoint Services Administration" net start "Windows SharePoint Services Administration"
Wednesday, September 26, 2007 | 0 Comments
Configuring DotNetNuke Portal to use other than Port 80
I remember when I first started playing with DNN about 3 years ago, it was such a pain to make DNN WebSite work on a not standard Port number (other than 80), because of this reason I always used host headers for DNN development Env. (Windows 2k3 Server).
The problem is when you change the Portal Alias and add a port, and try to access the portal you will have a never ending loop of redirection
If you use Internet Explorer (any version) : you will see your worker process takes 100% CPU and take up all memory and recycles itself.If you use Firefox : it show a below friendly message
The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
* This problem can sometimes be caused by disabling or refusing to acceptcookies.
Solution :Simple add below element to your web.config (within <appSettings>)
<add key="UsePortNumber" value="True"></add>
Wednesday, September 26, 2007 | 2 Comments
SharePoint Search deletes HOSTS file and then throws HOSTS file not found error
Today I found this weird error message in my MOSS Server Event Logs. I just don’t understand why is SharePoint Search Admin Job is calling ‘System.IO.FileInfo.Delete()’ on hosts file.
Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchServiceInstance (e9de7a85-9375-431c-b48b-b1ef522b6f65).
Reason: Access to the path ‘C:\WINDOWS\system32\drivers\etc\HOSTS’ is denied.
Techinal Support Details:
System.UnauthorizedAccessException: Access to the path ‘C:\WINDOWS\system32\drivers\etc\HOSTS’ is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileInfo.Delete()
at Microsoft.Search.Administration.Security.HOSTSFile.CleanupDedicatedGathering(Hashtable HOSTSFileMappings, StringBuilder HOSTSComments, IEnumerable obsoleteHosts, String dedicatedName, Boolean isDirty)
at Microsoft.Search.Administration.Security.HOSTSFile.ConfigureDedicatedGathering(SearchServiceInstance searchServiceInstance, SPServer dedicatedWebFrontEndServer, IList`1 previousWebApplicationHostNames)
at Microsoft.Office.Server.Search.Administration.SearchServiceInstance.SynchronizeDefaultContentSource(IDictionary applications)
at Microsoft.Office.Server.Search.Administration.SearchServiceInstance.Synchronize()
at Microsoft.Office.Server.Administration.ApplicationServerJob.ProvisionLocalSharedServiceInstances(Boolean isAdministrationServiceJob)For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Out of curiosity I backed up hosts file and then gave ‘everyone’ full permissions to the hosts file then after some time I see this error message
Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchServiceInstance (e9de7a85-9375-431c-b48b-b1ef522b6f65).
Reason: Could not find file ‘C:\WINDOWS\system32\drivers\etc\HOSTS’.
Techinal Support Details:
System.IO.FileNotFoundException: Could not find file ‘C:\WINDOWS\system32\drivers\etc\HOSTS’.
File name: ‘C:\WINDOWS\system32\drivers\etc\HOSTS’
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize)
at System.IO.FileInfo.OpenText()
at Microsoft.Search.Administration.Security.HOSTSFile.ParseHOSTSFile(Hashtable& HOSTSFileMappings, StringBuilder& HOSTSComments)
at Microsoft.Search.Administration.Security.HOSTSFile.ConfigureDedicatedGathering(SearchServiceInstance searchServiceInstance, SPServer dedicatedWebFrontEndServer, IList`1 previousWebApplicationHostNames)
at Microsoft.Office.Server.Search.Administration.SearchServiceInstance.SynchronizeDefaultContentSource(IDictionary applications)
at Microsoft.Office.Server.Search.Administration.SearchServiceInstance.Synchronize()
at Microsoft.Office.Server.Administration.ApplicationServerJob.ProvisionLocalSharedServiceInstances(Boolean isAdministrationServiceJob)For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Update : According to the Technet article you don’t have to add any specific permission om the MOSS server. But The account need to be able to add some entries to the host file for search purposes.
Apparently COMPUTER\WSS_ADMIN_WPG is suppose to have Modify permissions on the HOSTS-file, which fixes this problem. more info
Update 2 : I tried giving modify access to “WSS_ADMIN_WPG”, but it still didn’t solve the issue. My Hosts file is gone and am left with “Could not find file ‘C:\WINDOWS\system32\drivers\etc\HOSTS’.” errors in event log.
Tuesday, September 25, 2007 | 1 Comments
IIS (Un)Friendly Error Message
This is a funny error message from CodeProject, being a Microsoft Developer centric website didn't expect this error message from them.
Thursday, September 20, 2007 | 0 Comments
The Office SharePoint Server Enterprise feature is not activated on this site. Activate the feature to use Business Data columns.
I never created a Business data type field using List Settings Interface (for some reason I always created custom lists by creating list definitions, Schema.xml) Last time when I tried to create a field using List Settings Interface. I got this weird error message.
Just enable "Office SharePoint Server Enterprise Site features" feature on the site level and "Office SharePoint Server Enterprise Site Collection features" feature on site collection level.
Note : You need Enterprise Edition of MOSS to enable this feature
Thursday, September 20, 2007 | 0 Comments
TortoiseSVN Tricks
Lately I am avoiding VSS for all my new projects and using only Subversion + TortoiseSVN, the speed is really awesome. Some of the issues I had was with TortoiseSVN was
-
By default read-only attribute is not set when I Lock or Unlock files
This can be changed by setting svn:needs-lock property in project settings more info
-
TortoiseSVN adds .svn folder in every project folder, when I zip my project this folder takes so much time & space
This was little tricky, there are options doing this using TortoiseSVN commands but the easiest way is to do
Create a text file called C:\No.SVN.txt, with only one line, ".svn" in it.
XCopy C:\VersionedFoldermore info
C:\UnVersionedFolder /EXCLUDE:C:\No.SVN.txt /E /C /I /F /R /Y
Tuesday, September 18, 2007 | 0 Comments
Tools for Generating MOSS BDC Application Definition files.
I have been using BDC Meta Man since last year, it is a great tool but their trial version doesn’t support Web Services (I prefer web services rather letting MOSS talking to SQL Server directly).
Recently I stumpled upon another interesting tool MOSS BDC Design Studio their trial version (15 days) lets you create application definition files for both Web Services & SQL Server. Though little buggy (esp. if you have multiple entities in your definition) it is really very handy. MOSS BDC Design Studio coupled with XML Notepad 2007 Design made my job easy.
After a long time Microsoft has released their Business Data Catalog Definition Editor, though I didn’t get a chance to test drive, I hope I will be able to edit my existing Definition files with this tool.
Tuesday, September 04, 2007 | 0 Comments
How to remove "Title" column from a Custom List.
“Title” column could be very annoying and confusing esp. if you don’t have any Text based columns in your List (you cannot change datatype of this column) or else while updating lists programmatically. Let’s say you renamed “Title” Column to “Employee Name” (using list settings web interface) but when you try updating this column value programmtically you need to acces the column using its Original Name (”Title”) and not with its Display Name (”Employee Name”). Changing column name through List Settings Page will only update “Display Name” property of the Field.
listItem["Title"] = “Employee Name”;
There is no way to Hide or Delete “Title” Column from List Settings User Interface. You can hide it by deselecting this column in your View but then you cannot edit the item as you wouldn’t have any Column linked to edit menu.
The only way to hide the “Title” Column is by writing a Custom List Definition, remember every Custom List MUST have this column as this is included in the Global ONET.xml (for Type “0″ List).
The best way to hide this column is to include below fields in your List Definition.
<Field ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Name="Title" ReadOnly="TRUE" Required="FALSE" Hidden="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Title">
</Field>
<Field ID="{82642ec8-ef9b-478f-acf9-31f7d45fbc31}" Name="LinkTitle" Hidden="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="LinkTitle">
</Field>
<Field ID="{bc91a437-52e7-49e1-8c4e-4698904b2b6d}" Name="LinkTitleNoMenu" Hidden="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="LinkTitleNoMenu">
</Field>
Remember by doing so you have to implement Edit Menu for one of your required fields for users to be able to edit a List item.
Monday, September 03, 2007 | 0 Comments

