Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Assembly probing does not work

Reply
Thread Tools

Assembly probing does not work

 
 
Pavils Jurjans
Guest
Posts: n/a
 
      05-11-2004
Hello,

This is my test.aspx page:

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

This is code in CodeBehind.cs:

using System;

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");
}
}

The CodeBehind.cs is compiled to CodeBehind.dll, and saved in "<application
root>/bin/test" folder

The web.config file is this:

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

Yet, when I try to look at test.aspx page, I get "Could not load type
'MyPage'" error.

What am I doing wrong here?

Thanks,

-- Pavils


 
Reply With Quote
 
 
 
 
David Jessee
Guest
Posts: n/a
 
      05-12-2004
The Code is fine. Its the @Page directive. in the inherits attribute, put
the fully qualifies name of the class

"Pavils Jurjans" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello,
>
> This is my test.aspx page:
>
> <%@ Page Language="C#" enableSessionState="true" inherits="MyPage"%>
>
> This is code in CodeBehind.cs:
>
> using System;
>
> 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");
> }
> }
>
> The CodeBehind.cs is compiled to CodeBehind.dll, and saved in

"<application
> root>/bin/test" folder
>
> The web.config file is this:
>
> <configuration>
> <runtime>
> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
> <probing privatePath="bin;bin\test"/>
> </assemblyBinding>
> </runtime>
> <system.web>
> <customErrors mode="Off"/>
> </system.web>
> </configuration>
>
> Yet, when I try to look at test.aspx page, I get "Could not load type
> 'MyPage'" error.
>
> What am I doing wrong here?
>
> Thanks,
>
> -- Pavils
>
>



 
Reply With Quote
 
 
 
 
Pavils Jurjans
Guest
Posts: n/a
 
      05-12-2004
Hello David,

Well, I have put the MyPage in the "Testing" namespace, and replaced aspx
with

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

It still fails with "Could not load type 'Testing.MyPage'". Actually I tried
to engange the fusion log to check for error source, but it does not show
any entries.

I should note that I am testing not root (http://localhost), but a
separately specified application, ie http://localhost/testApp . Not that I
believe this is the source of problem, but just to give full information
about my setup. I know that web.config is actually being read, as when it's
not proper XML, I get error in the browser. I know that my DLL is Ok, as
it's working, if located diretly in bin folder.

Do I have somehow to tell ASP.NET the location of the DLL? I was expecting
that usual probing methods would work fine, and it would look in the folders
specified in the web.config file.

Please, help me to clarify this. This should have been so simple, but now my
project is being hesitated due to this problem.

Thanks,

Pavils


"David Jessee" <(E-Mail Removed)> wrote in message
news:m5goc.86046$(E-Mail Removed)...
> The Code is fine. Its the @Page directive. in the inherits attribute, put
> the fully qualifies name of the class
>
> "Pavils Jurjans" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Hello,
> >
> > This is my test.aspx page:
> >
> > <%@ Page Language="C#" enableSessionState="true" inherits="MyPage"%>
> >
> > This is code in CodeBehind.cs:
> >
> > using System;
> >
> > 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");
> > }
> > }
> >
> > The CodeBehind.cs is compiled to CodeBehind.dll, and saved in

> "<application
> > root>/bin/test" folder
> >
> > The web.config file is this:
> >
> > <configuration>
> > <runtime>
> > <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
> > <probing privatePath="bin;bin\test"/>
> > </assemblyBinding>
> > </runtime>
> > <system.web>
> > <customErrors mode="Off"/>
> > </system.web>
> > </configuration>
> >
> > Yet, when I try to look at test.aspx page, I get "Could not load type
> > 'MyPage'" error.
> >
> > What am I doing wrong here?
> >
> > Thanks,
> >
> > -- Pavils
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
The located assembly's manifest definition with name '.....' does notmatch the assembly reference JB ASP .Net 0 05-06-2008 03:28 PM
Assembly's manifest definition does not match the assembly reference Monty ASP .Net 2 06-06-2007 02:46 AM
SystemC + VHDL cosim, hierarchy probing, etc... jjohnson@cs.ucf.edu VHDL 2 12-20-2004 05:05 PM
Assembly's manifest definition does not match the assembly reference. Horatiu Margavan via .NET 247 ASP .Net 0 08-30-2004 04:14 PM
Re: Assembly probing for Web app with subfolders Stan ASP .Net 1 10-20-2003 01:44 AM



Advertisments