View Complete Thread
  • Re: 'Object reference not set to an instance of an object' error in IIS Powershell

    Jun 04, 2009 05:31 AM|Mike C|LINK

    Hi Sergei, with the help of a few blogs I managed to get the following information from the error:

    Exception             : System.NullReferenceException: Object reference not set to an instance of an object.                           at Microsoft.IIs.PowerShell.Provider.ConfigurationProvider.GetNormalizedRelativePath(String                        path, String basePath)                           at Microsoft.IIs.PowerShell.Provider.ConfigurationProvider.ItemExists(String path)                           at System.Management.Automation.Provider.ItemCmdletProvider.ItemExists(String path, CmdletPr                        oviderContext context)                           at System.Management.Automation.SessionStateInternal.ItemExists(CmdletProvider providerInsta                        nce, String path, CmdletProviderContext context)TargetObject          :CategoryInfo          : NotSpecified: (:) [New-Item], NullReferenceExceptionFullyQualifiedErrorId : System.NullReferenceException,Microsoft.PowerShell.Commands.NewItemCommandErrorDetails          :InvocationInfo        : System.Management.Automation.InvocationInfo  MyCommand        : New-ItemScriptLineNumber : 0OffsetInLine     : 0ScriptName       :Line             :PositionMessage  :InvocationName   :PipelineLength   : 1PipelinePosition : 1 00000000000000000000000000000000000000000000000000000000000000000000000000000000 Message        : Object reference not set to an instance of an object.Data           : {}InnerException :TargetSite     : System.String GetNormalizedRelativePath(System.String, System.String)StackTrace     :    at Microsoft.IIs.PowerShell.Provider.ConfigurationProvider.GetNormalizedRelativePath(String path, S                 tring basePath)                    at Microsoft.IIs.PowerShell.Provider.ConfigurationProvider.ItemExists(String path)                    at System.Management.Automation.Provider.ItemCmdletProvider.ItemExists(String path, CmdletProviderC                 ontext context)                    at System.Management.Automation.SessionStateInternal.ItemExists(CmdletProvider providerInstance, St                 ring path, CmdletProviderContext context)HelpLink       :Source         : Microsoft.IIS.Powershell.Provider 

    Is this any help?

    Mike.