473,671 Members | 2,283 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#" enableSessionSt ate="true" inherits="MyPag e"%>

This is code in CodeBehind.cs:

using System;

public class MyPage : System.Web.UI.P age
{
public void Page_Load(Objec t sender, EventArgs e)
{
}
protected override void Render(System.W eb.UI.HtmlTextW riter writer)
{
System.Web.Http Context currentContext = System.Web.Http Context.Current ;
currentContext. Response.Write( "Hello");
}
}

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

The web.config file is this:

<configuratio n>
<runtime>
<assemblyBindin g xmlns="urn:sche mas-microsoft-com:asm.v1">
<probing privatePath="bi n;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 3292
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******** ******@TK2MSFTN GP11.phx.gbl...
Hello,

This is my test.aspx page:

<%@ Page Language="C#" enableSessionSt ate="true" inherits="MyPag e"%>

This is code in CodeBehind.cs:

using System;

public class MyPage : System.Web.UI.P age
{
public void Page_Load(Objec t sender, EventArgs e)
{
}
protected override void Render(System.W eb.UI.HtmlTextW riter writer)
{
System.Web.Http Context currentContext = System.Web.Http Context.Current ;
currentContext. Response.Write( "Hello");
}
}

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

The web.config file is this:

<configuratio n>
<runtime>
<assemblyBindin g xmlns="urn:sche mas-microsoft-com:asm.v1">
<probing privatePath="bi n;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#" enableSessionSt ate="true" inherits="Testi ng.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**********@h otmail.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******** ******@TK2MSFTN GP11.phx.gbl...
Hello,

This is my test.aspx page:

<%@ Page Language="C#" enableSessionSt ate="true" inherits="MyPag e"%>

This is code in CodeBehind.cs:

using System;

public class MyPage : System.Web.UI.P age
{
public void Page_Load(Objec t sender, EventArgs e)
{
}
protected override void Render(System.W eb.UI.HtmlTextW riter writer)
{
System.Web.Http Context currentContext = System.Web.Http Context.Current ; currentContext. Response.Write( "Hello");
}
}

The CodeBehind.cs is compiled to CodeBehind.dll, and saved in

"<applicati on
root>/bin/test" folder

The web.config file is this:

<configuratio n>
<runtime>
<assemblyBindin g xmlns="urn:sche mas-microsoft-com:asm.v1">
<probing privatePath="bi n;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
2559
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 body) of the method? Does this occur when "Main" is build or does it happen when main is loaded and Jitted? Also is the linking achieved by the full method name( this is what is seen in the IL generated by ILDASM : e.g : call
7
11091
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 loaded from the application directory? I read about the bindingRedirect trick in the NG, however, specifying bindingRedirect did not work for me. Also, MSDN library states that "Application configuration files can have a codebase setting without...
6
1732
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 is then: the various System, System.data and so on are signed? If so, how can the mono project prot them without having the private key? this is just for curiosity, no real need, Thanks! Cristian Mori
4
1330
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 reference assemblies from a c:\inetpub\wwroot\common directory shared by the apps on that web server. Thanks for any ideas.
0
1127
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 via: <%@ Assembly Name="Interop.CAPICOM" %> <%@ Import Namespace="CAPICOM" %> and originally, I had placed the assembly in the following application bin subdirectory:
2
2959
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. This was presumed essential for specifying the paths to certain dlls. Subsequently, the idea was dropped, and the appication configuration file approach was adopted. However, the application is not able to resolve the assembly location, and...
0
2085
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' subfolder in my 'bin' folder and the folder contains the resource dll. Accessing the german strings does not work. After a lot of debugging I managed to get fuslogvw.exe to work and got a result like this:
4
4466
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 application dll). It's been working for months and now the it's not working from my application exe anymore but still working from NUnit when testing the dll. What could have changed in my exe? Some configuration thing in my VS2005 project?
8
3736
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 be relevant. On my development machine I build the exe and dll and run the exe which has a reference to the dll. At some point it uses featured in the dll. This works fine. Then I copy my exe and dll to the target system and when the featured...
0
8476
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8821
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8670
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7437
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6229
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5696
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4225
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2812
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 we have to send another system
2
2051
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.