locked
BC30456: 'InitializeCulture' is not a member of ... RRS feed

  • Question

  • User-1760668358 posted

    Sometimes, this error appears... A few pages seem to work after I access them straight from the server first?

    Ive read up on this error and the function 'InitializeCulture' appears to be some kind of regional settings (for currency and time settings etc). At first the error happened whilst trying to access the site from an external machine, now I am getting it when I test it on the server also...

    Does anyone know anything about this error!?

    Sunday, January 22, 2006 2:46 PM

Answers

  • User936822441 posted

    I found a solution.  During the publishing stage on framework 2.0 uncheck the "allow this precompiled site to be updatable".  Once I unchecked this it published correctly and functioned correctly on IIS.  With it checked I would always receive 'InitializeCulture' is not a member of ...

    Another alternative to these is to copy the files directly from your development environment as the aspx pages define there CodeBehind pages in there header tags.  Either method will work.  Option 1 is faster.

    I hope this helps. 

    Anthony

    TradeBug.com - Ottawa's Largest Online Classifieds, Auctions, Rock Bottom Deals, and Flea Markets.

    http://www.tradebug.com

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, March 9, 2006 6:47 PM

All replies

  • User-1155260916 posted

    InitializeCulture is a virtual member of the Page class. It is used as a coinvenient point to set the Page.Culture/UICulture members that will be called extremely early in the page lifecycle for you to define the Thread settings.

    Can you provide a repro for this issue?

    Tuesday, January 24, 2006 1:57 PM
  • User936822441 posted

    I found a solution.  During the publishing stage on framework 2.0 uncheck the "allow this precompiled site to be updatable".  Once I unchecked this it published correctly and functioned correctly on IIS.  With it checked I would always receive 'InitializeCulture' is not a member of ...

    Another alternative to these is to copy the files directly from your development environment as the aspx pages define there CodeBehind pages in there header tags.  Either method will work.  Option 1 is faster.

    I hope this helps. 

    Anthony

    TradeBug.com - Ottawa's Largest Online Classifieds, Auctions, Rock Bottom Deals, and Flea Markets.

    http://www.tradebug.com

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, March 9, 2006 6:47 PM
  • User-1882569258 posted
    Thanks a lot.

    Its word helped me very.
    Wednesday, September 5, 2007 5:06 PM
  • User761580455 posted

    Anthony,

    That fixed my problem, too!

    Thanks.

     John

    Friday, September 14, 2007 8:57 PM
  • User320335809 posted

    Hello Anthony,

     

    I 've read your solution, but honestly don't know where to uncheck the "allo this precomplied site to be updatable" within the Visual Studio Web Developer 2005.
    Can you help me out here, because i have the same error  as mentioned into this thread.

     

    Thanks

    Johan

    Thursday, November 29, 2007 8:47 AM
  • User1775971595 posted

    Thank you thank you thank you thank you!!!!!

    Wednesday, February 27, 2008 4:27 PM
  • User-1825428827 posted
    When you build the site and choose to Publish Site [Build -> Publish Web Site], the first check box reads "allow this precomplied site to be updatable"
    Thursday, June 19, 2008 11:02 AM
  • User-265010715 posted

    I think I may have discovered the real culprit, and therefore a real solution, rather than a workaround.

    In my case, I had needed to create multiple similar pages.  I copied my "Contact" page and pasted it into the project 5 times.  I then renamed the pages.  What I forgot to do was change the class from Contacts to a new class name.  For example, my Donors.aspx page class was renamed to Donors.  I also needed to change the class name where it is inherited on the .aspx page.

    Once I did that, it still didn't work.  I realized that I needed to build the site first.  I built the site, then published it, and I kept the "allow this precompiled site to be updatable" checkbox checked.

    Worked like a charm.  Hopefully, this will work for you as well.

    Good Luck!


     

    Friday, July 25, 2008 10:01 AM
  • User-1498676535 posted

    I'll try your solution as soon as i get the next error.

     

    Thanks for sharing your solution

    Johan

    Friday, July 25, 2008 3:19 PM
  • User1581444456 posted
    After reading your real solution websmith, I realized I had two classes with the same name for the same reason. I copied one file and assumed Visual Studio would change the name of the classes and inherits automatically, but it didn't. So I renamed the new class and it worked. Thanks.
    Wednesday, October 22, 2008 6:31 PM
  • User-969995820 posted

    This one had me pulling my hair out.  I understood the ambiguous class error, but I didn't understand its cause.  A while back I had migrated from 1.1 to 2.0.  There are some 3rd party controls throughout the site and there were SO many conversion errors, I scrapped the migration and re-created the site from scratch.  Well, I had migrated and fixed the files in the root directory before changing tactics.  So, ALL of my pages in the home directory had ambiguous classes from the migration (creating new files and deleting the old).  I just changed all the class names in my files in the home directory and, presto, no more compile errors.

     Thanks guys, this one is a keeper.[cool]

    Monday, January 26, 2009 12:26 PM
  • User-638338534 posted

    hi websmith

    Thank u so much..it really helped me in crunch time....

    Friday, October 9, 2009 3:04 PM
  • User880307637 posted

    I had the same problem. Turned out some of my code behind files had the same class name. I had copied an existing page and had forgotten to give it a new class name. 

    Thursday, February 11, 2010 6:01 PM