Website does not work: Object reference not set to an instance of an object.

Created:

2016-11-16 12:49:07 UTC

Modified:

2017-04-24 11:11:48 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Website does not work: Object reference not set to an instance of an object.

Applicable to:

  • Plesk for Windows

Symptoms

A website does not function after migration to modern IIS. The following message is shown:

Object reference not set to an instance of an object.

Additionaly, %plesk_dir%\\admin\\logs\\iis7nativeprovider.log can have the following error:

19:26:43.749749 4440 Exception occured: Configuration system failed to initialize
Invalid character in the given encoding. Line 250, position 21. (C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319\\Config\\machine.config line 250)
Invalid character in the given encoding. Line 250, position 21.
In System.Configuration module

C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319\\Config\\machine.config:

<----- issue is caused by the quotes (" instead of ” )

Cause

Some settings were moved from web.config to machine.config file while transition from IIS6 (Classic mode) to IIS7 (Integrated mode).

Resolution

Try to convert web.config to the new version using the following command:

%SystemRoot%\\system32\\inetsrv\\appcmd migrate config "example.com/"

Also, its possible to convert web.config for virtual directory using "example.com/virtual_dir/"

Note: The symbol '/' in the end of the name of the domain or virtual directory name is mandatory.

Have more questions? Submit a request
Please sign in to leave a comment.