A simple one really, but if you want to turn on verbose diagnostic logging when central admin is being a troubled soul this command can be used in the PowerShell command window.
Set-SPLogLevel -TraceSeverity Verbose -EventSeverity Verbose -verbose
More info at : http://technet.microsoft.com/en-us/library/ee748656.aspx#section3
Take care for now.
Update
Thought I might as well put this in here too. If you want to update in STSADM you can with:
stsadm -o setlogginglevel -tracelevel verbose
SharePoint your lives away.
My name is Phil Izod and I have been working with Microsoft 365 and related technologies (with a lot of SharePoint) since 2005. I thought it might be helpful to the community if I shared some of my experiences. Feel free to leave comments if you wish; it’s great to know whether the information is helpful or not.
Showing posts with label Sharepoint2010. Show all posts
Showing posts with label Sharepoint2010. Show all posts
Monday, 18 April 2011
Thursday, 10 February 2011
SharePoint 2010 Development Session 2 : Visual studio 2010 + the Sandbox
So here are some more notes I made after a second session learning about SharePoint 2010 development. Do with them as you wish.
VS 2010 Installation
Visual web parts allows you to create a web part containing and a user control. Similar to approaches in 2007 development but VS wires it all up nicely for you through the graphical designer.
Visual studio is extendible
Sandbox solutions
So that is my second quick session with 2010 development. Sorry its a bit notey but I doubt anyone will ever actually read it so it doesnt matter too much haha.
VS 2010 Installation
- SharePoint Visual studio 2010 developer tools are only for SharePoint 2010. The tools are built in to VS 2010 so there is nothing extra to down load and install once you have VS installed.
- There has to be SharePoint 2010 on the developer machine to do develop properly.
- VS 2010 with 2010 first glance benefits over MOSS and VS 2008
- The tools have been designed to cut down on a lot of the "wire up" procedures which where required in SharePoint 2007.
- A SharePoint explorer view has been added to allow browsing of SharePoint assets. This is available from Server explorer. You then have read access to SharePoint files.
- Most SharePoint development will start with a "Blank SharePoint project template". Which will then allow you to add all SharePoint artefacts as required.
- When adding features all the wire up is automatic. All the files required for a feature are created without the need to connect them together. Feature properties can be set easily through VS designer. This includes the name / scope / feature image url / and more. Its really is easy compared with MOSS.
- There are short cuts in solution explorer to allow you to add files to the rootfiles ( _layouts / _images / etc). This easily allows you to add files to the file system when needed. There is no configuring of XML required to tell the file where to go. Great!
- If you want to add an event receiver to a feature this is simple with a right click. The wire up is automatic and you are up and running quickly.
Deployment / debugging
- Everything is automatically packaged up into a .wsp file. This means that deployment of all changes is easy.
- F5 now allows debugging without attaching to process as was required in 2007 . When f5 is pressed the code is compiled, a solution package is created and deployed to the development server and full debugging mode is entered.
- It is possible to configure build patterns which allow you to specify whether to recycle IIS after deployment as well as a load of other options.
Visual web parts allows you to create a web part containing and a user control. Similar to approaches in 2007 development but VS wires it all up nicely for you through the graphical designer.
Visual studio is extendible
There are extensions which are displayed under extension manager. Recommended extensions (from MSDN or Visual studio):
- CKS - Development tools edition
- VS 2010 SharePoint Power tools - Visual web part to sandbox. Aids sandbox installation.
As we know it is important to dispose of SharePoint objects correctly or the whole farm can grind to a halt. A great tool for checking this is SPDiposeCheck / SPDisposeCheckStatic. The static version is a plug in for VS 2010 which can check that objects are disposed correctly.
http://spdisposecheckstatic.codeplx.com/.Sandbox solutions
- Sandbox solutions allow development to take place in a safe environment known as a “Sandbox” The idea is that code which runs in the sandbox will not be able to do any serious damage to the running of the rest of the farm.
- There are limitations on what a developer can do in the sandbox. There is a subset of the object model available to make sure that developers cant cause any harm.
- Solutions are deployed at site collection level to a solution gallery. This task can be done by a site collection administrator so there is no need for farm administrators to get involved.
- In VS if you have selected "Sandbox solution" the intelisense will attempt to hide code not available in sandbox. Ultimately however there is no difference in the compiled code. It follows that a .wsp file is not targeted at a farm level or at sandbox level. There is no difference in the wsp. It is restricted by where the code is to run (either in the sandbox or not).
- Sandbox solutions can be banned from a farm by a farm admin if deemed to be dodgy.
- Visual web parts dont work in sandbox because of ascx deployment to the file system but the Power tools do have a way around this (see power tools extension mentioned above.
- Modify file system
- Access external sources (web services / databases etc) (although Sandbox proxy service can allow external access calls if really needed).
- Create Webparts
- Create Lists
- Create List templates
- Create custom UI actions
- Create some work flows
- .... More YES
- Sandbox solutions don't have to run on the wfe they can run on another backend server.
- WFE will wait until the sandbox code has run and completed. There is a hard limit of 60 secs for this.
- The code runs under SPUCWorkerProcess process/.
"Save as template" now saves as WSP file in the solution gallery. This can be opened in SharePoint designer. Sounds cool! From here you can customise the lists which are in there and so forth. Very flexible. Great for modifying site templates.
So that is my second quick session with 2010 development. Sorry its a bit notey but I doubt anyone will ever actually read it so it doesnt matter too much haha.
Bring on that SharePoint Farm
Wednesday, 9 February 2011
SharePoint 2010 Development Session 1 : Introduction
Despite being hands on with SharePoint 2010 during the beta version, I haven't had much exposure to developing in 2010. Obviously there has been information release which I have read but I havent got my hands dirty in a while. When I was offer then chance to sit in on some SharePoint 2010 Dev training I jumped at the chance. This post relates to the first session which gives you an intro to development in SP2010. These are my notes but you are welcome to read them.
SharePoint 2010 Developer introduction
Custom actions
These allow you to add extra actions to various parts of the interface. This includes the ribbon.
Example
SharePoint 2010 Developer introduction
A developer training virtual machine is available for free at http://bit.ly/sp2010vm
The following links are usefule sites relating to the development community.
- http://blogs.msdn.com/b/ukisvdev/
- http://bit.ly/firststopuk
- The UK ISV twitter account is available at http://twitter.com/ukisvdev
- Lots of development material (slides and videos from Microsoft is available at http://channel9.msdn.com/learn/courses/SharePoint2010Developer
SharePoint 2010 Development Stack
- Development can be done on client operating system.Don't have to develop on the server.
- 64 bit windows server 2008 for production (Windows 7 possible for local)
- .net 3.5 (Not .net 4.0)
General points relating to SP2010
- There is a client object model for silver light and JavaScript
- Can share service applications across farms.
- SharePoint designer will help you connect to BCS as opposed to old school XML files
- Claims based authentication allows you to authenticate against other providers. Eg Google / face book and so on.
- Contains the ribbon which is inline with existing office version.
- The page editing tools have given more power via the UI. It is possible to change the layout, insert a picture and format text, insert web parts more easily.
- List management is improved. A user can select item and edit without post back due to AJAX functionality.
- List management also allows selection of multiple items in a list and act on them as a group. Previously the only way to group list items by selection was via manage content and structure. This method only allowed administrators to perform certain tasks.
- Essentially the interface is more user friendly.
SharePoint Dev Terminology review (Object model)
- SPFarm - Farm object
- SPWebApplication - Web application
- SPSite - Site collection
- SPWeb - Site / Sub site
- SPList / SPDocumentLibrary - List or document library
- SPItem / SPFile - Item or document library
Introduction to Visual Studio platform
- When adding references it is possible to configure Visual Studio to have a tab to allow you to select SharePoint assemblies without browsing the 14 hive.
- If you receive an error saying file not found when you run code, it is likely that the assembly is not compiled in 64 bit.. You must change the build to be 64 bit in VS there will be an error.
SharePoint designer 2010
- SPD can be started from site actions menu.
- When opening a site the a "Site object" browser is available which allows viewing of Content types / external content types / lists/ master pages / workflow / groups sub sites / all files (and more).
- Can see permissions of objects directly via summary screen so can update permissions this way through SharePoint designer.
- Summary pages shows other information including list id and other relation ships / forms views / etc
- Makes it easier to use
- The are options to copy and modify the SharePoint workflows. This includes out of the box workflows like approval.
- Can have site workflow to apply to whole site. So can upload lots of files and process as one group.
- Workflow designer is improved and is not in wizard form (although some of the pop ups are the same).
- Site work flows available from the all site content screen
PowerShell
- Preference is PowerShell over Stsadm.
- Cmdlets are used to provide functionality and to do administrative tasks
- Pipe lining and formatting allows output to be filtered and formatted in a particular way. This can be piped to file.
- To run .ps1 files execution policy will need to be set. There are 3 levels Restricted / unrestricted / bypass.
- All dos commands are available as well as others.
- "Tab" key allows command completion
- "Integrated Scripting environment" will help you come up with power shell commands and writing code. Intelisense and debugging is available in this environment. (Need to add SharePoint commands to load SharePoint snap in for your profile).
- Add ps snap in to the Micrsoft.SharePoint.PowerShell to allow SharePoint to access SP commands.
- Help is there "Get-help"
- Can write powershell snap its which are like stsadm extensions. (Gary lapoint is still doing it at http://blog.falchionconsulting.com/)
- Ribbon control development is the same as for office except for the "Ribbon gallery control".
- Alerting the user can be doing by status (at the top of the page) / page notifications (pop up in to right hand corner of the page..You can write to these as a developer. They don't require postbacks.
- In place editing allows users to edit in place without doing postbacks. Highlight and edit. (There seems to be a lot of focus on not doing postbacks so bare this in mind when implementing modifications).
SharePoint 2010 Dialogs
Modal Dialog pop ups are available through JavaScript calls which are great for replacing traditional "pop up alerts".
Example
Var dialog = {url : "http://bing.com/", title: "hello", width: 400, height: 400};
SP.UI.ModalDialog.showModalDiaglog(dialog);
Sp.UI.Notify.addNotification to add the notification
Custom actions
These allow you to add extra actions to various parts of the interface. This includes the ribbon.
Actions can be added directly through SharePoint designer making it much easier than 2010.
Example
- Create a new view for a list in SharePoint designer.
- Add a custom action to the ribbon so that there is a quick way to get to the list view.
- All sites now have pages and page libraries.
- Sites contain the following Master pages( V4.master, Minimal.master, Simple.master, Default.master)
- SharePoint now contains Well formed XHTML (cant believe this is advertised as a selling point - but hey at least we are finally here)
- SharePoint Cross browser IE Firefox and CHROME
- WCAG 2.0 AA supported OOTB
- Rich text editor supports XHTML
Thursday, 20 January 2011
Configuring the User profile service application - User Profile Synchronization Service stuck on starting
OK so I thought it was about time I cleared this one up for my own sanity.
As described in my post User profiles in SharePoint 2010, the User profile service application is required to sync user information. A well known issue when configuring this is that the the User profile synchronisation service actually gets stuck on activation. It just says:
"User Profile Synchronization Service - starting"
N.B. The service probably isn't stuck. It is just retrying to start a number of times.
As described in my post User profiles in SharePoint 2010, the User profile service application is required to sync user information. A well known issue when configuring this is that the the User profile synchronisation service actually gets stuck on activation. It just says:
"User Profile Synchronization Service - starting"
N.B. The service probably isn't stuck. It is just retrying to start a number of times.
The following points might help you get through without error.
- Use a farm account to run the service. Potentially use the same account as installing.
- Add this account to local administers group whilst setting up the service. This can be removed later and will only need log on access.
- Ensure that the user account which is being used can read Active directory (assuming ad is source). The account requires the "Replicating directory changes" permission in AD. This was new to me so pointed our infrastructure guys at http://support.microsoft.com/kb/303972 to get them to add the permission at domain level and include all descendants. This will allow the service to access.
- Ensure the managed metadata service is running.
With a bit fortune on your side you should be up and running.
Wednesday, 19 January 2011
User profiles in SharePoint 2010
Why do we need them?
User profiles are the foundation of many of the SharePoint 2010 features. Including:
What makes up the user profiles architecture?
There are two main parts relating to SharePoint.
1. User profile service application(UPA)
This service application allows the management capability of the user profiles. So it provides a central location for configuring:
2. User profile synchronisation service
This is effectively a SharePoint wrapper for forefront identity manager components. It adds two windows services and is responsible for synchronising profile information with the user source. It is important to note that in SharePoint 2010 it is possible to send information back to the source in additional to the predictable pulling of data.
There are three databases related to the user profiles:
So there it is, a quick look into User profiles in 2010.
Technet : Create, edit, or delete a User Profile service application
This post is after listening to Spence talking in this video:
TechNet Radio: User Profiles in SharePoint 2010
I decided to make some notes for myself so I could refer to them in the future.
User profiles are the foundation of many of the SharePoint 2010 features. Including:
- People search ( searching on expertise / interests)
- Organisational hierarchy browser
- Content targeting
- "My Sites" functionality (including notes / interests / ratings and the like).
What makes up the user profiles architecture?
There are two main parts relating to SharePoint.
1. User profile service application(UPA)
This service application allows the management capability of the user profiles. So it provides a central location for configuring:
- User profile properties
- Organisation profiles
- Audiences
- Profile synchronization settings (you can also write back to source due to forefront identity manager capabilities)
- Organization browsing and management settings
- My Site settings (my site host / my site website)
2. User profile synchronisation service
This is effectively a SharePoint wrapper for forefront identity manager components. It adds two windows services and is responsible for synchronising profile information with the user source. It is important to note that in SharePoint 2010 it is possible to send information back to the source in additional to the predictable pulling of data.
There are three databases related to the user profiles:
- Profile database - Stores the user profiles
- Social database -Stores notes, tags and ratings
- Synchronisation db - Used by the synch service for managing its operations
So there it is, a quick look into User profiles in 2010.
Related links:
Technet : User profile service overviewTechnet : Create, edit, or delete a User Profile service application
This post is after listening to Spence talking in this video:
TechNet Radio: User Profiles in SharePoint 2010
I decided to make some notes for myself so I could refer to them in the future.
Subscribe to:
Posts (Atom)