Vanou’s Blog

Posts Tagged ‘PowerShell

If you get this error, you might likely have WebApplication and/or ApplicationPool issues. When I got this problem, I thought I would have to start all over again my SharePoint install.

So I launched SPManager2010 and it shown me “Object not set of an instance of an object” error! I opened the source and then debug the application, and I found what was the cause of my trouble.

The property ApplicationPool of one of my webapplication was null !!!

I’ve been scratching my head for a couple of hours when I realised what happened:

I have 5 webapps

  • SharePoint – 8888 (TFS)
  • SharePoint – 6666 (PWA)
  • SharePoint – 7777 (ReportServer)
  • SharePoint – 8090
  • SharePoint – 80

they where on 2 different application pool, so I changed all the webapps to use the same application pool, using powershell simply like:

$webapp8090 = SP-GetWebApplication http://moss-server:8090

$webapp8888 =  SP-GetWebApplication http://moss-server:8888

$webapp8888.ApplicationPool = $webapp8090.ApplicationPool

I have been messing up with the 8090 webapp because of my training and I wanted to delete it. that’s when the problem started, central admin won’t let me create or extend a webapp anymore.

I guess that the reason why is because when I deleted the SharePoint 8090 webapp  I deleted the reference I made to its application pool that I used for the Sharepoint 8888 webapp.

I restored the application pool property of my webapp using the same method with powershell and I got the central admin working.