Sharepoint 2010 – How to deploy custom Webparts
February 5th, 2010
I have found many post in the web about how easy is to develop and debug custom Visual Webpart, here are a couple of great references
- http://blogs.msdn.com/bethmassi/archive/2010/01/28/creating-a-sharepoint-visual-web-part-using-visual-studio-2010.aspx
- http://www.helloitsliam.com/archive/2009/10/20/sharepoint-2010-–-create-a-visual-web-part.aspx
- http://blogs.pointbridge.com/Blogs/nielsen_travis/Pages/Post.aspx?_ID=32
The problem is that there is not much talking about how to deploy the packaged Webpart on a different server. I run into this issue following the last post mentioned above because I am trying to deploy a custom Webpart to analyze the Claims inside a Token in a Claims based Authentication Sharepoint Web Application.
I finally came across this post (http://dotnet.sys-con.com/node/1208275) which details the deployment process as follows and is a recommended reading BWT. I am considering that you have a .WSP Webpart packaged by Visual Studio 2010 Beta.
- Add-SPSolution c:\code\SharePointProject2\bin\debug\SharePointProject2.wsp
- Install-SPSolution –Identity SharePointProject2.wsp –WebApplication http://sp2010 -GACDeployment
I will complement that post adding the final steps you should run to actually be able to see that webpart on your web application!
When adding a web part while editing a sharepoint page you might find that not all available webparts are show. This might happen if your Site Collection has not enabled all features and is also necessary for activating custom webparts. You should do the following as a Site Collection administrator,
- Site Actions
- Site Settings
- Manage Site Features
- Site Collection Features
Hope this helps!
Sharepoint 2010- Logging is out of control!
February 5th, 2010
Well, I spent a couple of days working with the Sharepoint 2010 Beta and have a couple of IMPORTANT Operational Tips to keep in mind when managing the Beta at least. I have an on-premise deployment (pre-production) and a cloud deployment on Amazon EC2 (production) and in both places I run into issues by limiting the log files growth.
We expect to see this monitored on the SCOM Management Pack when the product hits RTM.
Lessons Learned
- Watch out the Log files on File System: By default on “C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS” On Sharepoint generated 147Gb of log files in two weeks! Yes, 147Gb, this is kindly we fixed by the RTM release. But you should configure Central Administration > Diagnostic Logging to limit the space available for log files. I configured 1Gb for our Cloud deployment.
- Watch out the WSS_Logging Database: When you do a Single Server installation using SQL Express 2008 to host Sharepoint DBs, you must watch out for the growth of the DB named “WSS_Logging” which usually resides on “C:\Program Files\Microsoft Office Servers\14.0\Data\MSSQL10.SHAREPOINT\MSSQL\DATA”. I had one instance which reached 4Gb and put my SQLExpress instance to the limit (Here is someone who run into the same issue). That DB cannot be truncated as it is not supported right now and it takes care of analytics of the web traffic. You can disable the Health and Data Collection gathering from Monitoring > Reporting > Configure usage and health data collection, however web analytics is very neat to be left apart.
I was not able to find a procedure to migrate that DB to another server, so I had to disable the feature.
Key Takeaways
- Limit your log files usage.
- Deploy on server-farm mode to move the WSS_Logging db to another db server.
[RunReloaded09] Que hay de Nuevo Windows Server 2008 R2?
November 28th, 2009
We had a great show this Tuesday, the first session after the keynote was about Windows Server 2008 R2 and we had lot of stuff to show and to share with the audience, you can get the presentation here,
I promise I was going to drop the powershell scripts here, and here they are,
Remote Powershell and Best Practices Analyzer Example
- #get services
Get-Service | where {$_.status -eq "Running"} - #get services remoto
Enter-PSSession TN-DOM2
Get-Service | where {$_.status -eq "Running"}
Exit-PSSession - #Listar estado de los tests BPA
Import-Module ServerManager
Import-Module BestPractices
Get-Command *BPA*
#Get-WindowsFeature | Where {$_.BestPracticesModelId -ne $null} | Select BestPracticesModelId
Invoke-BpaModel Microsoft/Windows/WebServer
Get-BpaResult -BestPracticesModelId Microsoft/Windows/WebServer | Select * | Out-GridView
TechNET Migration Portal CMDLets
TechNET did a great work to ease migration experience to Windows 2008 R2, go and take a look to the TechNET Migration Portal. During the demostration we migrated a File Server role from a Windows 2008 server to a Windows 2008 R2 server.
- #En ambos servers
Add-PSSnapin Microsoft.Windows.ServerManager.Migration - #Primero: Desde server origen
Receive-SmigServerData - #2do: Desde Server destino
Send-SmigServerData -ComputerName <DestinationServer> -SourcePath d:\users -DestinationPath d:\shares\users -Recurse -Include All -Force
Active Directory Recycle Bin
The credits for the “Enable AD Recycle Bin” part are for Leandro Amore, I took the script from his blog, I know he wont be mad about it :).
-
#Enable AD recycle bin
import-module activedirectory$forest=Get-ADForest -Current loggedonuser
Set-ADForestMode -Identity $forest.name -ForestMode ‘windows2008r2forest’ -confirm:$false
Enable-ADOptionalFeature -Identity ‘Recycle Bin Feature’ -Scope forest -Target $forest.name -confirm:$false
Get-ADOptionalFeature -filter ‘name -eq "Recycle Bin Feature"’
-
#Mostrar computadoras en el recycle bin
Get-ADObject -filter ‘isdeleted -eq $true -and name -ne "Deleted Objects"’ -includeDeletedObjects -property * | Select samAccountName,displayName,lastKnownParent | Out-GridView -
#Restore de computadora una ves ubicada
Get-ADObject -filter ’samAccountName -eq "TN-SCO1$"’ -includeDeletedObjects | Restore-ADObject
Active Directory Managed Accounts
Finally, we configured a service to run under the identity of a Managed Service account a cool new feature of AD DS on Windows Server 2008 R2.
-
#registrar MSA
Import-Module ActiveDirectoryNew-ADServiceAccount -Name wwwTN-SCO1 -Enabled $true
Add-ADComputerServiceAccount -Identity TN-SCO1 -ServiceAccount wwwTN-SCO1
-
#instalar MSA
Install-ADServiceAccount -Identity wwwTN-SCO1
Hope you enjoy it!
Que es Identidad Federada? Autenticacion basada en claims? STS? Geneva Server? Como empiezo?
November 14th, 2009
Esto va en castellano en honor a mi lengua nativa, quisiera compartir con ustedes una camino para IT Pros para meterse en el mundo de los STSs e Identidad Federada de la mano de Windows Identity Foundation (ADFS v2.0). Al momento ya desplegué varios laboratorios y 2 ambientes de pre-producción de Geneva Server Beta 2 y es momento de recapitular un poco de donde salieron las cosas,
Para llegar a primera base y tener los conceptos básicos, les recomiendo leer un artículo que me hizo entender que habáía atrás de todo el tema de identidad y STS, es parte de la entrega 16 del Architecture Journal dedicada a identidad, el artáculo es Claims and Identity: On-Premise and Cloud Solutions de Vittorio Bertocci. A modo de introducción también pueden rememorar la charla que dio Matias Woloski en Microsoft este año Microsoft Architecture Day: Roadmap to Identity.
Con la visión, Tokens, Claims y STSs en el bolsillo, vamos en concreto a la implementación de Microsoft que es ADFS v2 (aka Geneva Server). La mejor documentación técnica al momento se ve en el Site de ADFS v2 dentro de TechNET. Geneva Server está documentado alineado con dos casos de uso, “Web SSO Design” y “Federated Web SSO Design” si bien el segundo es el mas rico por atacar el tema de federación es importante que se entiendan ambos. Luego de comprendido el tema de Federation Server, saltamos al tema deProxy Server que utilizamos para acomodarnos a DMZs, al leer estas secciones presten especial atención al tema DNS.
Es importante manejar el tema de certificados (Sobre todo si usan publicaciones con proxy reverso de ISA Server). Hay certificados en cada Federation Server y en cada Proxy Server para garantizar autenticación segura con tokens. Finalmente, esto tiene que ver con la capa de STS exclusivamente. Recordemos que debajo de esta capa seguramente tengamos una granja NLB de Windows 2008 R2 que es un tema aparte.
Espero sea de ayuda y quisiera en futuros posts profundizar en detalles de implementación que han surjido en la práctica,
RUN Reloaded en Buenos Aires
October 27th, 2009

