473,396 Members | 2,109 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

simple web service test?

Hi,

below is simple webservice wich I'd like to test in my local host and when I
put http://localhost/test.asmx I'm getting this error:

XML Parsing Error: no element found
Location: http://localhost/test.asmx
Line Number 1, Column 1:

Can somebody help me why? What I'm missing?

below is sample web setvice code:

<%@ WebService Language="C#" Class="MathService" %>

using System;

using System.Web.Services;

[WebService(Namespace="Microsoft.Samples.XmlMessagi ng.WebServices")]

public class MathService {

[WebMethod]

public float Add(float a, float b)

{

return a + b;

}
}
Dec 3 '07 #1
5 3029
The code as posted works fine for me. Is there any more information in
the error message? I'm wondering if this relates more to configuration
(perhaps web.config or the web-server setup) than code.

What web-server are you using to host this; IIS? You might also want
to verify that it is configured as an application, and is running the
correct version of ASP.NET.

Marc
Dec 3 '07 #2
thanks for tips,
yes this is IIS, asp 2.0, interesting but I cannot start deafault website,
I'm gettin unexpected error, but I can succesfully restart IIS....
no idea what to do now
"Marc Gravell" <ma**********@gmail.comwrote in message
news:ab**********************************@e1g2000h sh.googlegroups.com...
The code as posted works fine for me. Is there any more information in
the error message? I'm wondering if this relates more to configuration
(perhaps web.config or the web-server setup) than code.

What web-server are you using to host this; IIS? You might also want
to verify that it is configured as an application, and is running the
correct version of ASP.NET.

Marc

Dec 3 '07 #3
on 3-12-2007, Andy supposed :
thanks for tips,
yes this is IIS, asp 2.0, interesting but I cannot start deafault website,
I'm gettin unexpected error, but I can succesfully restart IIS....
no idea what to do now
I'll repeat what Marc said: "is there more information in the error
message"?
The fact that there was some error is not enough to diagnose the
problem. Usually the error message gives some hints about the problem
and sometimes even how to fix it.

See if the complete error message rings a bell. If not, post the
complete error message (minus irrelevant private stuff, maybe).

Hans Kesting
>
"Marc Gravell" <ma**********@gmail.comwrote in message
news:ab**********************************@e1g2000h sh.googlegroups.com...
>The code as posted works fine for me. Is there any more information in
the error message? I'm wondering if this relates more to configuration
(perhaps web.config or the web-server setup) than code.

What web-server are you using to host this; IIS? You might also want
to verify that it is configured as an application, and is running the
correct version of ASP.NET.

Marc

Dec 3 '07 #4
See if the complete error message rings a bell. If not, post the
complete error message (minus irrelevant private stuff, maybe).
And check the event-log. That is the default dumping-ground when it
panics.

Marc
Dec 3 '07 #5
OK, when I try to start default website I'm getting this error in the event
viewer: source W3SVC

The service could not bind instance 1. The data is the error code.
For additional information specific to this message please visit the
Microsoft Online Support site located at:
http://www.microsoft.com/contentredirect.asp.

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.

data:
0000: 40 27 00 00 @'..

I guess because my defalt website is not running I cannot run local host?
On IE I'm getting page not found on localhost. Could SQL Server messed up
something?
thanks
"Marc Gravell" <ma**********@gmail.comwrote in message
news:%2******************@TK2MSFTNGP06.phx.gbl...
>See if the complete error message rings a bell. If not, post the complete
error message (minus irrelevant private stuff, maybe).

And check the event-log. That is the default dumping-ground when it
panics.

Marc

Dec 4 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: savesdeday | last post by:
In my beginnning computer science class we were asked to translate a simple interest problem. We are expected to write an algorithm that gets values for the starting account balance B, annual...
4
by: Andre | last post by:
Hello I want to deserialize the following xml <anyRoot xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"...
4
by: Claire | last post by:
Hi, I know this isn't strictly C# language related, but my service IS written in c# and I checked out the list of microsoft newsgroups for win2000 and couldn't really see one that applies. I'm...
0
by: Mike | last post by:
Hi All, I am using a COM object and so I have to use a form for it to work. The problem is I need to run it as a service as well. When I run it in a test scenario everything works fine and...
0
by: Sathyaish | last post by:
I've written a Web Service that has main service class. Let's call the main class that exposes the service interface as Service1. So, we have: public class Service1:...
9
by: Andrew | last post by:
Hi, I implemented a simple WMI Provider in C#. It is a service which expose 10 instances of a simple WMI Class. The WMI class pnly expose 4 public properties (Value,Min,Max,StdValue) which...
2
by: heddy | last post by:
Howdy folks. I am trying to build a web service using the following configuration: I have Windows 2003 Server running in VMware. I have IIS set up on it. I installed the .NET 2.0 package on...
20
by: =?Utf-8?B?cmtibmFpcg==?= | last post by:
I was executing the steps given in http://suppor.microsoft.com/kb/308359 for testing a sample web service application. However, the following line gives a compilation error: localhost.Service1...
10
by: Phillip Taylor | last post by:
Hi guys, I'm looking to develop a simple web service in VB.NET but I'm having some trivial issues. In Visual Studio I create a web services project and change the asmx.vb file to this: Imports...
5
by: sayeo87 | last post by:
Hi, I am quite new to JSP so please forgive me if I ask really simple things... I am trying to run system commands on the server and display the output on a webpage. This is what I've got: <%@...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.