If you are seeing this error:
[ArgumentNullException: Value cannot be null.Parameter name: type]
System.Activator.CreateInstance(Type type, Boolean nonPublic)
System.Web.Profile.ProfileBase.CreateMyInstance(St ring username,Boolean isAuthenticated)
System.Web.Profile.ProfileBase.Create(String username, Boolean isAuthenticated)
And the Profile
feature works on your development machine but not in production, there's a good chance that you're precompiling the website as a build release step.
To make sure the Profile
feature keeps working, make sure that 'Treat As Library Component' is unchecked if using Web Redeployment Project. If you're using MSBUILD and the AspNetMerge Task, make sure the 'RemovedCompiledFiles
' is set to false
:
<AspNetMerge
ExePath="$(FrameworkSDKDir)bin"
ApplicationPath="$(TempBuildDir)"
KeyFile="$(_FullKeyFile)"
DelaySign="$(DelaySign)"
Prefix="$(AssemblyPrefixName)"
SingleAssemblyName="$(SingleAssemblyName)"
Debug="$(DebugSymbols)"
Nologo="$(NoLogo)"
ContentAssemblyName="$(ContentAssemblyName)"
ErrorStack="$(ErrorStack)"
RemoveCompiledFiles="false"
CopyAttributes="$(CopyAssemblyAttributes)"
AssemblyInfo="$(AssemblyInfoDll)"
MergeXmlDocs="$(MergeXmlDocs)"
ErrorLogFile="$(MergeErrorLogFile)"
/>
If you are not using a Precompiled site, but you are using a custom provider, check to make sure the library that contains your provider has been deployed correctly!