Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. some WebMethods in aspx and some in asmx

some WebMethods in aspx and some in asmx

Scheduled Pinned Locked Moved ASP.NET
csharpjavascriptasp-nethelpquestion
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Seishin
    wrote on last edited by
    #1

    Hi I'm using Asp.net 4 with url routing. I've got a WebmMethods.asmx file with some methods and another file - WebMethods.aspx with the same set of methods (ctrl+c, ctrl+v) and I call them from jQuery code with $.ajax (POST) function.. and there's this problem that just blows my mind.. on one page (default: http://localhost:3333/site/) calling methods from the aspx files throw 500 exception 'unknown method' while calling them from the asmx file works just fine. on another page (somePage: http://localhost:3333/site/somePage/) it goes the other way round: calling from asmx file throws the same exception and from aspx works. I use absolute paths - the files are found by the calls but methods not - when I used some other path I got 'resource not found exception' so what the hell? I've spent a few hours googling the problem but found nothing.. If anybody had similar problem or knows why it's like this PLEASE enlighten me :)

    life is study!!!

    S 1 Reply Last reply
    0
    • S Seishin

      Hi I'm using Asp.net 4 with url routing. I've got a WebmMethods.asmx file with some methods and another file - WebMethods.aspx with the same set of methods (ctrl+c, ctrl+v) and I call them from jQuery code with $.ajax (POST) function.. and there's this problem that just blows my mind.. on one page (default: http://localhost:3333/site/) calling methods from the aspx files throw 500 exception 'unknown method' while calling them from the asmx file works just fine. on another page (somePage: http://localhost:3333/site/somePage/) it goes the other way round: calling from asmx file throws the same exception and from aspx works. I use absolute paths - the files are found by the calls but methods not - when I used some other path I got 'resource not found exception' so what the hell? I've spent a few hours googling the problem but found nothing.. If anybody had similar problem or knows why it's like this PLEASE enlighten me :)

      life is study!!!

      S Offline
      S Offline
      Seishin
      wrote on last edited by
      #2

      problem solved.. some methods were static and some not.. static methods worked in aspx and not in asmx and vice-versa.. damn it..

      life is study!!!

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups