MOSS Ongelmienselvitys Mit nyt kun se ei toimi - PowerPoint PPT Presentation

1 / 33
About This Presentation
Title:

MOSS Ongelmienselvitys Mit nyt kun se ei toimi

Description:

MOSS Ongelmienselvitys - Mit nyt kun se ei toimi? Aku Heikker , Vesa Juvonen ... Vesa Juvonen ... Email: vesa.juvonen_at_microsoft.com. Blog: http://blogs.msdn. ... – PowerPoint PPT presentation

Number of Views:24
Avg rating:3.0/5.0
Slides: 34
Provided by: seminaari
Category:

less

Transcript and Presenter's Notes

Title: MOSS Ongelmienselvitys Mit nyt kun se ei toimi


1
(No Transcript)
2
  • MOSS Ongelmienselvitys - Mitä nyt kun se ei
    toimi?
  • Aku Heikkerö, Vesa Juvonen
  • Microsoft Consulting Services (MCS)

3
Agenda
  • Eri lokien hyödyntäminen ja konfigurointi
  • Debuggaus MOSSssa
  • Best practices kuinka vältän turhia virheitä ja
    hyödynnän alustaa tehokkaasti

4
Who are we?
  • Aku Heikkerö
  • Senior Consultant, Team leader, BPIO Service
    Line, Enterprise Services, Microsoft Finland
  • Member of a worldwide SharePoint Ranger team
  • In Microsoft since 2003. Companies before
    Microsoft ICL, Fujitsu
  • Email aku.heikkero_at_microsoft.com
  • Vesa Juvonen
  • Software Development Consultant, BPIO Service
    Line, Enterprise Services, Microsoft Finland
  • In Microsoft since 2006, started IT studies 1996
    (graduation took a while). Companies before
    Microsoft ICL, Fujitsu, BasWare working as
    Software Architect, Lead Software Development
    Engineer etc.
  • Email vesa.juvonen_at_microsoft.com
  • Blog http//blogs.msdn.com/vesku

5
Problem solving in MOSS
6
Different logs available
  • Event Log
  • System log to track critical errors
  • Monitoring tools usually track this log for
    possible indications of problems
  • Unified Logging Service (ULS)
  • More comprehensive log to track what happens in
    the SharePoint
  • Logging level can be configured based on
    environment

7
Event log
  • All critical errors are raised to event log

8
ULS Log How does it work?
  • Microsoft.Office.Server.Diagnostics.ULS class
    called from the code
  • Unfortunately not public class
  • Depending on the diagnostic logging settings from
    the Central administration, messages are logged
    to disk
  • By default - c\program files\common
    files\Microsoft Shared\Web Server
    Extensions\12\Logs

9
Control logging
  • Can be done from the Central Administration

10
Analyzing ULS logs
  • There are no out-of-the-box tools for viewing the
    logs
  • Multiple community tools however available
  • ULS Log Viewer - http//www.codeplex.com/features/

11
Using ULS log from own code
  • Code example available from the MSDN
  • http//msdn2.microsoft.com/en-us/library/aa979522.
    aspx
  • Integrate the code to your own solution and use
    it from code

12
Logging to ULS
13
Debugging
14
Debugging
  • Code can be debugged using the Attach Process
    approach
  • WSS3.0 Extensions does the trick for you
  • Learn how to do this also manually
  • Theres no way to debug the xml files or site
    provisioning
  • ULS is your best friend maybe goofy friend, but
    good friend

15
Using attach to processmanually
16
Best Practices
17
Utilize feature framework
  • Do not edit Out-Of-the-Box features
  • Take a copy and build your own
  • Everything deployed to MOSS should be
    encapsulated to features if possible
  • What can be done automatically it should
  • All the features deployed within the projects
    should be marked invisible

18
Use Solution packages
  • Always use solution packages
  • Xcopy is not the production proof way to deploy
  • Solution package deployment requires the
    applications pools to be recycled
  • Solution deployment package is nothing more than
    a cabinet package

