SharePoint 2010 can now provide additional performance and tracing information which is really really helpful if you are trying to debug and troubleshoot issues with page rendering time. It’s called the Developer Dashboard and is pretty easy to enable.
Using the object model:
SPWebService cs = SPWebService.ContentService;
cs.DeveloperDashboardSettings.DisplayLevel = SPDeveloperDashboardLevel.On;
Performance information into this Dashboard using the new SPMonitoredScope class
There are 3 states: on, off or ondemand:
stsadm -o setproperty -pn developer-dashboard -pv ondemand
stsadm -o setproperty -pn developer-dashboard -pv on
stsadm -o setproperty -pn developer-dashboard -pv off
Off = Always off, normal state for production.
On = Always On, best for development only.
OnDemand = The user has the possibility to turn it on or off as needed using the small icon to the upper right hand corner of the page; you click the icon to toggle the dashboard on and off.
Note that this should be one of your first best practices for developing code for SharePoint 2010 – use SPMonitoredScope! This can only serve to help you better understand and manage the performance of your components as you deploy them.
A while back I wrote something on doing Monte Carlo simulations with Web Services and SharePoint. Halfway through I mentioned that Google Pagerank was defined by a Markov chain which in turn was an output of a process called Markov chain Monte Carlo methods. Not that it concerned me but only one person mentioned this, and at that it was a vague mentioning. Huh…
This actually is a big deal. In fact a very big deal. A multi billion dollar deal in fact, as in the case of Google PageRank. Distributed computing has the power to help us solve many things if applied correctly. The “cloud” does not. (A topic for later.) Probably the greatest hurdle in getting people back on track is that this technology has use beyond the scope of most peoples daily lives. For example…
A paper was published in PLoS last week, September 4th 2009, called “Can an Eigenvector Measure Species’ Importance for Coextinctions?” In it the authors state that “PageRank” can be applied to the study of food webs. Food webs are the complex networks of who eats whom in an ecosystem.Typically we’re at the top, unless Hollywood or very bad planning is involved. Essentially, the scientists are saying that their particular version of PageRank could be a simple way of working out which extinctions would lead to ecosystem collapse. A relatively handy thing to have these days… As every species is embedded in a complex network of relationships with others, even a single extinction can rapidly cascade into the loss of seemingly unrelated species. Investigating when this might happen using more conventional methods is complicated as even in simple ecosystems, the number of combinations exceeds the number of atoms in the universe… E.g. a typical lottery which has 8 numbers that can range between 1 and 50 has 39,062,500,000,000 different combinations…
The researchers had to tweak PageRank to it to adapt it for their ecology focused purposes.
“First of all we had to reverse the definition of the algorithm.” “In PageRank, a web page is important if important pages point to it. In our approach a species is important if it points to important species.”
They also tested against algorithms that were already in use in computational biology to find a solution to the same problem. PageRank, in its adjusted form, gave them exactly the same solution as these much more complicated algorithms.
With the right design SharePoint can be an extremely useful, and totally appropriate, interface for accessing and disseminating the inputs and outputs of such an effort. It can store and present this data with all of the requisite benefits one would expect from a collaborative platform. Certainly there’s a world of work involved in doing something like this but the key point is that the right tool for the right job mantra works here. “All” you need is:
- Visual Studio
Only a start but if you are having problems this may help… (As usual “<" has beeen replaced with "< ")
< sitemapprovider="SPContentMapProvider" id="ContentMap" skiplinktext="" cssclass="ms-sitemapdirectional" runat="server">
< id="PlaceHolderTitleBreadcrumb" runat="server" visible="False">
< asp:SiteMapPath ID="siteMapPath" Runat="server"
Microsoft wants to bring BI to the masses and based on customer feedback they decided to put it together with the next version of SharePoint. They have decided to consolidate the scorecard, dashboard and analytical capabilities from Office PerformancePoint Server into Microsoft Office SharePoint Server Enterprise and rebrand them as PerformancePoint Services for SharePoint. Overall an equally good and bad thing in my opinion.
- Good, because it will allow people to use BI with their SharePoint environments.
- Bad, because it will allow people to use BI with their SharePoint environments
Sometimes you just need that “quick” fix for a problem with SharePoint. In this case, yes, you could just hard code it into the master page or you could create your own custom control but editing the MyLinks.ascx file has its benefits too.
- Go to: C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions12TEMPLATECONTROLTEMPLATES
- Make a copy of “MyLinks.ascx” always a good idea…
- Open “MyLinks.ascx” and add the link(s) required e.g. “< href="http://coreboarder.blogspot.com/">My Blog”< / a>
- Save and do an IISRESET
- The new link should appear
On occasion there is a need to persist a session for the duration that a page is in the browser without concern for security. Doing this with .NET / SharePoint is actually pretty easy.
You can hack your way to a solution, which works just fine, by doing the following.
- Add an iFrame / iFrame webpart and link to a custom page.
- In the code behind for the linked custom page put:
private void Page_Load(object sender, System.EventArgs e)
What will this do? Basically seconds before the session is due to expire it will post back to the server. Simples if naught crude? Perhaps. Effective. Definitely.
Or you could add something like this to your master page.
< asp:Timer ID=”tmCheckStatus” Interval=”1800000″ runat=”server”>
< /asp: Timer>
With a code behind resembling:
Protected Sub tmCheckStatus_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles tmCheckStatus.Tick
If b2bGlobal.isUserOnline = False Then
'This is if you use forms authentication
'but I'd say it works equally fine for 'normal' sessions
'Or you can fire a popup or redirect to a page asking the users
'if they want to stay online
Option B example is from here. Needless to say tweaking is required…
This download extends Visual Studio to enable the creation, building, debugging, running and packaging of scalable Web applications and services on Windows Azure. A hot topic to say the least.
In case you are not sure what it is: “Windows Azure is the cloud operating system that serves as the development, run-time, and control environment for the Azure Services Platform.”
And you can get the whole marketing blurb here: http://www.microsoft.com/azure/default.mspx
If you are just getting started with the CTP go here Working with Multiple Web and Worker Roles and here Associating an ASP.NET Web Application (including MVC) as a Web Role.
Download it from here: Windows Azure Tools for Microsoft Visual Studio July 2009 CTP
Copy of text from the link page below
Windows Azure Tools for Microsoft Visual Studio extend Visual Studio 2008 and Visual Studio 2010 Beta 1 to enable the creation, building, debugging, running and packaging of scalable web applications and services on Windows Azure.
Please note that this is a CTP release and should not be used on production systems. Please see the EULA for more details.
New for the July 2009 CTP:
- Support for developing and deploying services containing multiple web and worker roles. A service may contain zero or more web roles and zero or more worker roles with a minimum of one role of either type.
- New project creation dialog that supports creating Cloud Services with multiple web and worker roles.
- Ability to associate any ASP.NET Web Application project in a Cloud Service solution as a Web Role
- Support for building Cloud Services from TFS Build
- Enhanced robustness and stability
Windows Azure Tools for Microsoft Visual Studio includes:
- C# and VB Project Templates for creating a Cloud Service solution
- Tools to change the Service Role configuration
- Integrated local development via the Development Fabric and Development Storage services
- Debugging Cloud Service Roles running in the Development Fabric
- Building and packaging of Cloud Service Packages
- Browsing to the Azure Services Developer Portal
- SSL Certificate selection
- Supported Operating Systems: Windows 7; Windows Server 2008; Windows Vista
- Windows Vista SP1 (when installing on Windows Vista)
- IIS 7.0 (with ASP.NET, WCF HTTP Activation and optionally CGI)
- Microsoft Visual Studio 2008 SP1, Microsoft Visual Studio 2010 Beta 1 or Microsoft Visual Web Developer 2008 Express Edition with SP1
- SQL Server 2005 Express Edition (or above)
- Hotfix: Native Debugging Improvements (not required for Visual Studio 2010)
- Hotfix: Improve Visual Studio Stability (not required for Windows 7 RC or later)
- Hotfix: Support for FastCGI on the Development Fabric (not required for Windows 7 RC or later, or Windows Server 2008 SP2 or later)
1. Go here: C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions12TEMPLATECONTROLTEMPLATES
2. Make a backup copy of MyLinks.ascx
3. Open “MyLinks.ascx” and add the needed link(s)
4. Save and then do an IISRESET
5. The new link should appear