By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,948 Members | 1,595 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,948 IT Pros & Developers. It's quick & easy.

Code-behind dll in other folder than bin

P: n/a
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
Nov 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.