p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > ASP.NET and ASP > ASP.NET 2.0 > BOOK: ASP.NET 2.0 Beta Preview
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET 2.0 Beta Preview
This is the forum to discuss the Wrox book ASP.NET 2.0 Beta Preview by Bill Evjen; ISBN: 9780764572869

Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Beta Preview section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 21st, 2005, 12:36 AM
Registered User
Points: 10, Level: 1
Points: 10, Level: 1 Points: 10, Level: 1 Points: 10, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2005
Location: Burlington, Vermont, USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default can't run samples outside of IDE

code samples run fine from within IDE but get error message when I try to outside. for example, the calculator pp62-64:

 Compiler Error Message: BC30002: Type 'Calculator' is not defined.

it's not a data access problem for this example. 'Calculator', by the way, is in the code folder as recommended in the book. my IIS home directory is \inetpub\wwwroot and the file is in Websies\website1 below this. IIS has ASPNET 2.0 showing.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
  #2 (permalink)  
Old February 23rd, 2005, 10:53 AM
Friend of Wrox
Points: 4,754, Level: 29
Points: 4,754, Level: 29 Points: 4,754, Level: 29 Points: 4,754, Level: 29
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Could you post the code, I don't have the book. You are using Visual Studio .NET beta?

Brian
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
  #3 (permalink)  
Old February 24th, 2005, 01:21 AM
Registered User
Points: 10, Level: 1
Points: 10, Level: 1 Points: 10, Level: 1 Points: 10, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2005
Location: Burlington, Vermont, USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

here's the script on main page:
----
<script runat="server">
    Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
        Dim myCalc As New Calculator
        Label1.Text = myCalc.Add(12, 3)
        Label2.Text = myCalc.Subtract(34, 67)
    End Sub
</script>
----
The html just displays labels.  the Calculator is defined in the code folder -- for testing I did the Add as VB and the Substract as CS :
--------  VB
Imports Microsoft.VisualBasic

Public Class Calculator
    Public Function Add(ByVal a As Integer, ByVal b As Integer) As Integer
        Return (a + b)
    End Function
End Class
--------

--------  CS
using System;

public class Calculator
{
    public int Subtract(int a, int b)
    {
        return (a - b);
    }
}
--------

webconfig file:
.
.
<system.web>
   <compilation debug="true">
      <codeSubDirectories>
        <add directoryName="VB"></add>
        <add directoryName="CS"></add>
      </codeSubDirectories>
   </compilation >
</system.web>
.
.
-------

It runs fine out of the IDE (visual web developer express - part of visual stdio 2005) but gives error when I run the same program in IE (whichs runs other examples fine)
Thanks for any help you can give.

JAB
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
  #4 (permalink)  
Old February 24th, 2005, 08:31 AM
Friend of Wrox
Points: 4,754, Level: 29
Points: 4,754, Level: 29 Points: 4,754, Level: 29 Points: 4,754, Level: 29
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

You can't have the same class defined twice. In this situation, I don't know if that is the case. Defining the same class in VB and C# doesn't merge the methods into the same object.

Brian
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
  #5 (permalink)  
Old February 24th, 2005, 10:51 AM
Registered User
Points: 10, Level: 1
Points: 10, Level: 1 Points: 10, Level: 1 Points: 10, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2005
Location: Burlington, Vermont, USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks.
 My point is that when I use the IDE to run it, it works fine. By the IDE I mean Visual web developer -> RUN which opens a port. My IIS shows that Framework 2.0 is active....

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Could not run samples datawiz1 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 10 August 11th, 2007 12:22 PM
Need samples mindserve VB.NET 2002/2003 Basics 0 August 5th, 2007 09:24 AM
How to run a java program without any IDE? AndrewH Java Basics 5 January 19th, 2007 01:52 PM
Can't get any of the samples to run... cwerth BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 7 June 16th, 2006 08:26 PM
Run Program outside IDE (please help a begginer) aepstein824 C++ Programming 1 February 27th, 2006 09:28 PM



All times are GMT -4. The time now is 11:13 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc