473,756 Members | 5,129 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="MathServ ice" %>

using System;

using System.Web.Serv ices;

[WebService(Name space="Microsof t.Samples.XmlMe ssaging.WebServ ices")]

public class MathService {

[WebMethod]

public float Add(float a, float b)

{

return a + b;

}
}
Dec 3 '07 #1
5 3051
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**********@g mail.comwrote in message
news:ab******** *************** ***********@e1g 2000hsh.googleg roups.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**********@g mail.comwrote in message
news:ab******** *************** ***********@e1g 2000hsh.googleg roups.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**********@g mail.comwrote in message
news:%2******** **********@TK2M SFTNGP06.phx.gb l...
>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
6524
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 interest rate I, and annual service charge S. Your algorithm would then compute and print out the total amount of interest earned during the year and the final account balance at the end of the year (assuming that interest is compounded monthly, and...
4
16490
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" xmlns="http://ogsa.globus.org/any-service"><QName>abc</QName></anyRoot using TextReader tr = new StreamReader("c:\\test.xml") anyRootType rootType = (anyRootType)serializer.Deserialize(tr)
4
2057
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 trying to test my service on a remote win2000 server machine, accessing the machine as user "administrator" on remote desktop. Im just at the install stage and using the installutil.exe to register the service on the server. The install appears to...
0
1216
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 Invoke works as expected. However, when I run it as a service the Invoke command just bombs out without any errors and everything just stops. I have the service installed using an administrator account and interacting with the desktop for testing.
0
1067
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: System.Web.Services.WebService { //code }
9
2667
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 only return some constant data. First, I was using MOM 2005 (Windows 2003) to interogate the instances values.
2
2181
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 the server as well. The VMWare server is called W2K3. I created 2 web sites on the server. One called ResetPool, the other called TestReset. The ResetPool site is the target of a little web service that will force an app pool to recycle. The...
20
6751
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 xxx = new localhost.Service1(); localhost is not recognized by the compiler.
10
2136
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 System.Web.Services Imports System.Web.Services.Protocols Imports System.ComponentModel <System.Web.Services.WebService(Namespace:="http:// wwwpreview.#deleted#.co.uk/~ptaylor/Customer.wsdl")_
5
7077
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: <%@ page import="java.io.*" %> <HTML> <BODY> <% Runtime rt = Runtime.getRuntime(); Process p = rt.exec("/bin/ls");
0
9455
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9271
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9869
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9708
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8709
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6534
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5140
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5302
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3805
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.