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
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