Value cannot be null. Parameter name: type

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.
 
G

Gregory A. Beamer

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. ;-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,525
Members
44,997
Latest member
mileyka

Latest Threads

Top