Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > Problem running a Jeff Prosise example

Reply
Thread Tools

Problem running a Jeff Prosise example

 
 
Richard Lionheart
Guest
Posts: n/a
 
      10-25-2005
Hi All,

I'm trying to run the third example in Chap. 8 (Custom Controls) of
Prosise's "Programming Microsoft .NET". He provided a directory Hello1
containing two files
- Hello1.aspx
- Hello1.cs
and a "bin" directory containing Hello.dll.

I copied the Hello1 directory to www.root, renamed it
TestCustomControl_Hello1 to and ran
http://localhost/TestCustomControl_Hello1/Hello1.aspx in Firefox and IE
browsers. They returned identical results error messages shown below,
apparently indicating the browser couldn't find the assembly referenced on
line 2. But the Hello.dll in the bin directory is indeed an assembly if
ILDASM.exe is to be believed.

Any ideas about what's wrong?
--
Thanks in Advance,
Richard

================= Error Message ===================

Description: An error occurred during the parsing of a resource required to
service this request. Please review the following specific parse error
details and modify your source file appropriately.

Parser Error Message: File or assembly name HelloControl, or one of its
dependencies, was not found.

Source File: f:\inetpub\wwwroot\TestCustomControl_Hello1\Hello1 .aspx
Line: 1

Assembly Load Trace: The following information can be helpful to determine
why the assembly 'HelloControl' could not be loaded.


=== Pre-bind state information ===
LOG: DisplayName = HelloControl
(Partial)
LOG: Appbase = file:///f:/inetpub/wwwroot
LOG: Initial PrivatePath = bin
Calling assembly : (Unknown).
===

[snip]




--------------------------------------------------------------------------------

Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET
Version:1.1.4322.2032




 
Reply With Quote
 
 
 
 
Richard Lionheart
Guest
Posts: n/a
 
      10-25-2005
Hi All,

Here's more detail that may help you figure out what my problem is ... if
you're up to it

The subject example is taken from the CD accompanying Jeff Prosise's
"Programming Microsoft .NET", specifically the directory
Samples\Chap08\Hello1, which includes the following three files as shown
below.

I hope this helps in assessing the cause of my problem.

Regards,
Richard

============= Hello1.aspx =========
<%@ Register TagPrefix="win" Namespace="Wintellect"
Assembly="HelloControl" %>

<html>
<body>
<form runat="server">
<win:Hello RunAt="server" />
</form>
</body>
</html>

============= Hello1.cs=========
using System;
using System.Web.UI;

namespace Wintellect
{
public class Hello : Control
{
protected override void Render (HtmlTextWriter writer)
{
writer.Write ("Hello, world");
}
}
}

=========== bin/Hello.dll ===========
**** M A N I F E S T ****
..assembly extern /*23000001*/ System.Web
{
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) //
..?_....:
.ver 1:0:3300:0
}
..assembly extern /*23000002*/ mscorlib
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) //
..z\V.4..
.ver 1:0:3300:0
}
..assembly /*20000001*/ HelloControl
{
// --- The following custom attribute is added automatically, do not
uncomment -------
// .custom /*0C000001:0A000001*/ instance void [mscorlib/* 23000002
*/]System.Diagnostics.DebuggableAttribute/* 01000003 */::.ctor(bool,
//
bool) /* 0A000001 */ = ( 01 00 00 01 00 00 )
.hash algorithm 0x00008004
.ver 0:0:0:0
}
..module HelloControl.dll
// MVID: {4489FE53-7F7A-4131-AC09-769E7B04B3D3}
..imagebase 0x00400000
..subsystem 0x00000003
..file alignment 512
..corflags 0x00000001
// Image base: 0x03060000

**** **** Wintellect | Hello | .class public auto ansi beforefieldinit****
..class /*02000002*/ public auto ansi beforefieldinit Hello
extends [System.Web/* 23000001 */]System.Web.UI.Control/* 01000001 */
{
} // end of class Hello


**** **** Wintellect | Hello | extends [System.Web]System.Web.UI.Control
****


**** **** Wintellect | Hello | method.ctor : void() ****
..method /*06000002*/ public hidebysig specialname rtspecialname
instance void .ctor() cil managed
// SIG: 20 00 01
{
// Method begins at RVA 0x2068
// Code size 7 (0x7)
.maxstack 1
IL_0000: /* 02 | */ ldarg.0
IL_0001: /* 28 | (0A)000003 */ call instance void
[System.Web/* 23000001 */]System.Web.UI.Control/* 01000001 */::.ctor() /*
0A000003 */
IL_0006: /* 2A | */ ret
} // end of method Hello::.ctor


**** **** Wintellect | Hello | method Render : void(class
[System.Web]System.Web.UI.HtmlTextWriter ****
..method /*06000001*/ family hidebysig virtual
instance void Render(class [System.Web/* 23000001
*/]System.Web.UI.HtmlTextWriter/* 01000002 */ writer) cil managed
// SIG: 20 01 01 12 09
{
// Method begins at RVA 0x2050
// Code size 12 (0xc)
.maxstack 2
IL_0000: /* 03 | */ ldarg.1
IL_0001: /* 72 | (70)000001 */ ldstr "Hello, world" /*
70000001 */
IL_0006: /* 6F | (0A)000002 */ callvirt instance void
[mscorlib/* 23000002 */]System.IO.TextWriter/* 01000004 */::Write(string) /*
0A000002 */
IL_000b: /* 2A | */ ret
} // end of method Hello::Render





 
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
Learn ASP.NET 2.0 with Jeff Prosise dm1608 ASP .Net 0 01-29-2006 03:01 AM
DataList example from Prosise yields no output - don't know why Richard Lionheart ASP .Net 3 09-05-2005 03:14 AM
Ping Jeff Estes pcbutts1 Computer Support 0 06-19-2005 05:05 AM
A New E-Shop For Jeff Relf John Bailo Computer Support 7 02-05-2004 11:50 PM
Jeff Relf, Technical Writer, Spreads Misery John Bailo Computer Support 0 02-03-2004 08:16 PM



Advertisments