?
Solved

IIS 7 configuring .asmx WEB SERVICE TO WORK

Posted on 2010-08-18
3
Medium Priority
?
2,607 Views
Last Modified: 2012-05-10
I have just had to reinstall the lot basically. My current project uses webservice, .asmx to make ajax calls to server to return data and respond without page refresh.

IIS has been enabled a new. I cannot get my .js method to successfully call server side web service method. I just get an error stating that service is undefined.

Here is my code, from what i gather it is correct and is something I need to do to enable IIS once again to correctly allow .asmx web services to work, any ideas?

Here is page reference:

<body>
    <form runat="server">
     <ajaxToolkit:ToolkitScriptManager ID="ScriptManager1" EnablePageMethods="true" runat="server">
                <Scripts>
                    <asp:ScriptReference Path="ServiceClientScript.js" />
                </Scripts>
                <Services>
                    <asp:ServiceReference  Path="Service.asmx" />
                </Services>                
            </ajaxToolkit:ToolkitScriptManager>
        <div class="page">        
            <asp:ContentPlaceHolder ID="MainContent" runat="server"/>
        </div>      
    </form>
</body>

Here is .asmx
<%@ WebService Language="C#" CodeBehind="~/App_Code/Service.cs" Class="Tester.Call.Service" %>

Here is .cs web service method:

namespace Tester.Call
{
    /// <summary>
    /// Summary description for Service
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
    [System.Web.Script.Services.ScriptService]
    public class Service : System.Web.Services.WebService
    {
        [WebMethod]
        public string HelloWorld()
        {
            int one = 1 + 2;
            return "Hello World";
        }

    }

}

here is calling .js funtion:

function ClickMe() {
    Tester.Call.SpriteProficientServices.HelloWorld();
}

I would be grateful for any guidance, I am using Vista home premium with IIS 7 and .NET 2010. It all worked fine befor re-install of OS.
0
Comment
Question by:gillsboy123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 18

Expert Comment

by:Anil Golamari
ID: 33465260
0
 

Author Comment

by:gillsboy123
ID: 33465519
Thats of no use for me. As far as I am aware WCF is not what I am doing. Also I am not running a Windows Service. Iam just trying to get my .asmx files and server Side Web Service.cs file to work in IIS 7.

It works fine in webdev, but naturally I need it in IIS.
0
 
LVL 18

Accepted Solution

by:
Anil Golamari earned 2000 total points
ID: 33465683
http://krismanohar.com/blog/?p=34  ( publishing Web service in IIS)
0

Featured Post

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Running classic asp applications under Windows Server 2008 R2 (x64) and IIS 7 is not as easy as one may think. It took me a while to figure it out while getting error 8002801d a few times. After you install the OS you will need to install the fol…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question