web service returns blank page when invoking

D

David

Hi Everyone!

I am working on a project for a directed study class and am having
problems with webservices.

I have .NET Framework version 1.1.4322.573 with IIS and Frontpage
Extensions installed and Visual Studio 2003. These are all a fresh
install as I removed and re-installed to try and fix the problem to no
avail.

What Happens
============
In Visual Studio I can create a new Web Service project, say
WebService1, and all is created fine on IIS. I then open the default
file created by Visual Studio (service1.asmx) and uncomment the "Hello
World" web service.

[WebMethod]
public string HelloWorld()
{
return "Hello World";
}

I can then browse to http://localhost/WebService1/s ervice1.asmx and
click the link for the web method HelloWorld. I then click the Invoke
button.
A new window opens and it is blank, there is nothing there. On 1 other
machine I have seen this work on campus where XML was returned with the
"Hello World" text in it, but not here. When I try to view source in
Internet Explorer the text for "Source" in the view menu is grayed out.

On 2 machines I have tried to get this to work and I get the same
result. I really do not know where to go.

I am writing an Instant Messenger app for C# and Web Services but I am
at a wall here where I can't move further until I can get the web
services to respond.

Thanks in advance for any help you can send my way!

-David R Underwood
drunderw AT presby.edu
 
K

Kevin Spencer

Did you rebuild the Web Service after making the change?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
The sun never sets on
the Kingdom of Heaven
 
D

David

Thanks Kevin for your response. I rebuilt the solution and web service
and I also created a new blank web serivice project in Visual Studio
that was just the default "HelloWorld" web service. Neither will work.
Thanks!
 
K

Kevin Spencer

Sorry to disappoint you, David, but I'm mystified. I can't think of a reason
offhand. You might try using the Debugger to step through the code when you
run it using F5.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
The sun never sets on
the Kingdom of Heaven
 
D

David

There are no unusual debugging codes - no errors represented. The only
thing that shows up in the debugger is shown below:

Auto-attach to process '[2968] aspnet_wp.exe' on machine 'WEBDEV'
succeeded.
'DefaultDomain': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\mscorlib.dll', No symbols
loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.web\1.0.5000.0__b03f5f7f11d50a3a\system.web.dll',
No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll',
No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dll',
No symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\mscorlib.dll', No symbols
loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\assembly\gac\system.web\1.0.5000.0__b03f5f7f11d50a3a\system.web.dll',
No symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll',
No symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dll',
No symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\assembly\gac\system.web.regularexpressions\1.0.5000.0__b03f5f7f11d50a3a\system.web.regularexpressions.dll',
No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.web.regularexpressions\1.0.5000.0__b03f5f7f11d50a3a\system.web.regularexpressions.dll',
No symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\assembly\gac\system.web.services\1.0.5000.0__b03f5f7f11d50a3a\system.web.services.dll',
No symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.drawing.dll',
No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.drawing.dll',
No symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\assembly\gac\system.web.mobile\1.0.5000.0__b03f5f7f11d50a3a\system.web.mobile.dll',
No symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net
files\webservice1\7984f4c2\26c7a006\assembly\dl2\399d6382\f02f7441_d592c501\webservice1.dll',
Symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseservices.dll',
No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseservices.dll',
No symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\assembly\gac\system.data\1.0.5000.0__b77a5c561934e089\system.data.dll',
No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.data\1.0.5000.0__b77a5c561934e089\system.data.dll',
No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseservices.thunk.dll',
No symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseservices.thunk.dll',
No symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net
files\webservice1\7984f4c2\26c7a006\wl0p5036.dll', Symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net
files\webservice1\7984f4c2\26c7a006\ibeem5u2.dll', Symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded 'e72kt9_f',
No symbols loaded.
 
D

David

Ok so I decided to load it in Mozilla instead of IE and Mozilla
displayed it but with an error: At the top of the page it reads:

"This XML file does not appear to have any style information associated
with it. The document tree is shown below."

Below it is:
<string>Hello World</string>
 
K

Kevin Spencer

Post the source code from Mozilla.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
The sun never sets on
the Kingdom of Heaven
 
D

David

http://localhost/WebService1/Service1.asmx?WSDL
===========================================

<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="http://tempuri.org/"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
targetNamespace="http://tempuri.org/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema elementFormDefault="qualified"
targetNamespace="http://tempuri.org/">
<s:element name="HelloWorld">
<s:complexType />
</s:element>
<s:element name="HelloWorldResponse">
<s:complexType>
<s:sequence>

<s:element minOccurs="0" maxOccurs="1"
name="HelloWorldResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
<wsdl:message name="HelloWorldSoapIn">
<wsdl:part name="parameters" element="tns:HelloWorld" />
</wsdl:message>

<wsdl:message name="HelloWorldSoapOut">
<wsdl:part name="parameters" element="tns:HelloWorldResponse" />
</wsdl:message>
<wsdl:portType name="Service1Soap">
<wsdl:eek:peration name="HelloWorld">
<wsdl:input message="tns:HelloWorldSoapIn" />
<wsdl:eek:utput message="tns:HelloWorldSoapOut" />
</wsdl:eek:peration>
</wsdl:portType>

<wsdl:binding name="Service1Soap" type="tns:Service1Soap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document" />
<wsdl:eek:peration name="HelloWorld">
<soap:eek:peration soapAction="http://tempuri.org/HelloWorld"
style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:eek:utput>
<soap:body use="literal" />

</wsdl:eek:utput>
</wsdl:eek:peration>
</wsdl:binding>
<wsdl:service name="Service1">
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/" />
<wsdl:port name="Service1Soap" binding="tns:Service1Soap">
<soap:address
location="http://localhost/WebService1/Service1.asmx" />
</wsdl:port>
</wsdl:service>

</wsdl:definitions>
 
K

Kevin Spencer

Very odd. I copied and pasted this into NotePad, saved it as an XML file,
and opened it in IE, with no problems. Perhaps it is an IE setting that is
causing your problem.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
The sun never sets on
the Kingdom of Heaven
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top