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

Thread: ASP not working on my site

  1. #1
    matty1980 is offline x10Hosting Member matty1980 is an unknown quantity at this point
    Join Date
    Apr 2009
    Location
    Jamestown, NY
    Posts
    6

    Exclamation ASP not working on my site

    Hello.

    ASP does not seem to be working on my site here at x10. However, it works on my local machine. I created the page with MS Visual Web Developer using VB and uploaded all of the associated files to x10's server. Like I said the very basic "Hello World" web app works on my local machine. Here is my site's error message

    Server Error in '/' Application

    Compilation Error

    Description: Error compiling a resource required to service this request. Review your source file and modify it to fix this error.
    Compiler Error Message: VBNC30506: Handles clause requires a variable declared with WithEvents.
    /Default.aspxVersion information: Mono Version: 2.0.50727.1433; ASP.NET Version: 2.0.50727.1433




    If you need my specific coding that I used or the versions of ASP.NET just tell me otherwise

    PLEASE HELP!

    Thank You
    Novice

  2. #2
    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: ASP not working on my site

    The problem is with your code, not with the server. If this code worked on your own computer, but not on your website, it is because X10 has no Windows servers and only supports ASP.NET through mono and mono does not fully support everything ASP.NET for Windows does.

    See the documentation for MONO for more information: http://mono-project.com/Main_Page

    With that being said, you're getting a Visual Basic error number 30506: http://msdn.microsoft.com/en-us/libr...t6(VS.80).aspx

    Check your code where you have your handlers defined, and make sure that they are correctly defined.
    Last edited by garrettroyce; 09-23-2009 at 07:39 PM.
    gjr.gr - coming soon: secrets of OCD coding from a self taught tinkerer

  3. #3
    matty1980 is offline x10Hosting Member matty1980 is an unknown quantity at this point
    Join Date
    Apr 2009
    Location
    Jamestown, NY
    Posts
    6

    Re: ASP not working on my site

    Thanks I know where you are talking about but what do i put there?

  4. #4
    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: ASP not working on my site

    Could you post the code where the error is coming from? I'm not very big on VB, but I can probably fumble through it.

    Oh, I see it now.

    Any element that can raise an event, must be declared WithEvents, similar to public, private, etc.

    For example:

    Code:
    // A regular button
    Protected Button As LinkButton
    
    // A button with events
    Protected WithEvents Button As LinkButton
    Last edited by garrettroyce; 09-23-2009 at 09:56 PM.
    gjr.gr - coming soon: secrets of OCD coding from a self taught tinkerer

  5. #5
    matty1980 is offline x10Hosting Member matty1980 is an unknown quantity at this point
    Join Date
    Apr 2009
    Location
    Jamestown, NY
    Posts
    6

    Smile Re: ASP not working on my site

    Yeah.

    Here is the default.aspx.vb code:

    Partial Class _Default
    Inherits System.Web.UI.Page

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
    Label1.Text = "Hello World"

    End Sub
    End Class

  6. #6
    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: ASP not working on my site

    You never define Button1.

    Protected WithEvents Button1 As LinkButton

    I hope that's right....I've never used VB, but I've used VC# and that looks right to me :P
    gjr.gr - coming soon: secrets of OCD coding from a self taught tinkerer

  7. #7
    Hue Kares's Avatar
    Hue Kares is offline x10Hosting Member Hue Kares is an unknown quantity at this point
    Join Date
    Feb 2009
    Location
    UK
    Posts
    38

    Re: ASP not working on my site

    Garrett, I hope you don't mind me butting in; there's nothing wrong with your code (apart from you defined a LinkButton, rather than a Button), but he'll run into more issues this way. FYI, Button1 will already be defined in the html, as so:
    Code:
    <asp:Button id="Button1" Text="Blah" />
    matty1980, I have been assisting someone else with ASP.net/VB in another thread here, and I explain how to solve your exact problem in the last post of the thread, so I won't repeat it here.

    Go check that thread out, and If you're still having trouble, come back. Good luck.

  8. #8
    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: ASP not working on my site

    Not at all :P

    It's nice to see that Microsoft's documentation of this error is terrible and unhelpful :D
    gjr.gr - coming soon: secrets of OCD coding from a self taught tinkerer

  9. #9
    matty1980 is offline x10Hosting Member matty1980 is an unknown quantity at this point
    Join Date
    Apr 2009
    Location
    Jamestown, NY
    Posts
    6

    Re: ASP not working on my site

    Thanks.
    I think there is something wrong with my code because i tried using no whatever.aspx.vb file just plain asp and it worked so i'll check the other thread

  10. #10
    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: ASP not working on my site

    Yeah, the server will only recognize .aspx I think. The .aspx.vb files are meant to be included by your main file and not to be viewed directly though, I think.
    gjr.gr - coming soon: secrets of OCD coding from a self taught tinkerer

+ Reply to Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. My site is not working
    By almend in forum Free Hosting
    Replies: 1
    Last Post: 09-19-2009, 11:30 AM
  2. Uploading site files not working
    By lenabrad in forum Free Hosting
    Replies: 15
    Last Post: 06-29-2009, 10:05 AM
  3. CPanel not working Now site cant be found.
    By DrJeckyl in forum Free Hosting
    Replies: 17
    Last Post: 02-04-2008, 09:21 AM
  4. Replies: 7
    Last Post: 01-24-2008, 07:04 AM
  5. Cpanel down and my web site down. All the time
    By mgiannel in forum Free Hosting
    Replies: 3
    Last Post: 12-23-2007, 09:54 PM

Tags for this Thread

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