Code-behind dll in other folder than bin

P

Pavils Jurjans

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top