locked
Could not load the assembly RRS feed

  • Question

  • User1051635487 posted

     I have an existing app that has different .aspx pages all pages  dont have code behind file instead it had inherits="test ,app_Code"

    Please see below

    <%

    @ page language="VB" autoeventwireup="false"  inherits="Test, app_Code" %>

     

    app_code was found as a dll in the bin folder. but when I type test.aspx in the browser I am getting

     

    Parser Error

    Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

    Parser Error Message: Could not load the assembly 'App_Code'. Make sure that it is compiled before accessing the page.

    Source Error:

    Line 1:  
    Line 2:  <%@ page language="VB" autoeventwireup="false"   inherits="Test, App_Code" %>
    Line 3:  
    Line 4:  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


     



    I tried  app_code.Test , Test
    I checked my IIS has 2 diffrent IIS pools, deleted all temporary asp.net files nothing seems to work.

    Tuesday, February 9, 2010 3:18 PM

Answers

  • User-952121411 posted

    inherits="Test, app_Code"
     

    Honestly, I have never seen that notation with a comma ',' used before in the 'inherits' statement in a page declaration; but who knows maybe I will learn something new today.  Typically, everything is dot '.' notation, or when referencing paths slashes "/" or tilde "~" are used to reference locations.

    Regardless, this is a really round about way for page inheritance if you ask me.  A much more sensible way of accomplishing what you are trying is to leave all of the code behind files on the .aspx pages and have them inherit from the single class that contains the functionality you want reused across all pages.  For example you could have a class named 'PageBase' that inherits from 'Syste.Web.UI.Page', and then change all of the code behind files to inherit from 'PageBase'.

    It is going to be quite cumbersome as well if you don;t use the code behind files for the page's controls events and things of that nature.  It is certainly possibly to inline server side code with server tags in the source but it is much easier with the code behind files.

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, February 11, 2010 10:03 AM
  • User-1659704165 posted

    Have tried setting IIS to Application Pool..

    http://geekswithblogs.net/vivek/archive/2007/11/11/116760.aspx

    http://www.developer.com/net/asp/article.php/2245511/IIS-and-ASPNET-The-Application-Pool.htm

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, February 11, 2010 10:47 AM

All replies

  • User-1659704165 posted

    Hi,

    have tried using Aspnet_regIIS..

    http://msdn.microsoft.com/en-us/library/k6h9cz8h%28VS.80%29.aspx


    Wednesday, February 10, 2010 12:07 AM
  • User1051635487 posted


    not working for me. any other solution?

    Wednesday, February 10, 2010 5:40 PM
  • User1051635487 posted

    Can anyone suggest something  I can do to solve this issue?

    Thursday, February 11, 2010 9:31 AM
  • User-952121411 posted

    inherits="Test, app_Code"
     

    Honestly, I have never seen that notation with a comma ',' used before in the 'inherits' statement in a page declaration; but who knows maybe I will learn something new today.  Typically, everything is dot '.' notation, or when referencing paths slashes "/" or tilde "~" are used to reference locations.

    Regardless, this is a really round about way for page inheritance if you ask me.  A much more sensible way of accomplishing what you are trying is to leave all of the code behind files on the .aspx pages and have them inherit from the single class that contains the functionality you want reused across all pages.  For example you could have a class named 'PageBase' that inherits from 'Syste.Web.UI.Page', and then change all of the code behind files to inherit from 'PageBase'.

    It is going to be quite cumbersome as well if you don;t use the code behind files for the page's controls events and things of that nature.  It is certainly possibly to inline server side code with server tags in the source but it is much easier with the code behind files.

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, February 11, 2010 10:03 AM
  • User-1659704165 posted

    Have tried setting IIS to Application Pool..

    http://geekswithblogs.net/vivek/archive/2007/11/11/116760.aspx

    http://www.developer.com/net/asp/article.php/2245511/IIS-and-ASPNET-The-Application-Pool.htm

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, February 11, 2010 10:47 AM
  • User1051635487 posted

    I already  have different application pools for 1.1 and 2.0  

    Thursday, February 11, 2010 3:51 PM