RUN Reloaded 09 (the official Windows 7 Launch in AR) will happen next 24/25 November, hosted in the UADE University (Lima 717 - Aula Magna).
Registration is not open and there is room for 325 attendees, targeted for Microsoft customers. This event will go through the following technologies Windows 7, Windows Server 2008 R2, Expression 3, Silverlight 3, Sharepoint Server, Office 2010, Exchange Server 2010 and Visual Studio 2010.
I will be driving the following sessions
- Que hay de Nuevo en Windows Server 2008 R2 – Alberto Ortega
- Mejoras en Virtualizacion en Windows Server 2008 R2 – Martin Berra - Alberto Ortega- Leandro Amore
And you can apply on the following links…
IT Sessions (8.30 to 13hs, IT Guys wake-up earlier
)
Day 1) http://msevents.microsoft.com/CUI/InviteOnly.aspx?EventID=87-89-49-55-52-F8-06-07-7D-2B-C0-13-F9-6E-04-68&Culture=es-AR
Day 2) http://msevents.microsoft.com/CUI/InviteOnly.aspx?EventID=87-89-49-55-52-F8-06-07-DB-F0-DE-BA-96-08-99-FD&Culture=es-AR
Dev Sessions (13.30hs to 18hs)
Day 1) http://msevents.microsoft.com/CUI/InviteOnly.aspx?EventID=87-89-49-55-52-F8-06-07-87-1C-0C-A6-7C-6E-3A-5D&Culture=es-AR
Day 2) http://msevents.microsoft.com/CUI/InviteOnly.aspx?EventID=87-89-49-55-52-F8-06-07-F7-F9-55-05-54-0A-29-EE&Culture=es-AR
CU!!
[Hyper-v] Storage Hot-Add rocks!!
October 9th, 2009
I was in the middle of the setup of SCVMM 2008 R2 on a lab environment and got to the point that I needed to configure the Library Share Settings. I wanted the Library to be on a separate physical drive (1TB SATA drive) but it was really annoying to shutdown the VM, add the drive, map the drive to the VM and turn it on again…
Enlightened, I realized that I was running Hyper-V R2 and I had Storage Hot-Add feature ready to be tested!!! Well, it went pretty well I must tell, in 3 minutes I was continuing with my wizard without even closing it! thanks, thanks…
[Hyper-V] A Tale about Enabling Hyper-V on a x3650 System (Model 7979)
October 9th, 2009
Begin with the End
Well, I have this System X with VT capable processors so Installing Hyper-V should be pretty straightforward, I deployed tons of Hyper-Vs and never run into major problems more than well known remote management issues. This time I had to work a little harder, lets introduce the system
- IBM System x3650 7979
- Intel Xeon 5130 2.0 Ghz (2 Processors) –> (Intel VT Enabled, link)
- IBM ServeRAID 8k-l Controller
SOLUTION: To have Hyper-V working I had to
- Updated ServeRAID 8k-l Controller firmware to v5.2-0 Build 15429 (Not strictly necessary but I needed to manage 1TB SATA drives).
- Updated IBM BIOS to v1.16 (Because mine was not updated)
- BIOS: Guarantee “Intel VT†was enabled.
- BIOD: Guarantee “Execute Disable Bit†was enabled.
Until I did not executed Step 4, I got this discouraging error “The virtual machine could not be started because the hypervisor is not running.â€, this is, I was able to deploy Hyper-V but for some dark reason the Hypervisor was not running
I hope this will save someone a couple of hours at least!
Thanks,
Update x3650 7979 ServeRAID 8k-l Controller firmware to v5.2-0 Build 15429
We have updated the IBM ServeRAID 8k and 8k-l BIOS and Firmware Update to the version v5.2.0-15429 (Build 15429) on our x3650 system. We failed to use the IBM Xpress Updater as it did not found any critical update applicable to the system.
This update is important to work with 1TB SATA drives. Check the firmware change log here: ftp://ftp.software.ibm.com/systems/support/system_x/ibm_fw_aacraid_8k-8kl-5.2.0-15429_windows_32-64.chg
Procedure
- The procedure was not so straightforward, first the firmware update went good (running executable directly from Win2k8 R2) but showed a kernel panic on next boot, when the update was supposed to be applied.
- Then I prepared a set of diskettes (4 in total) to found that I was not able to update the firmware using the diskettes (“PC DOS System message†appeared and machine went unresponsive).
- Finally I found the the problem was the installed 1TB SATA drives. If you remove the disk on boot the controller kernel boots OK and the RAIDs are found. The, with the OS running you are able to insert the disk and access the 1TB drive.
- Copy the .exe to the x3650 system
- Run the Setup.
Note: As I mentioned before I had to copy the firmware to a set of diskettes, this procedure was not possible on a windows system. Tried Windows 7 and Windows Server 2008, I guess the bits on the IBM site are corrupted (I downloaded them twice) and the windows distribution is not able to create a diskette to update the firmware. Although I was able to create the set of diskettes using a Linux OS.
Updated x3650 BIOS to v1.16
I began downloading the Windows distribution from the IBM support site, I downloaded the IBM Flash BIOS Update v1.16 for Microsoft Windows - IBM System x3650, x3650 NAS, then
- (Failed) I re-programmed the BIOS running the executable directly from my Windows box, the update occurred successfully but when I rebooted the system the BIOS was not upgraded at all. It happened that I was running on a backup copy of the BIOS “Booted from backup POST/BIOS image†with a BIOS Version v1.07, this was surely an old inherited problem from the last administrator using the box, so I switched to a floppy based BIOS flash.
- (Success) I created a floppy using the Windows Executable (single floppy) and the BIOS re-programming worked like a charm.
BIOS Configuration
Intel VT was enabled in my BIOS, that seemed to be enough to me, however I also needed the Intel XD Execute Disable Bit enabled too, this is for security purposes.
This thread helped me a lot as it was exactly my problem. That’s enough for today!
Deploy SCCM 2007 SP2 RC on Windows Server 2008 R2
September 16th, 2009
Today I had to deploy SCCM 2007 SP2 RC on a Windows Server 2008 R2 system. The installation went pretty straightforward, however it can become a little tricky if you have not installed previous versions of SCCM. This procedure deploys SCCM in mixed mode, on a future post I will show how to deploy the needed PKI infrastructure to support the native mode of SCCM.
Below you will find the step-by-step:
- OS Pre-requisites
- Features > Background Intelligent Transfer Service (BITS) – Add every role and service required.
- Features > Remote Differential Compression
- Role > Web Server (IIS): Add the following components to the default selection.
- ASP.NET
- Windows Authentication
- Dynamic Content Compression
- IIS6 Metabase Compatibility
- IIS6 WMI Compatibility
- WebDAV Publishing
- ASP
- SQL Server 2008 + SP1
- Database Engine Services.
- Reporting Services.
- Management Tools – Complete.
- Use NETWORK SERVICE for every SQL Server Service.
- Configure SSRS in native mode.
- After installation, download and install SQL Server 2008 SP1.
- WSUS 3.0 SP2
- Download and install “Microsoft Report Viewer Redistributable 2008 SP1â€
- Download and Install WSUS 3.0 SP2
- Use the SQL Server 2008 db deployed before to store the updates.
- Create a dedicated IIS Website for WSUS.
- Run the initial configuration wizard and select the behavior and types of updates you want.
- Configure WebDAV on IIS7.5
- Open the WebDAV properties on the Default Website

