New memory leak in Sharepoint

posted by eric van Glabbeek
Feb 9

As every developer should know m the SPSite and SPWeb objects have problem resulting in memory leaks. On the background they call “unmanaged code”. so when using SPSite objects or SPWeb objects in your code, always use ways to dispose these object (think of try-catch and using).

there is even a tool to check if you really dispose all the necessary object (link)

But today i saw an article that told me there is another memory leak problem.

Look at this article of Todd Carter to see more of it, he call’s it : SharePoint’s Sasquatch Memory Leak


BDC picker empty…. why ?

posted by eric van Glabbeek
Feb 8

Last week i had to do some maintenance for a customer.
During this maintenance we had serious trouble with the bdc-definition.

We started out because the customer had serious performance issues. We decide to change 2 things, just for the test.
One of them was > recreate the Shared Service Provider

During installation someone installed the SSP on the default webapplication (port 80).
So now the SSP is part of the portal.

We decided this was not a good situation and started planning for a migration.
First, gather all current information about the SSP and check what will be lost and what not.

One big thing at this customers place is that we use a BDC that is vital for the working of the portal.

So we tested in a "test environment" and if we export the application definition file and import it into the new SSP , everything should continue to work. (we had some custom pages that rely on this bdc-file)

First issue : When ssp is configured to use with the default webapplication, the only way to add the default webapplication to the new SSP is to remove the original SSP. Hmm, i didn’t like that, because we might need some information afterwards. But we decided to continue and deleted the SSP (remember : removing the ssp from the default webapplication will NOT remove the webapplication, retaining the default portal)

As it seems everything was working, ……. until we checked the BDC .

After re-importing AND resetting the security> the application was not working !
Checking every website in the google universe , we never found a solution.

The bdc-file was imported correctly, we could set permission on it AND we could see all settings.

But when using the BDC-picker tool, our application was not visible.  :-(
At this moment we were getting desperate, until we found somewhere a note of someone (i really don’t know where) that it could be search related.

And one thing we hadn’t done yet was: Start up search. Because of the impact we decided earlier that day to wait until the weekend. We decided to start the search and wait until the weekend passed.

AND GUESS WHAT : the bdc was working as intended.

what is the bottomline of this story : somehow BDC is relying on a working search environment. Some make sure you run a full crawl to the end, before starting to troubleshoot BDC-related problems.

In our situation: the search had never run before. (Search is part of the ssp)

Hope this will help others,

Kind regards,

Eric


Dec 10

Ok, so i was aked to program against the userprofileproperty choicelist.

The choicelist is the property of a userprofileproperty, when the userprofileproperty is a choicelist (sounds logic, not ?)

First i created a user profile property of the type choicelist.
I created a piece of code to connect to the userprofiles and retrieve the specific property. After retrieving the property, i retrieved the values of the choicelist.

Unfortunately, these values are “simple” strings without any form of ID. At least, not through the api.

I had the property object, next thing > add the value(s) AND don’t forget : programmed the commit.

I ran the code, and no errors, however, also no added values.

After some debugging and digging, i found out that adding value to the choicelist is not considered a change for profileproperties.

Funny ? NOT!

Then let’s create a workaround. Before committing , i programmed some code that forces the state of the property to : changed.
That way the values where added together with the change that in fact, wasn’t a real change.
Please notice the portion regarding the description :-)

                ServerContext sc = ServerContext.GetContext(curSite);
                UserProfileManager upm = new UserProfileManager(sc);

                Property p = upm.Properties.GetPropertyByName(Propertyname);
                p.ChoiceList.Add(Value);
                string descript = p.Description;
                p.Description = "";
                p.Description = descript;
                p.Commit()

after using this addition, the values where added succesfully to the property.

Hope this might help others.

Eric



Yes !

it’s finally there.

SharePoint Public Beta Resources

Where can I download SharePoint 2010 public beta?
You can download SharePoint and Office 2010 public beta from http://www.microsoft.com/2010

