By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,847 Members | 2,392 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,847 IT Pros & Developers. It's quick & easy.

XML Web Services Walkthrough

P: n/a
I am trying to get through the XML Web Services Walkthrough at this location:

Everything seems to work fine. Here’s the code from Service1.asmx.cs :

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Web;
using System.Web.Services;

namespace TempConvert1
/// <summary>
/// Summary description for Service1.
/// </summary>

Description="A temperature conversion service.")]

public class Service1 : System.Web.Services.WebService
public Service1()
//CODEGEN: This call is required by the ASP.NET Web
Services Designer

#region Component Designer generated code
//Required by the Web Services Designer

private IContainer components = null;

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>

private void InitializeComponent()

/// <summary>
/// Clean up any resources being used.
/// </summary>

protected override void Dispose( bool disposing )
if(disposing && components != null)


// The HelloWorld() example service returns the string Hello World
// To build, uncomment the following lines then save and build
the project
// To test this web service, press F5

[WebMethod(Description="This method converts a temperature in " +
"degrees Fahrenheit to a temperature in degrees Celsius.")]
public double ConvertTemperature(double dFahrenheit)
return ((dFahrenheit - 32) * 5) / 9;

It’s a simple application that allows you to enter a value in degrees
Fahrenheit and it converts the value to Celsius.

Well, when I run it, it opens an IE window with the function
“ConvertTemperature” as a link. I click on the link and it goes to another
page where it gives me a box with an “Invoke” button that allows me to enter
a value for the dFahrenheit value. But when I press “Invoke”, another IE
Window pops up and it gives me the HTTP “Page not found” error. The http
address this window uses looks like this:


where “amrit” is the server name, TempConvert1 is the name of the solution,
and Service1.asmx is the code file. There is no file “ConvertTemperature”
under Service1.asmx, which is probably why it’s giving me a Page Not Found
error. I assume that it should be calling the ConvertTemperature function
instead of trying to display the page itself, but I could be wrong.

Do you have any idea why this is happening?

Thanks so much if you can help me. I appreciate it.



Amrit Kohli


Nov 21 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.