Results 1 to 10 of 10

Thread: Bunch of garbage

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2002
    Location
    Sharpsville, PA
    Posts
    135

    Angry Bunch of garbage

    Well, since I can't create a project where I want to, I shifted gears
    and started on Wrox's Beginning ASP.NET. Everything you do
    here is in notepad. So I wrote the code as follows:

    <script language="vb" runat="server">
    Sub Page_Load()
    time.text=Hour(Now) & ":" & Minute(Now) & ":" & Second(Now)
    End Sub
    </script>


    <html>
    <head><title> The Punctual Web Server</title><head>
    <Body>
    <h1>Welcome</h1>
    Time Is:
    <asp:label id = "time" runat="server" />
    </body>
    </html>


    The scripting part does not run. I view the source on the browser
    and I see the script part when according to the tutorial it should
    not be there because it would be executed on the server.

    So I create a project and import this ASPX file and of course the IDE doesn't like any of this code. So it seems the aspx pages in the IDE are a lot different than if done in Notepad. This is all too
    much mickey mouse to me. Whatever happened to KISS for
    us stupid people?


    This is getting really FRUSTRATING!!!!!
    ****All we are saying is give war a chance****

  2. #2
    New Member
    Join Date
    Nov 2002
    Location
    Dublin, Ireland
    Posts
    3
    1. If ASP.NET is installed properly then your asp.net file must have a .aspx extension by default. You can add other extensions to IIS that it should send to asp.net.
    2. Your book is showing you how to create an asp.net page with INLINE code. VS.NET uses the codebehind/pre-compiled model. Even so I don't know why it would have any major problems with inline code but ASP.NET Matrix is better suited to that anyway. No matter what you are better off with the compiled method from a speed point of view.
    3. Don't do battle with .net over these things. There are simple explanations most of the time so count to 10 and relax

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 2002
    Location
    Sharpsville, PA
    Posts
    135

    Question So...

    So do I have to go to IIS administration and see if it is set
    to run ASPX? I did create this page with an .aspx extension.

    I wish I could relax......then I might IMplode.
    ****All we are saying is give war a chance****

  4. #4
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    First, make sure you dont try running your asp.net application on NT4, because it will not work.

    If you are running it on Win98/Me, 2000 or XP then sounds like you dont have asp.net isapi setup properly or it's currupt.

    Just run this from the command line:

    C:\WINNT\Microsoft.NET\Framework\v1.0.3705\aspnet_regiis -e

    Note: make adjustments if this is not the path to your .net framework directory

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Jan 2002
    Location
    Sharpsville, PA
    Posts
    135

    Did that

    Ok
    I ran that command, still no go. The command flashed very quickly, can't tell if ti did anything.

    Tom
    ****All we are saying is give war a chance****

  6. #6
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    It shouldn't have flashed quickly, it should take a minute or two. Open "cmd" and type the command again. You should see the .NET Framework title at the beginning.

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Jan 2002
    Location
    Sharpsville, PA
    Posts
    135

    This is waht displayed...

    Microsoft Windows 2000 [Version 5.00.2195]
    (C) Copyright 1985-2000 Microsoft Corp.

    R:\>c:

    C:\>C:\WINNT\Microsoft.NET\Framework\v1.0.3705\aspnet_regiis -e
    Start removing the ASP.NET client side script files for this version (1.0.3705.0
    )
    Finished removing the ASP.NET client side script files for this version (1.0.370
    5.0)



    tom
    ****All we are saying is give war a chance****

  8. #8
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    now, pass the i switch to the command:

    ........\aspnet_regiis -i

    This will restore the asapi for the IIS. Sorry, I should have told you that too

  9. #9
    C# Aficionado Lord_Rat's Avatar
    Join Date
    Sep 2001
    Location
    Cave
    Posts
    2,497
    Also, make sure you have an @Page directive on your page as follows:

    <%@Page Language="VB" AutoEventWireup="true" %>
    Need to re-register ASP.NET?
    C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i

    (Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)

  10. #10

    Thread Starter
    Addicted Member
    Join Date
    Jan 2002
    Location
    Sharpsville, PA
    Posts
    135

    Wink Hot Dang!

    Putting that Line in my inline program did the trick.

    Now tell me.. Why in the @3$53$#54&*!! is this not mentioned
    in the damn book???

    Thanks a bunch! Nice to end the day with problems resolved!

    Tom
    ****All we are saying is give war a chance****

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width