Is the SharePoint public beta supported?
The SharePoint public beta is not supported. However, we recommend looking at our resources listed above and asking questions in the SharePoint 2010 forums.

When is the final release of SharePoint and Office 2010?
We are planning to release SharePoint and Office 2010 in the first half of calendar year 2010.

Will there be a migration path from SharePoint public beta to final release?
We do not plan to support a SharePoint 2010 public beta to release bits migration path. The SharePoint 2010 public beta should be used for evaluation and feedback purposes only.

If I’m on SharePoint 2007, how do I get ready for SharePoint 2010?
Take a look here for getting ready guidance.

Is there a downloadable SharePoint 2010 VHD?
We plan to make a VHD available for download sometime in the future. We will announce its availability on our team blog.

How do I get trained on SharePoint 2010?
Please review the Getting Started page, the  IT Professional learning guide , the Developer learning guide , and the End User resources to ramp up on SharePoint 2010.


Nov 5

I had a problem writing to the eventlog.

I got a message telling me i don’t have write access. I couldn’t believe that, since under normal circumstances everyone could write to the application log. At least, that’s how it should be.

Searching the internet i found this blog.

bottomline: use elevated permission for writing to the application log
Eric


Nov 2

Microsoft  has some nice snacks:  Microsoft Learning Snacks

the come in several flavours, but one of them is : Microsoft SharePoint Server 2010

there are 3 Sharepoint 2010 snacks

  1. Developing Solutions with Microsoft SharePoint Server 2010 (20 minutes)
    Microsoft SharePoint Server 2010 enables developers to build rich solutions easily, rapidly, and efficiently. This Learning Snack demonstrates how you can use Microsoft Visual Studio 2010 to create and deploy your solutions. It also demonstrates how you can build Microsoft Silverlight applications by using the SharePoint 2010 client object model, and how you can use LINQ to SharePoint to create SharePoint entities.
  2. Experiencing the Microsoft SharePoint Server 2010 User Interface (20 minutes)
    Microsoft SharePoint Server 2010 includes an enhanced user interface that provides IT professionals with a streamlined administration experience. This Learning Snack describes the features of the SharePoint Server 2010 user interface. It demonstrates how the new Central Administration console enables you to perform several administrative tasks from one central location. The Learning Snack also describes how shared application architecture can be used for flexible deployments in SharePoint Server 2010.
  3. Managing and Troubleshooting with Microsoft SharePoint Server 2010 (17 minutes)
    Microsoft SharePoint Server 2010 facilitates administration by providing several tools that help IT professionals efficiently manage data and troubleshoot any issues. This Learning Snack describes the Large List Resource Throttling feature, which helps you manage large lists. It demonstrates how a Microsoft SQL Server logging database can be used to log SharePoint events. The Learning Snack also demonstrates how the SharePoint Best Practices Analyzer can be used to detect and automatically fix common issues.

