Skip to main content

Blog

Go Search
Home
SharePoint and Tech Blog
  

MaclauWeb @ Sharepoint > Blog
Random Posts about my work with SharePoint and other Microsoft Technologies.
Error SPSearch (USER)
When trying to start the Windows SharePoint Services Help Search in a new SharePoint installation, and you get the *stupid* error: SPSearch (USER) where USER is the Username of the account you're trying to start the service with...
 
Fix it using including the domain (DOMAIN\USER). If it's a local user (like the demo server i'm installing) then include the computer's name (MACHINE_NAME\USER)
 
Silly silly.
WarmUp Script for MOSS

So, the curse of the .NET web applications (and then some blessing) is the JIT that impacts the performance for the first -unfortunate- user to access the application first time in the morning, or just after an inconsiderate administrator/developer installed something on the server... so when your client is complaining about that response time, and you can't do anything to justify it but search for a solution, then comes the Warm Up script have seen in the Microsoft Virtual Labs.

Let's first understand what happens:

Why is it so #$%& slow?

Every web application in IIS need and Application Pool to run. The Application Pool recycle itself at one given time everyday and that's when all the compiled code in the cache goes to hell. But this recycling is needed, or else the process will eat your server memory to death... and that's not an option in a real production server!

So, after the Application Pool is recycled, when any user access the web application, by making an HTTP request (that mean, by typing the URL of the Web Application in their browser), the application begins the compilation process. Some of this is cached, so when a second user access the web application is faster for him.

Another proccess that causes the Application Pool to be recycled is when you stop and restart the Internet Information Services, as a whole or any given web application. And this task is very common when you're implementing new features on SharePoint or even creating new Web Sites.

A Solution

Even if it just happens for the first user everyday, that's not acceptable for most customers of the SharePoint projects i've work on.

There's a popular solution that you may have seen working if you've done a Microsoft Virtual Lab on SharePoint, and it's a little 'Warm Up' script that runs every time you start the Virtual Lab, and it's also recommended on many websites when you're working on Virtual Machines for client demostrations.

