Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 796665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T22:40:31+00:00 2026-05-14T22:40:31+00:00

I’m currently using jquery ajax to call a pagemethod (which works great); $.ajax({ type:

  • 0

I’m currently using jquery ajax to call a pagemethod (which works great);

$.ajax({
          type: "POST",
          url: "ArticleList.aspx/GetArticleTags",
          data: "{'articleId' : " + articleId + "}",
          contentType: "application/json; charset=utf-8",
          dataType: "json",
          success: function (msg) {
            if (msg.hasOwnProperty("d")) { msg = msg.d; }
            var tags = JSON.parse(msg);
            //do something
          }
        });

The pagemethod;

  <WebMethod()>
  Public Shared Function GetArticleTags(ByVal articleId As Integer) As String
    Using myDb As New MyRepository
      Dim js As New JavaScriptSerializer
      Dim returnString = js.Serialize((From t In myDb.GetArticleTags(articleId) Select t.TagId, t.Tag).ToList)
      Return returnString
    End Using
  End Function

I’m now in the position, where i need to access my GetArticleTags function from multiple pages. To quickly get it up and running i could

  1. Copy the function to my new aspx page, and call it in the same way.
  2. Continue to point to the original aspx page.

Both of which are pretty rubbish.

So the only reasonable way left is to call a wcf (webget) method.
This will have the benefit of meaning i won’t have to manually serialize the objects to json. It’ll be done for me.

I do have a restful webservice in the solution already, but i’m wary about calling it from my webapp. I’d rather all the code live within my webapp, not depend on a web service which will be in a different app pool on the same iis server. It may need to be cold-started etc, and i need this to be quick.

I’ve added a wcf file to my webapp using the template “AJAX-enabled WCF Service”. But then by doing this, i’m muddying up my webapp with endpoints in the web.config etc. (and i’m currently getting 500 System.ServiceModel.ServiceActivationException exception’s)

So, down to my question….
What’s the best way to call my function? (I’m thinking it has to be my restful webservice)
Is there another option that i’m not considering?

Thanks muchly.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T22:40:32+00:00Added an answer on May 14, 2026 at 10:40 pm

    You should make an AJAX-enabled ASMX service or use an ordinary ASHX handler.

    If you make an ASHX handler, you’ll need to handle parsing and security yourself; I recommend an ASMX service, which can be extremely similar to your page method.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am reading a book about Javascript and jQuery and using one of the
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I am currently running into a problem where an element is coming back from
I want use html5's new tag to play a wav file (currently only supported

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.