Code-behind dll in other folder than bin

Discussion in 'ASP .Net' started by Pavils Jurjans, May 12, 2004.

  1. Hello,

    Please, I am fighting with this now for two days, and getting nowhere:

    I have my application in a separate virtual folder:

    c:\www\myApp

    There is a bin folder there:

    c:\www\myApp\bin

    Now, I have this aspx page in c:\www\myApp\test.aspx:

    <%@ Page Language="C#" enableSessionState="true" inherits="Testing.MyPage"%>

    And, here's a codeBehind.cs file, that is compiled to dll:

    using System;

    namespace Testing
    {
    public class MyPage : System.Web.UI.Page
    {
    public void Page_Load(Object sender, EventArgs e)
    {
    }
    protected override void Render(System.Web.UI.HtmlTextWriter writer)
    {
    System.Web.HttpContext currentContext = System.Web.HttpContext.Current;
    currentContext.Response.Write("Hello");
    }
    }
    }

    Now, when this dll file is in c:\www\myApp\bin folder, all works fine. But,
    I'd like to store it deeper in the bin folder, for example in
    c:\www\myApp\bin\sub

    As far as I understand, nurmal runtime probing for assemblies algorythm
    applis also to the searching of code-behind classes, so I edit my
    c:\www\myApp\web.config:

    <configuration>
    <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <probing privatePath="bin,bin\sub"/>
    </assemblyBinding>
    </runtime>
    <system.web>
    <customErrors mode="Off"/>
    </system.web>
    </configuration>

    Now, if I move the dll from c:\www\myApp\bin\ to c:\www\myApp\bin\sub,
    refreshing the c:\www\myApp\test.aspx throws at me "Could not load type
    'Testing.MyPage'" error. And that's where I am stuck now. Can't get it to
    work in no way.

    Please, I'd be happy for any hints

    Thanks,

    Pavils
     
    Pavils Jurjans, May 12, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. William LaMartin

    _vti_cnf folder in the bin folder-- a problem?

    William LaMartin, Nov 10, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    1,698
    Oliver
    Nov 10, 2003
  2. Jon Maz
    Replies:
    12
    Views:
    4,773
    Vadim Chekan
    Jul 1, 2004
  3. teliot
    Replies:
    7
    Views:
    12,301
    Alan Silver
    Nov 30, 2005
  4. D2
    Replies:
    3
    Views:
    906
    bruce barker
    Jun 13, 2007
  5. anne001
    Replies:
    1
    Views:
    465
Loading...

Share This Page