HighTechTalks DotNet Forums  

websetvice test in browser question

ASP.net Web Services microsoft.public.dotnet.framework.aspnet.webservices


Discuss websetvice test in browser question in the ASP.net Web Services forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Andy
 
Posts: n/a

Default websetvice test in browser question - 12-02-2007 , 09:54 PM






Hi,
below is simple webservice wich I'd like to test in my local host but 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 tell me why? What I'm missing?
From Visual Studio this works.
below is sample web service 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;
}
}



Reply With Quote
  #2  
Old   
Tiago Halm
 
Posts: n/a

Default Re: websetvice test in browser question - 12-06-2007 , 05:25 PM






Check if you have the ASMX extension configured in IIS.
Basically, re-register aspnet with aspnet_regiis if in doubt.

Tiago Halm

"Andy" <kc2ine (AT) yahoo (DOT) com> wrote

Quote:
Hi,
below is simple webservice wich I'd like to test in my local host but 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 tell me why? What I'm missing?
From Visual Studio this works.
below is sample web service 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;
}
}





Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.