This script was posted by Joel Oleson on his SharePoint blog (http://blogs.msdn.com/joelo/archive/2006/08/13/697044.aspx) and it's been reported to be used in many SharePoint implementations... for those that haven't been able to use it, or use it and see no change in the performance at all, here's the detailed instructions:

  1. Download the 3 files for the script on Joel Oleson's blog post: WarmUpServer.zip
  2. Extract the files on your server/virtual machine/test computer/wherever sharepoint is installed in and you want the performance to be better for that first unfortunate user.
  3. Right click on the startup.bat file, and choose Edit (or just open it o notepad to modify it)
  4. In the "call WarmUpServer" line, modify the last parameter to the name of your SharePoint server, like this:
        call WarmUpServer servermoss1
  5. Copy that line and paste it for every server and web application you have in your farm. Like this:
        call WarmUpServer servermoss1
        call WarmUpServer servermoss2
        call WarmUpServer servermoss1:3333
        call WarmUpServer servermoss1:2222
        call WarmUpServer servermoss2:4444
  6. Then, right click on the WarmUpServer.cmd file, and choose Edit (or just open it on notepad to modify it)
  7. Modify the "call :HitPage" line with the name of your server, or just replace it with %1 to use the parameter we already modified on the startup.bat, like this:

        call :HitPage %1 /Pages/default.aspx
        call :HitPage servermoss1 /default.aspx

  8. Add more lines with the url of the administrative pages or other sites you want to be specifically hit by the script, like this:

        call :HitPage %1 _layouts/settings.aspx
        call :HitPage %1 _layouts/create.aspx
        call :HitPage %1 _layouts/newsbweb.aspx
        call :HitPage %1 _layouts/viewlsts.aspx

  9. Create an scheduled task to run this script every day, after the time you know the Application Pools are recycled.
  10. Test it works:
    1. Open the command line (Start > Run... > type cdm)
    2. Reset the Internet Information Services (type iisreset)
    3. Find the startup.bat you just modified and double click on it.
    4. When the command line window that the startup.bat opened closes, Open Internet Explorer and type the URL of any of the SharePoint site you added to the script in step 5.
  11. If it opens the website fast (or whatever the usual expected speed is), Congrats! it worked.
  12. If it's still slooow then try this:
    1. Right click on the WarmUpServer.cmd file, and choose Edit (or just open it on notepad to modify it)
    2. modify the "cscript HttpRequest.vbs GET" line, and include the authentication, like this:
        cscript HttpRequest.vbs GET http://user:password@%1%2 /q //nologo
      Where user and password are the credentials for a valid user in SharePoint that has reading rights to the sites you add in step 5.
    3. Save the file and Go to step 10... that means, Test it!!

I bet it will work for you now!!! It's important that the user credentials you burn in the script in step 12, only has read rights (for obvious security reasons) and has no permissions on the server, or anywhere on your domain!! it's just for the script to correctly access the site not staying stuck in the authentication step before loading the site.

I'll add screenshot of the process, but right now i'm kinda tired, so see you later!

Mapping My Site to a Network Drive
Have you ever needed to Map a Network Drive to a SharePoint site, or to MOSS My Site, and failed miserably?
 
Well, the key things to consider are:
 
* Enable WebDav in the IIS of the Web Server hosting SharePoint.
* Make sure the WebClient Service is running.
* Only works in Windows XP and Windows 2003 Server if the web application of the site you want to map is in the 80 port (that means you can visit the site by just using an URL like http://servername/personal/user/ ... not http://servername:port/personal/user/)
 
Hope it's helpful!
 

 
Alguna vez ha necesitado visualizar Mi Sitio o algun sitio de SharePoint a traves del Explorador de Windows por "Conectar a una unidad de Red..." y ha fallado miserablemente?
 
Bueno, estas son los aspectos clave a tener en cuenta:
 
* Habilite WebDav en el IIS del Servidor Web donde se aloja SharePoint.
* Asegurese de que el servicio WebClient (Cliente Web) se este ejecutando.
* Solo funciona en Windows XP y Windows 2003 Server si la aplicacion web del sitio al que desea conectarse esta en el puerto 80 (es decir que pueda visitar el sitio utilizando una URL del tipo http://servername/personal/user/ ... en vez de http://servername:port/personal/user/)
 
Espero les sea de ayuda!
Working Abroad -- Trabajando fuera de la ciudad
So, I'm at the beautiful city of Medellin (Colombia) for work. I've been sent here to support a couple of projects with my SharePoint expertise.
 
The city is lovely, the weather is AWESOME, and the projects are promising.
 
I'm here mainly working with Windows Sharepoint Services 3.0 for corporate intranets... with a huge ammount of content!
 
It's very interesting to work in this kind of projects because you're here to help with technology, but also with all the activities related to establish a good and scalable information architecture. To me, that's the key to the success of it all!
 
Let's wait and see how it all evolves.
 


Asi que  estoy en la hermosa ciudad de Medellin (Colombia) por cuestiones de trabajo. Me enviaron aca para apoyar un par de proyectos con mi experiencia con SharePoint.
 
La ciudad es adorable, el clime es ESPECTACULAR, y los proyectos son prometedores.
 
Estoy trabajando principalmente con Windows Sharepoint Services 3.0 para intranets corporativas... con una gran cantidad de contenido!
 
Es muy interesante trabajar en esta clase de proyectos pues uno basicamente esta ayudando con herramientas tecnologicas, pero tambien con las actividades relacionadas a establecer una arquitectura de informacion, de buena calidad y escalable. Para mi, ahi se encuentra la clave del exito para estos proyectos!
 
Esperemos a ver como evoluciona.

 ‭(Hidden)‬ Admin Links