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

simple web service test?

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.