.Net cannot load codebehind

Discussion in 'General troubleshooting' started by Balba, Jul 5, 2010.

  1. Hello all,
    I've a .net application installed in two differents subdomains, using the kb I could create the structure [subdomain].mydomain.com and [subdomain2].mydomain.com.

    To deploy my application I'm using the "publish" function on VS and copy the files to the ftp as explained in some articles.

    The problem is: SOMETIMES, when I trying to access the application, some pages (no one in particular) the Server error "could not load file or assembly" appears. This error is intermitent and after few minutes the same page works fine.

    Anyone knows about this error, is too hard to solve because is intermitent and some times the site load complete with no errors.

    Thanks in advance,
  2. Ray


    It sounds like your application maybe getting recycled.

    There are three conditions why your application pool maybe recycled. They are...

    1) More than 20 minutes of idle time (no http request in 20 minutes)
    2) The application uses more than 100 MB memory
    3) The application uses more than 75% of CPU time
  3. Thank you Ray,

    I don't think that my problem is related to app. pool reclycle because sometimes, the error appears in the first page (login page), excluding the 20 min of idle time and 100 MB of memory and 75% of the CPU.

    I'll build all projects (.dlls) used in my application and try to deploy a complete "pack".

    Thanks anyway.

  4. Ray


    Do you have a way for me to replicate this on my end? If you like I can test it for you.
  5. Ray,

    I'm afraid that the error is greater than I thought. I have a senior .Net C# developer working with me and we found a lot of information about a posible bug or "know problem" in MS 3.5 Framework. We are trying to do some workarround, but till now we don't have the solution.

    Here some tips tested:
    1) Check the structure (basic is everything all right)
    2) Run the site in a WebApplication not in a Virtual Directory (ok)
    3) Change some compilation parameters in WebConfig (ok)

    We still looking for the solution for this intermitent error.

    My site is http://liberdade.deepview.com.br and some times the login page (default) is broken because the error.

  6. Ray


    Have you tried recycling the application pool when you see this error. I am assuming you are still getting the error...

    "could not load file or assembly"

    You will need to let us know if it is a different error. If it is a different error then it could be caused by something totally different.

    To recycle the application pool go to the control panel and under the Site Info Manager you will see a button that reads Recycle App Pool.

    Furthermore, can you give us a full copy of the error message and the stack trace that should be attached to it?
  7. :D Application error solved


    Tanks for your time and your support. After that looking for a lot of articles and different kb in some developer foruns, my .Net developer discovery that the error is related to the Culture informed in the .dll.

    We cannot set a culture in a .Dll, my application use "Pt-BR" for User Interface, but in Business Layer (and any other layer) we have to put "neutral" in the culture or the application starts to be unstable, with different errors.



Share This Page