.asmx files vs .aspx

Discussion in 'ASP .Net Web Services' started by phoenix.cbe@gmail.com, Nov 9, 2005.

  1. Guest

    Hi All,
    I heard a scenario from my friend who tells me that they
    discourage the use of .asmx files to return XML data (AJAX), instead
    they ask him to write it as .aspx page. The reason he was told, was
    that .asmx services perform a tad slower than their .aspx counterparts.


    Is there any truth to this statement. I did a lot of googling, but
    found no fact substantiating this statement. Any light on this issue
    would be appreciated.

    Thanks
    RK
     
    , Nov 9, 2005
    #1
    1. Advertising

  2. Scott M. Guest

    ..asmx files are exclusively for exposing web services (not AJAX and not just
    strings of XML data).
    ..aspx files are exclusively for exposing a user interface (a web page).
    One is not a counterpart of the other, they each have specific purposes that
    are different from the other.

    Web pages can return XML, but that is not the same thing as a web service.
    Web services are classes that can be instantiated and uses remotely over
    http.


    <> wrote in message
    news:...
    > Hi All,
    > I heard a scenario from my friend who tells me that they
    > discourage the use of .asmx files to return XML data (AJAX), instead
    > they ask him to write it as .aspx page. The reason he was told, was
    > that .asmx services perform a tad slower than their .aspx counterparts.
    >
    >
    > Is there any truth to this statement. I did a lot of googling, but
    > found no fact substantiating this statement. Any light on this issue
    > would be appreciated.
    >
    > Thanks
    > RK
    >
     
    Scott M., Nov 9, 2005
    #2
    1. Advertising

  3. Guest

    Let me rephrase the question, I think I was not being clear.

    Say I want to return an XML stream(strings of XML data) which one
    should I use.

    I have seen a lot of scenarios where .asmx service returns a customized
    xml string not just object's XML (Business needs)

    Thanks
    RK
     
    , Nov 9, 2005
    #3
  4. Scott M. Guest

    It's not really a matter of which one to use for returning XML, that's not
    the point. They both can return XML.

    It's a matter of how you want to ask for that XML string in the first place.
    ..aspx pages can take an input argument that is passed to it via a
    querystring or form submission and return some XML as its response, or it
    can just return some XML as its response without you passing anything to it
    at all. But, when you work this way, you are not using a formalized
    Object-Oriented way or standardized XML way of asking for and receiving your
    XML.

    But, web services (.asmx) files are OBJECTS that expose functions via the
    web. If you wish to be able to remotely instantiate one of these objects so
    that you can call one of its functions, you need a web service (.asmx file).
    This is a much more OO way of doing things as well as following XML
    standards. Not to mention, that web services offer other benefits that
    simple web pages don't like the ability to query a server to see what
    services it offers and a more robust form of securing your services.

    Both require processing on the server and both will return XML. Speed isn't
    really going to be much of a factor if you are talkng about returning the
    same XML (more or less) in each case.



    <> wrote in message
    news:...
    > Let me rephrase the question, I think I was not being clear.
    >
    > Say I want to return an XML stream(strings of XML data) which one
    > should I use.
    >
    > I have seen a lot of scenarios where .asmx service returns a customized
    > xml string not just object's XML (Business needs)
    >
    > Thanks
    > RK
    >
     
    Scott M., Nov 10, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SamIAm
    Replies:
    1
    Views:
    476
    Ed Gibbs
    Dec 4, 2003
  2. John M
    Replies:
    1
    Views:
    1,256
    Kumar Reddi
    May 29, 2005
  3. Sledge

    Calling ASMX from ASPX File?

    Sledge, Aug 11, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    3,226
    Brock Allen
    Aug 11, 2005
  4. Navin Mishra

    ASMX and ASPX in same application ?

    Navin Mishra, Dec 14, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    3,971
    Scott M.
    Dec 14, 2005
  5. Replies:
    0
    Views:
    162
Loading...

Share This Page