473,513 Members | 2,654 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Assembly probing does not work

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
Nov 18 '05 #1
2 3285
The Code is fine. Its the @Page directive. in the inherits attribute, put
the fully qualifies name of the class

"Pavils Jurjans" <pa****@mailbox.riga.lv> wrote in message
news:eF**************@TK2MSFTNGP11.phx.gbl...
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

Nov 18 '05 #2
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" <da**********@hotmail.com> wrote in message
news:m5*******************@fe2.texas.rr.com...
The Code is fine. Its the @Page directive. in the inherits attribute, put
the fully qualifies name of the class

"Pavils Jurjans" <pa****@mailbox.riga.lv> wrote in message
news:eF**************@TK2MSFTNGP11.phx.gbl...
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


Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2544
by: Atul Godbole | last post by:
Suppose an assembly "Main" is using class "A" from another Assembly "Dep" as follows : A a = new A(); a.MethodOne(); At what time is the call to MethodOne linked to the actual MSIL (method...
7
11077
by: Ruslan Popov | last post by:
Hi, I am trying to prevent an assembly being loaded from GAC and instead want it loaded from the application's base directory. However, the assembly always gets loaded from GAC. How to have it...
6
1719
by: MoriCristian | last post by:
Just a question. If i have an app with a dll version 1.5 and I replace it with version 1.6 everithing works fine. If i change the strong name however the app crash, but this is fine. My curiosity...
4
1326
by: Dave Kolb | last post by:
Hi, It is possible to reference an assembly in a directory other than in the bin subdir without registering in ghe GAC? For instance, I would love to have all my web apps on one server...
0
1117
by: Michel Gallant | last post by:
I have a simple asp.net page, NET 1.1, and no web.config file. I place the main assembly source in following directory: C:\Inetpub\wwwroot\cryptonet I link in a referenced COM interop assembly...
2
2953
by: Shiraz | last post by:
Alright, I think I have a better perception of assemblies and environment variables now. The question I had initially posted was pertaining setting of environment variables using the VSI installer....
0
2061
by: Achim Domma | last post by:
Hi, I try to develop a localized Asp.Net 1.1 application. I have added two resource files to my app, which are called 'Labels.resx' and 'Labels.de.resx'. If I compile the app, I see a 'de'...
4
4445
by: =?Utf-8?B?SmFu?= | last post by:
I have a .NET 2.0 application divided in two assemblies; the exe and a dll. The application generates a plugin-dll which is then loaded in a separate AppDomain (along with a second instance of my...
8
3728
by: Joe Withawk | last post by:
I have a solution consisting of a c# project as win application and a c++ project as classlibrary. Both are .net 2.0 The classlibrary handles some loading of quicktime movies, but that should not...
0
7157
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
7098
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7521
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5682
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5084
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3232
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1591
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
455
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.