Value cannot be null. Parameter name: type

  • Thread starter Thread starter SH
  • Start date Start date
S

SH

Windows Server 2008 x64
SQL Server 2005

Using ASP.NET SqlProfileProvider, we're getting the following exception:

Value cannot be null.
Parameter name: type

Last two methods of the stack trace:
System.Activator.CreateInstance(Type type, Boolean nonPublic)

System.Web.Profile.ProfileBase.CreateMyInstance(String username, Boolean
isAuthenticated)


Now, we installed an old version of our code and it all works fine - but
with our new version we get this exception whenever we touch the profile
object as it goes away to try and create the profile and fails.

This is installing to a production environment and works perfectly in
development/staging environments.
 
Windows Server 2008 x64
SQL Server 2005

This should not matter, unless there is something that is set differently
in Windows 2008.

Using ASP.NET SqlProfileProvider, we're getting the following exception:

Value cannot be null.
Parameter name: type

Last two methods of the stack trace:
System.Activator.CreateInstance(Type type, Boolean nonPublic)

System.Web.Profile.ProfileBase.CreateMyInstance(String username, Boolean
isAuthenticated)


Now, we installed an old version of our code and it all works fine - but
with our new version we get this exception whenever we touch the profile
object as it goes away to try and create the profile and fails.


What is different? If nothing, see below.

This is installing to a production environment and works perfectly in
development/staging environments.


One thing that can happen is the ASP.NET temporary files can get corrupted.
If so, you have to manually clean them out and restart IIS. Yes, it is a
pain. Fortunately, not too many things cause this problem.

Another thing that sometimes works is installing to a new directory and
then pointing IIS at the new directory.

Are the development and staging environments also Windows Server 2008 x64?
Do they have any customizations to machine.config? Are the config files
equivalent?

Also, have you watched what is happening in SQL Server? You can use the SQL
Profiler tool to see what is passed to the server.

Yes, this turned out to be more rambling than I first thought. ;-)


--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
Back
Top