- Click on “Enable WebDAV†on the Actions pane.
- Click on “Add Authoring rule†on the Actions pane.
- Allow Access To: All Content
- Allow access to this content to: All Users
- Permissions: Read
- Click on “WebDAV Settings†on the Actions pane.
- Modify on the ApplicationHost.config the <requestFilter> directive
- Open the WebDAV properties on the Default Website
- SCCM 2007 SP2 RC
- Extend the AD Schema: This is a non-reversible operation and should be executed on production environments without taking rollback measures before.
- Run the EXTADSCH.EXE file under an account with enough privileges to modify the AD schema (Member of Schema Admin security group)

- If you have any problem with this step, check the log file on c:\ExtADSch.log
- Now that you have extended the schema you need to enable the publishing of SCCM information into AD, to do this
- Manually create the System Management Container in AD: http://technet.microsoft.com/en-us/library/bb632591.aspx
- Set the security properly on that container: http://technet.microsoft.com/en-us/library/bb633169.aspx
- And after the installation finishes verify that SCCM is automatically publishing this information: http://technet.microsoft.com/en-us/library/bb680711.aspx (This is created by default)
- Run the EXTADSCH.EXE file under an account with enough privileges to modify the AD schema (Member of Schema Admin security group)
- Run the Pre-requisite checker to verify there you pass every test.
- Run the SCCM Setup
- Select “Install a Configuration Manager site serverâ€.
- Select “Custom Settingsâ€
- Select “Primary Site”â€
- Enter Site Code (“eg: TNAâ€) and Site name
- Install a mixed mode configuration (We did not deploy needed certificated for the native mode)
- Select local SQL Instance and default DB name.
- Setup a provider on the localhost.
- Install a management point on the localhost.
- Use the default port for communications (80)
- Select a local folder to download the SCCM updates, this will take a while

