+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Cruel ASP.NET

  1. #1
    shad0wr1d3r is offline x10Hosting Member shad0wr1d3r is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    8

    Cruel ASP.NET

    I am getting a very annoying error that I don't seem to be able to resolve :dunno:
    It's a very simple page that is meant to display current time using
    <% response.write(now()) %>

    I added the mono stuff using the apache extensions
    I uploaded all the files in the publish folder from visual studio 2008

    I took a screenie take a look:

  2. #2
    Livewire's Avatar
    Livewire is offline Abuse Compliance Officer Livewire is a glorious beacon of lightLivewire is a glorious beacon of light
    Join Date
    Jun 2005
    Location
    Behind a keyboard.
    Posts
    8,998

    Re: Cruel ASP.NET

    From what I can see in your asp.net code, you're missing a semicolon.
    Code:
    <% response.write(now()) %> //needs semi after now())
    The error that's displayed is because you have it set to not show the error message for security reasons; go into the web configuration file for your project, and replace the "Off" on customErrors mode="Off" to On. Been a while since I've messed with Asp.net though, not sure exactly where that file would be in your project :S


    TOS breakers will be suspended regardless of race, creed, national origin, hair color, or favorite food. Thanks for your understanding!

  3. #3
    garrettroyce's Avatar
    garrettroyce is offline Generally Helpful Member garrettroyce is a glorious beacon of lightgarrettroyce is a glorious beacon of light
    Join Date
    Apr 2008
    Location
    IL, USA
    Posts
    3,746

    Re: Cruel ASP.NET

    Did you try following the suggestion it gave you? Without the output from the error, it'll be really hard to track down.

    Is the function now() defined in the scope in which you are using it? I get two errors when using your code, but this works:

    <% Response.Write(System.DateTime.Now); %>

    As livewire said, the semicolon is a problem.
    Last edited by garrettroyce; 05-08-2009 at 04:24 PM.
    gjr.gr - coming soon: secrets of OCD coding from a self taught tinkerer

  4. #4
    shad0wr1d3r is offline x10Hosting Member shad0wr1d3r is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    8

    Re: Cruel ASP.NET

    here is the full code:
    Code:
    
    <%@PageLanguage="vb"AutoEventWireup="false"CodeBehind="Default.aspx.vb"Inherits="TheTime._Default" %>
    <!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <htmlxmlns="http://www.w3.org/1999/xhtml">
    <headrunat="server">
    <title>Current Time</title>
    </head>
    <body>
    <formid="form1"runat="server">
    <div>
    <% Response.Write(Now())%>
    </div>
    </form>
    </body>
    </html>
    
    and it runs on the test server at home with no probs

    BTW: You don't use semicolons in vb

    Can someone tel me how to enable the error thing cause It doesn't work when I try LOLZ
    Last edited by shad0wr1d3r; 05-08-2009 at 04:28 PM. Reason: Automerged Doublepost

  5. #5
    garrettroyce's Avatar
    garrettroyce is offline Generally Helpful Member garrettroyce is a glorious beacon of lightgarrettroyce is a glorious beacon of light
    Join Date
    Apr 2008
    Location
    IL, USA
    Posts
    3,746

    Re: Cruel ASP.NET

    OH, VB. I was using C# :P

    What are you using to generate the files? When I use visual web express from Microsoft, the output almost always works without a problem when I change from my computer to the server, though I don't really use ASP.NET much.

    You're missing some whitespace. That seems to be the biggest problem when I import your code. I'm looking it over more now.

    EDIT: Yeah, looks just like a whitespace issue.
    Last edited by garrettroyce; 05-08-2009 at 04:40 PM.
    gjr.gr - coming soon: secrets of OCD coding from a self taught tinkerer

  6. #6
    shad0wr1d3r is offline x10Hosting Member shad0wr1d3r is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    8

    Re: Cruel ASP.NET

    I am using visual studio 2008 (proper one)

    here is the another screen shot:

    That is the custom error thingy, right?

    The strange and somewhat funny part is that the file (Default.aspx) is the main page! =*(
    Last edited by shad0wr1d3r; 05-08-2009 at 04:40 PM.

  7. #7
    garrettroyce's Avatar
    garrettroyce is offline Generally Helpful Member garrettroyce is a glorious beacon of lightgarrettroyce is a glorious beacon of light
    Join Date
    Apr 2008
    Location
    IL, USA
    Posts
    3,746

    Re: Cruel ASP.NET

    Yeah, your error page is helpful now. I get the same error. Does a file named "Default.aspx.vb" exist in the same directory as well as the file that defines TheTime._Default (which should be the same file)?
    Last edited by garrettroyce; 05-08-2009 at 04:44 PM.
    gjr.gr - coming soon: secrets of OCD coding from a self taught tinkerer

  8. #8
    shad0wr1d3r is offline x10Hosting Member shad0wr1d3r is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    8

    Re: Cruel ASP.NET

    Quote Originally Posted by garrettroyce View Post
    Yeah, your error page is helpful now. I get the same error. Does a file named "Default.aspx.vb" exist in the same directory as well as the file that defines TheTime._Default (which should be the same file)?
    default.aspx.vb was not in the publish folder =(. Uploading low, see if anything changes
    Edit:
    uploaded default.aspx.vb and the default.aspx.designer.vb and no change =(

    NVM, I'll learn PHP instead =*(((((((((((
    Last edited by shad0wr1d3r; 05-08-2009 at 04:54 PM. Reason: additional details

  9. #9
    garrettroyce's Avatar
    garrettroyce is offline Generally Helpful Member garrettroyce is a glorious beacon of lightgarrettroyce is a glorious beacon of light
    Join Date
    Apr 2008
    Location
    IL, USA
    Posts
    3,746

    Re: Cruel ASP.NET

    :P I did the same thing. I love PHP and I'm glad I never looked back.

    Your Default.aspx.vb should have a "public partial class" (I think this is the same in VB) called _Default. I don't know why it's in a different namespace ("TheTime")
    gjr.gr - coming soon: secrets of OCD coding from a self taught tinkerer

  10. #10
    shad0wr1d3r is offline x10Hosting Member shad0wr1d3r is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    8

    Re: Cruel ASP.NET

    I suck at PHP, can barelly code Data entry pages for MySQL

    and no there is no more crappy files like you mentioned

+ Reply to Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. ASP.Net and FTP on Free Account?
    By the7ven in forum Free Hosting
    Replies: 1
    Last Post: 03-06-2009, 11:05 AM
  2. ASP.NET not linking to code behind??
    By angrywasp in forum Programming Help
    Replies: 9
    Last Post: 06-30-2008, 02:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers