Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > BOOK: Beginning ASP.NET 1.0
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 1.0
This is the forum to discuss the Wrox book Beginning ASP.NET 1.0 with C# by Chris Goode, John Kauffman, Christopher L. Miller, Neil Raybould, S. Srinivasa Sivakumar, Dave Sussman, Ollie Cornes, Rob Birdwell, Matt Butler, Gary Johnson, Ajoy Krishnamoorthy, Juan T. Llibre, Chris Ullman; ISBN: 9780764543708
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 1.0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old June 5th, 2003, 06:44 AM
Registered User
 
Join Date: Jun 2003
Location: Cork, , Ireland.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Linking to Net Assemblies

I have been working through 'Beginning ASP.NET 1.0 with C#. The examples work well. However I have run into a problem on Chapter 16 "Try it out - Using a Compiled Component". I get a compilation error CS0246 The Type or namespace name 'WroxComponents' could not be found. Line 1 of UseMyFirstComponent.aspx is highlighted.

Line 1: <% Import Namespace="WroxComponents" %>

I think I have followed the course of this tutorial fairly well. The only change I had to do was modify the CompileMyFirstComponent.bat to reflect the directory structure I had.

set indir=C:\Inetpub\wwwroot\DotNetDev\BegASPNET\Ch16\ MyFirstComponent.cs
set outdir=C:\Inetpub\wwwroot\DotNetDev\BegASPNET\bin\ MyFirstComponent.dll
csc /t:library /out:%outdir% %indir%

The component compiled to a dll ok and was placed in the bin folder.
The source MyFirstComponent.cs and UseMyFirstComponent.aspx are straight from the book.

Any Suggestions
               Dave
  #2 (permalink)  
Old June 6th, 2003, 06:00 AM
Registered User
 
Join Date: Jun 2003
Location: Cork, , Ireland.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you think I need to furnish more info on this, please let me know.
  #3 (permalink)  
Old June 6th, 2003, 09:33 AM
Registered User
 
Join Date: Jun 2003
Location: , , Germany.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Dave,

check it out:
change the second set row as follows:
set outdir=C:\Inetpub\wwwroot\DotNetDev\BegASPNET\ch16 \bin\MyFirstComponent.dll

the \bin-directory must in the application folder.

I hope, it runs...
:)
  #4 (permalink)  
Old June 9th, 2003, 02:45 AM
Registered User
 
Join Date: Jun 2003
Location: Cork, , Ireland.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi MDaniel,
   I had at oun point set up a bin directory off the ch16 directory and copied MyFirstComponent.dll in there, the same error was generated. I tried out your suggestion and modified the CompileMyFirstComponent.bat so the compiled dll eas saved to the local bin folder, the same error was generated.
   Also the directory structure originally used on the book was a little wierd:

Dlls were compiled to C:\BegASPNET\bin
even though the application folder path was to be
C:\BegASPNET\Ch16

Even that should not work, unless possibly the path to the dll is specified elsewhere.
  #5 (permalink)  
Old June 10th, 2003, 09:47 AM
Registered User
 
Join Date: Jun 2003
Location: , , Germany.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Dave,
if your application path is 'C:\BegASPNET\Ch16' then you've to save the dll-file in 'c:\begaspnet\ch16\bin\'.
When you don't have defined the application path and you're working in standard root-path then you have to save the dll-file in 'c:\inetpub\wwwroot\bin'
I had similar problem (i worked with the 1st edition). After i've found the error in the book, the code run without problem.

cu,
MD
  #6 (permalink)  
Old June 11th, 2003, 05:44 AM
Registered User
 
Join Date: Jun 2003
Location: Cork, , Ireland.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi MD,
   First I tried putting the dll in c:\inetpub\bin and hey it worked !!!. Now I imagine that would get cluttered after a while. I set up the source in C:\BegASPNET. Again I had success if the dll was in C:\BegASPNET\bin - as per the book. If I put the dll in C:\BegASPNET\Ch16\bin it would not run. Is there a way of defining the application path outside of Visual Studio?
Thanks for all your help

Regards
         David
  #7 (permalink)  
Old June 11th, 2003, 05:16 PM
Registered User
 
Join Date: Jun 2003
Location: , , Germany.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Dave,

yes, you can define the application path with IIS.
 


Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Assemblies smashingpravin .NET Framework 1.x 1 January 2nd, 2007 01:10 AM
Assemblies leeperm C# 2 April 29th, 2004 08:23 AM
HELP! Visual Studio locks assemblies for ASP.NET p bobmwaldo Pro VB.NET 2002/2003 1 November 21st, 2003 01:19 PM
HELP! Visual Studio locks assemblies for ASP.NET p bobmwaldo VB.NET 0 November 21st, 2003 10:44 AM
Decompilation of assemblies jacob Classic ASP Components 0 July 5th, 2003 07:31 AM



All times are GMT -4. The time now is 05:35 AM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.