- Finally, launch the SCCM installation.
- Extend the AD Schema: This is a non-reversible operation and should be executed on production environments without taking rollback measures before.
- SCCM Post-Deployment Configuration Tasks
- I suggest to follow this checklist to begin using your SCCM deployment: http://technet.microsoft.com/en-us/library/bb633240.aspx
- Configure Site Boundaries

- Select the roles

- Client Installation
Now wait for the discover to occur and begin managing!!
[OpsMgr] Upgrade SCOM 2007 R2 RC to RTM – Easy!
September 8th, 2009
The upgrade went pretty straightforward on my environment, the SCOM setup detected the RC deployment of OpsMgr and proposed an upgrade when event the OpsMgr database would be upgraded. My OpsMgr Db is on on server and the Root Management server on another, the upgrade should only be run on the RMS.
- (RMS) Inser the OpsMgr r2 disk on the RMS
- (RMS) Run Setup
- (RMS) Select “Upgrade to Operations Manager 2007 R2â€
- (RMS) The Health Service on the RMS machine might fail to start when finishing the installation but you can start the service manually.
- (RMS) Every agent is queued on the pending management option under the Administration node. Running this tasks with a domain wide administrator will upgrade automatically every deployed agent to RTM.
- (RMS) ACS: I had to re-configure the ACS Forwarder on a couple of servers. Re-running the configuration task enabled the forwarder.
[OpsMgr] DNS External Resolution Monitor in Error State
July 23rd, 2009
Since OpsMgr 2007 I found several times with the same error from the DNS Management pack. The “DNS 2008 External Resolution Monitor” is always in an error state besides my DNS has no problems at all solving public names.
I solve this problem by overriding for the whole DNS Class the “Query Type” parameter of the monitor, changing from “ns” to “A”. I also tried to use the CNAME query type but the monitor kept on the error state.
Hope this helps!