other snack-tastes are :

    bon appetit.

    Eric


    New Sharepoint 2010 Certification

    posted by eric van Glabbeek
    Nov 2

    SharePoint 2010 Role-Based Learning Resources and Future Certifications (source Microsoft Partner site)
     
    Future SharePoint 2010 Certification Opportunities for IT Professionals: Coming in June 2010
    Certification Path for IT professionals
    • 70-667 TS: Microsoft SharePoint 2010, Configuring
      Microsoft Official Curriculum: Will cover configuration of SharePoint 2010 including deployment, upgrade, management, and operation on a server farm.
    • 70-668 PRO: SharePoint 2010, Administrator
      Microsoft Official Curriculum: Will cover advanced SharePoint 2010 topics including capacity planning, topology designing, and performance tuning.
     
    Certification Path for Developers
    • 70-573 TS: Microsoft SharePoint 2010, Application Development
      Microsoft Official Curriculum: Five-day instructor-led course designed for developers with six months or more of .NET development experience. Course covers what you need to know to be an effective member of a SharePoint development team using Visual Studio 2010.
    • 70-576 PRO: Designing and Developing Microsoft SharePoint 2010 Applications
      Microsoft Official Curriculum: Five-day instructor-led training course designed for development team leads who have already passed the Developing on SharePoint 2010 technical specialist exam. The course covers choosing technologies for and scoping a SharePoint project, best practices for SharePoint development, configuring a SharePoint development environment, advanced use of SharePoint developer features, and debugging of code in a SharePoint project.

    Eric



    Look at this page for a great article about storage.

    The guy writing it, is a good friend of mine with some good insights about data, storage and everything that is connected with it.
    During discussion about storage we always find area’s to talk about.

    Everyone that is working with sharepoint should consider the data growth.

     

    eric



    For all you out there wondering what SharePoint Foundation 2010 means,

    it’s the new name for Windows Sharepoint Services

    But now we are talking about Sharepoint Foundation 2010, what is new ?
    [This documentation is preliminary and is subject to change. source: Microsoft]

    • Alerts Enhancements : Microsoft SharePoint Foundation 2010 expands the alerts framework to enable users to have alerts sent as Short Message Service (SMS) messages to their mobile devices.
    •  Business Connectivity Services : Business Connectivity Services (formerly named the Business Data Catalog) provides read/write access to external data from line-of-business (LOB) systems, Web services, databases, and other external systems within Microsoft SharePoint 2010. SharePoint 2010 has product features that can use external data directly, both online and offline. Developers can gain access to a rich set of features and rapidly build solutions using familiar tools such as Microsoft Visual Studio 2010 and Microsoft SharePoint Designer 2010. Microsoft Business Connectivity Services (BCS) enhances SharePoint application capabilities and their UI through features, services, and tools. These enhanced capabilities and UI streamline development of solutions with deep integration of external data and services. Power users, developers, and business unit IT professionals can integrate assets from external systems and enable interaction with the external data through many types of applications. The Business Connectivity Services feature set enables rapid development and deployment of scalable and security-rich solutions.
    • Client Object Model : Microsoft SharePoint Foundation 2010 introduces three new client APIs for interacting with SharePoint sites: from a .NET managed application (Microsoft® .NET Framework 3.5 or later), from a Silverlight application (Microsoft® Silverlight™ 2.0), or from ECMAScript (JavaScript, JScript) that executes in the browser. These new APIs provide access to a subset of the types and members that are contained in the Microsoft.SharePoint namespace of the server-side object model.
    • Events Improvements : Microsoft SharePoint Foundation 2010 supports multiple new events, including on-create events for lists and Web sites and support for synchronous after events. Many of the new events are available in both synchronous and asynchronous modes. SharePoint Foundation offers a more approachable events infrastructure that is easier to program against than earlier versions.
    • Microsoft Synch Framework : The Microsoft Synch Framework in SharePoint Foundation is a comprehensive and unified synchronization architecture that provides data-agnostic and bidirectional capabilities to developers. Because it was designed to provide cross-application synchronization, implementing the Microsoft Synch Framework allows other Microsoft and third-party applications to synch more easily with SharePoint Foundation 2010 deployments.
    • Mobile Device Development Enhancements : Microsoft SharePoint Foundation 2010 greatly expands access from mobile devices to SharePoint Foundation pages, lists, and functionality.
    • Query Enhancements : Microsoft SharePoint Foundation 2010 includes several new ways to query and filter data.
    • Ribbon : The Ribbon offers new functionality in the Microsoft SharePoint Foundation 2010 user interface. The Ribbon serves as the primary command surface that you can use to interact with objects inside of SharePoint Foundation. In earlier product versions, commands were accessed across multiple surfaces and located in varying menus. With the introduction of the Ribbon, commands are grouped in a logical manner through the use of tabs and groups, making them easy to find. You can also extend the functionality of the Ribbon to include your own custom functions.
    • Sandboxed Solutions : A sandboxed solution is a new concept in Microsoft SharePoint Foundation that allows site collection users to upload their own custom code solutions. A sandboxed solution uses a subset of the Microsoft.SharePoint namespace. These objects are marked in the object model to show their availability in a sandboxed solution. All sandboxed solutions are stored in a solution gallery. In addition, there are facilities provided to help server farm administrators monitor and validate solutions that have been uploaded to these galleries. Performance can be monitored by measuring CPU execution time, memory consumption, and database query time. You can also monitor other aspects of operation including abnormal termination, critical exceptions, unhandled exceptions, and data marshaling size.
    • Service Application Framework : The Service Application Framework provides a platform that allows developers to build scalable middle-tier applications that are hosted in Microsoft SharePoint Foundation 2010 and that provide data or processing resources to other SharePoint features. The Service Application Framework enables services to be shared between computers on a server farm; it also helps load balance and manage services in SharePoint. The Service Application Framework provides over 20 services that are built into the core product. For example, SharePoint Search is implemented by Service Application Framework. The Service Application Framework is an API provided by back-end application servers and consumed by front-end Web servers.The Service Application Framework replaces the Shared Services Provider in Microsoft Office SharePoint Server 2007.
    • Silverlight Integration and the Fluid Application Model : In Windows SharePoint Services 3.0, you could host a Microsoft Silverlight application in a Web Part. Microsoft SharePoint Foundation 2010 goes beyond by providing a built-in, extensible, Silverlight Web Part specifically designed to host Silverlight applications. Closely related to the new Web Part is the Fluid Application Model (FAM) that enables secure, cross-domain, integration between external applications and SharePoint Foundation deployments.
    • UI Improvements : The user interface (UI) in Microsoft SharePoint Foundation has been upgraded significantly. This includes the introduction of the Ribbon, a revamped master page, and new cascading style sheets (CSS). Each of these enhancements creates a more consistent experience for users across pages and makes it easier to work with objects inside SharePoint Foundation.
    • Windows PowerShell for SharePoint : Windows PowerShell™ command-line interface is a new command-line tool and supporting scripting language from Microsoft that complements Cmd.exe in the Windows administration context. In the SharePoint administration context, Windows PowerShell supersedes the Stsadm.exe administration tool. Moving forward, you should use Windows PowerShell scripting technology to develop any new command-line scripts in SharePoint Foundation 2010.
    • Workflow Improvements : In Windows SharePoint Services 3.0, the Windows Workflow Foundation provided a highly extensible workflow model to the SharePoint platform. Microsoft SharePoint Foundation 2010 continues to build upon the functionality available in Windows SharePoint Services 3.0 and improves and expands your options so that you can build rich workflows that can accommodate even more complex business scenarios. This topic presents the new features that are available for workflows in SharePoint Foundation 2010.

     

    Just so you all know :-)

     

    eric


    Oct 30

    In one of the teams i’m working, we had an issue with double-hop.

    When using NTLM and several servers need to be connected, this could be an issue.
    Example: when you use 2 web front ends in combination with forms, everything is allright.
    But, when the form uses webservices for collecting information, you could run into the double-hop problem.

    Standard: NTLM will only authenticated between 2 computers, any extra computer will nog be authenticated to.

    Within Sharepoint you can overcome this issue by implementing Kerberos or Single Sign ON.

    Due to the nature of kerberos (delegation of control), we decided to go for Single Sign ON.

    At this moment, single sign on works every now and then, but never without faults and never longer then 4 hours.
    The configuration was cleared every 24 hours (!?)
    During examining the logs and application log, a weird error caught our attention.
    Some more investigating learned that these errors where created during single sign on configuration.

    The error was related to localhost in combination with Alternate Access Mapping.

    How is this possible ?

    The name of out server was (fake name) : mossapp
    we created AAM config lines pointing to mossapp. Everything is working as intended (including central administration)

    All sites go to the right host(header).
    But single sign on complains about not finding Localhost.

    So we added localhost to the AAM pointing to mossapp.

    And guess what : the errors where gone !

    At this moment the configuration is no longer cleared, but unfortunately, single sign on is still not working as intended.
    although, if it’s working, it works for at least 8 hours.

    Anyone ideas about this issue ?

    eric