browse WSDL error
-
Hello everyone, I met with issues when browse for WSDL information for a web service. When I am using F5 in Visual Studio to browse http://localhost:21530/Service1.asmx, everything is fine (e.g. web service textual description is shown) But when I pubish the web services to my local IIS 6.0 server and browse from IE http://localhost/Service1.asmx, here are the error message and my simple web services source code. Does anyone have any ideas why?
\[WebService(Namespace = "http://tempuri.org/")\] \[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1\_1)\] \[System.ComponentModel.ToolboxItem(false)\] public class Service1 : System.Web.Services.WebService { \[WebMethod\] public double HelloWorld() { return new Random().NextDouble(); } }
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
A name was started with an invalid character. Error processing resource 'http://localhost/Service1.asmx'. Line 1, Position...
<%@ WebService Language="C#" CodeBehind="Service1.asmx.cs" Class="TestWebServicePerformancev1.Service1" %>
-^thanks in advance, George
-
Hello everyone, I met with issues when browse for WSDL information for a web service. When I am using F5 in Visual Studio to browse http://localhost:21530/Service1.asmx, everything is fine (e.g. web service textual description is shown) But when I pubish the web services to my local IIS 6.0 server and browse from IE http://localhost/Service1.asmx, here are the error message and my simple web services source code. Does anyone have any ideas why?
\[WebService(Namespace = "http://tempuri.org/")\] \[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1\_1)\] \[System.ComponentModel.ToolboxItem(false)\] public class Service1 : System.Web.Services.WebService { \[WebMethod\] public double HelloWorld() { return new Random().NextDouble(); } }
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
A name was started with an invalid character. Error processing resource 'http://localhost/Service1.asmx'. Line 1, Position...
<%@ WebService Language="C#" CodeBehind="Service1.asmx.cs" Class="TestWebServicePerformancev1.Service1" %>
-^thanks in advance, George
Probably it's security issue of your server. Check your Web.settings
-
Probably it's security issue of your server. Check your Web.settings
Where do you mean the Web.setings file? Do you mean Web.config? regards, George
-
Where do you mean the Web.setings file? Do you mean Web.config? regards, George
I'm sorry my mistake. I mean check your web.config and server configuration where you upload your files as well. I had similar problem.
-
I'm sorry my mistake. I mean check your web.config and server configuration where you upload your files as well. I had similar problem.
Here is the content for web.config. Are there anything wrong? :-)
<?xml version="1.0"?>
<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true">
</compilation>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"> <error statusCode="403" redirect="NoAccess.htm" /> <error statusCode="404" redirect="FileNotFound.htm" /> </customErrors> --> </system.web>
</configuration>
regards, George