19
Quality, Quality, Quality
  • Developing and functional testing in Development
    environment
  • Deployment for Quality Assurance environment
    follows Acceptance Testing (done in QA)
  • Production Deployment after the delivery is
    approved ready for production

20
Naming conventions
  • Use project identifier as the naming convention
    for the
  • Feature folders
  • Site definititions
  • WebParts and controls
  • SiteColumns and Content types
  • Search scopes
  • Audiences
  • Solution packages
  • And the list goes on....

21
Test as early as possible
  • Encapsulate v0.1 as fast as possible
  • Test every feature as independent functinality
  • Include test cases for the project documentation

22
What NOT to do when developing on WSS
  • Do NOT modify any SQL database tables or stored
    procedures
  • Do NOT directly query SQL database tables or
    stored procedures
  • Do NOT modify any file WSS installs
  • Few exceptions, like the docicons.xml
  • Do NOT modify xml metadata files after the
    provision has happen
  • Do NOT assume youre running solely with Windows
    Authentication
  • Do NOT assume that youre running on a single
    machine
  • Do NOT assume everyone is an admin

23
Disposing SharePoint Objects
public void GetSPSiteInfo(String strSite)
using(SPSite oSPsite new SPSite(strSite))
foreach(SPWeb oSPWeb in oSPSite.Webs)
ProcessWeb(oSPWeb) public void
ProcessWeb(SPWeb oSPWeb) foreach(SPWeb
oSubWeb in oSPWeb.Webs) ProcessWeb(oSubWeb)

24
Disposing SharePoint Objects
public void GetSPSiteInfo(String strSite)
using(SPSite oSPsite new SPSite(strSite))
foreach(SPWeb oSPWeb in oSPSite.Webs)
ProcessWeb(oSPWeb)
oSPWeb.Dispose() public void
ProcessWeb(SPWeb oSPWeb) foreach(SPWeb
oSubWeb in oSPWeb.Webs)
ProcessWeb(oSubWeb) oSubWeb.Dispose()

25
Caching data Objects
  • public Hashtable GetCachedData()
  • Hashtable oCachedData (Hashtable)CacheCache
    Name
  • if(oCachedData null)
  • oCachedData QueryToGetCachedData()
  • Cache.Add(CacheName, oCacheddata, null,
  • DateTime.Now.AddHours(1),
    TimeSpan.Zero,
  • CacheItemPriority.High,
    OnRemoveCacheItem)
  • return oCachedData

26
Caching data Objects
public Hashtable GetCachedData()
lock(object) Hashtable oCachedData
(Hashtable)CacheCacheName
if(oCachedData null)
oCachedData QueryToGetCachedData()
Cache.Add(CacheName, oCacheddata, null,
DateTime.Now.AddHours(1),
TimeSpan.Zero,
CacheItemPriority.High,
OnRemoveCacheItem) return
oCachedData
27
Tips Tricks
  • Do not deploy files in to layouts folder
  • New folder located under the layouts
  • No updating of system aspx pages
  • No direct access to the DB
  • ID guidelines
  • Document the IDs per implementation that are
    used
  • Each project should have their Sequence of their
    own
  • Consider to go with the 64-bit
  • Use .Dispose method

28
Tips Tricks continue
  • Reduce Unnecessary round-trips
  • Test your WebParts
  • USE Cache as much as possible
  • Querying Large Lists
  • If possible use RowLimit in the SPQuery
  • Updating Large Lists
  • Instead of OM use WebServices

29
Lets have a short look on the example VS solution
30
Summary
  • Use event log and ULS log to solve the
    environmental issues
  • ULS log has huge amount of information
  • Utilize ULS log also in your own projects using
    custom code
  • Follow the best practices to avoid common pitfalls

31
(No Transcript)
32
More information
  • SharePoint community
  • http//sharepoint.microsoft.com/sharepoint/
  • SharePoint product team blog
  • http//blogs.msdn.com/sharepoint/
  • Visual Studio structure used in demos and more
    guidelines (in future)
  • http//blogs.msdn.com/vesku

33
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com