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 7732103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T06:38:52+00:00 2026-06-01T06:38:52+00:00

I created a web method but when i go to the site and type

  • 0

I created a web method but when i go to the site and type for example http://mysite.com/services/Amounts/GetAmount it returns an error Internal Server Error 500. After investigating the issue in event logs etc,, it says GetAmount invalid method name. but i know the mame is fine

[WebMethod(EnableSession=true)]
public string GetAmount(Amounts amts)
{
    //some logic here to add to the database.
}

What are the possible issues that I have to look into when this type of error shows?, I checked all the references and everything is named properly “GetAmount”.

  • 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-06-01T06:38:53+00:00Added an answer on June 1, 2026 at 6:38 am

    What are you trying to do here? You need to post more code and web.config. Which version of .NET you are using here? All this information may get you the better answer.

    Firstly, your URL http://example.org/services/Amounts/GetAmount does not seems to be correct – there has to be .asmx somewhere unless you are using ASP.NET routing or some url rewriting.

    Assuming that your routing/re-writing is indeed working correctly:
    in general, if its a normal SOAP Web Service then enable HTTP get –

    <webServices>
        <protocols>
          <add name="HttpGet" />
          <add name="HttpPost" />
        </protocols>
    </webServices>
    

    If you are trying create a service callable from script (ScriptService) then for asmx service, you need to mark the method as ScriptService and you may need to adjust web.config based on your .NET version. Also you need to enable HTTP GET – for example,

    [ScriptMethod(UseHttpGet = true)]
    public string GetAmount(Amounts amts)
    

    You may also need to adjust Response Format whether you want JSON or XML.

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

Sidebar

Related Questions

Can anyone explain a parse error like this one: Method 'get_EnableCdn' in type 'System.Web.UI.ScriptManager'
I have a web service method in which I create a particular type of
I created a web service using Apache cfx and spring, it works, but I
I've created an Html extension method in Helper class, but I can not get
I am programatically creating a sharepoint 2010 site in a web method. When the
I want to create a web site in my setup project using Microsoft.Web.Administration.ServerManager.Sites.Add method,
I created an asp.net mvc web site My problem is how to implemented overload
[WebService(Namespace = http://service.site.com/service/news)] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [ToolboxItem(false)] [ScriptService] public class NewsService : System.Web.Services.WebService {
I've created a [WebMethod] on ASP.NET Web Service which reads XML documents from different
I have created web pages where am using pixel to position various html elements.

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.