Any link to profilecommon causes an error. The value cannot be null. Parameter Name: Type

I searched for two weeks, every night, comprehensively read the forum topics and tried all the proposed solutions, oddly enough. Just like in the case of many forum topics devoted to the same problem, the site works fine on my development machine. It deploys without errors. It works from the production server and reads data from the database, but when it tries to access the profile, it crashes with this error.

Several messages are said to check or clear the "delete app_code.compiled file" checkbox, but apparently it was a variant of Visual Studio 2005. It is nowhere to be found in Visual Studio 2010. The number of messages says to make sure App_Code.dll present in my bin directory. He is present. I manually deleted the app_code.compile file to see if this has changed. I changed the target structure from 4.0 to 2.0 and 3.5. I completely deleted the site in IIS, created a different folder with a different name and redistributed the site with each combination "allow this pre-compiled site to be updated" and "Use fixed names and sites for one page". I have included links to System.Web.Profile and System.Web and System.Web.Profile.ProfileCommon. I created a new, fresh website focused on .net framework v4.0,and copied this web.config file into my application and re-pinned my profile entries to make sure that I did not paste anything in the configuration file along the way. I burned candles and used voodoo spells. I prayed. I literally tried every conceivable suggestion in every forum related to this error, on the first five pages or so, both on google and bing. I spent 14 days, almost nothing but trying to get this site without this error.almost nothing but trying to get this site without this error.almost nothing but trying to get this site without this error.

, bin app_code.dll. , , .

- ?

+5
3

, , , , , , . , , , .

-, Visual Studio; - -. 2005, 2008 2010 . , -, , Visual Studio 2003 -, Visual Studio 2005, , , Visual Studio 2005 ​​ -, , -, .

. . , , -.

, , , , -, "Build → Publish Web Site", (, ) , dll " " FTP , . , -, . , . , , , .

, Build → Publish Web Site, , ProfileCommon , -, IIS , "build → publish web site", DLL , .

, , Build → Publish Web Site -. , , Web Site vs Web Application , ASP.net -, FTP- . , , , , -, , , ProfileCommon , , asp.net -.

, , - , . , -, , Perl, PHP, ASP. . . , , , IIS , , ILDASM. , , ?

, , Ive, - asp.net, - - , . , , ( ), , .

- , , . . 5arx :

http://www.codersbarn.com/post/2008/06/ASPNET-Web-Site-versus-Web-Application-Project.aspx

http://msdn.microsoft.com/en-us/library/dd547590.aspx

http://msdn.microsoft.com/en-us/library/ms227972.aspx

+4

, ? - /? , , ( )... - 5arx 11

- - ASP.Net -. web.config. - DLL app_code ( .Net ). , :

ComplexProfileProperty _cpp = (ComplexProfileProperty)HttpContext.Current.Profile.GetPropertyValue("valuename"); 

Hth,

, - :-)

+3

, - .

, / . , . .

Are there any other errors related to profiles / membership? This can be a problem for db tables or application id / user id. Context.Request.AnonymousIDdoesn't necessarily reflect anything in db from what i found in debugging profile problems.

If you are really stuck, you can try to get the source for the .Net Framework and debug it.

+1
source

All Articles