 |
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|
|

June 5th, 2003, 06:44 AM
|
|
Registered User
|
|
Join Date: Jun 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|

June 6th, 2003, 06:00 AM
|
|
Registered User
|
|
Join Date: Jun 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
If you think I need to furnish more info on this, please let me know.
|
|

June 6th, 2003, 09:33 AM
|
|
Registered User
|
|
Join Date: Jun 2003
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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...
:)
|
|

June 9th, 2003, 02:45 AM
|
|
Registered User
|
|
Join Date: Jun 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|
|

June 10th, 2003, 09:47 AM
|
|
Registered User
|
|
Join Date: Jun 2003
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|

June 11th, 2003, 05:44 AM
|
|
Registered User
|
|
Join Date: Jun 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|

June 11th, 2003, 05:16 PM
|
|
Registered User
|
|
Join Date: Jun 2003
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi Dave,
yes, you can define the application path with IIS.
|
|
 |