Web服务在调用时返回空白页 [英] web service returns blank page when invoking
问题描述
大家好!
我正在为一个定向学习课程的项目工作,并且我有一个与web服务有关的
问题。
我有.NET Framework版本1.1.4322.573,带有IIS和Frontpage
扩展安装和Visual Studio 2003.这些都是新的
安装,因为我删除并重新安装以尝试解决问题没有
可用。
发生了什么
===== =======
在Visual Studio中,我可以创建一个新的Web服务项目,比如
WebService1,所有这些都在IIS上创建。然后我打开由Visual Studio(service1.asmx)创建的默认
文件,并取消注释Hello
World。网络服务。
[WebMethod]
公共字符串HelloWorld()
{
返回& ; Hello World" ;;
}
然后我可以浏览到 http:// localhost / WebService1 / s ervice1.asmx和
单击Web方法HelloWorld的链接。然后我点击Invoke
按钮。
打开一个新窗口,它是空白的,那里什么都没有。在另外一台
Hello World。文字在里面,但不在这里。当我尝试查看
Internet Explorer中的源代码时,Source的文本为在视图菜单中显示为灰色。
在2台机器上我试图让它工作,我得到相同的
结果。我真的不知道该往哪里去。
我正在为C#和Web Services编写一个Instant Messenger应用程序,但是我在这里的墙上是
我无法继续前进,直到我可以获得网站
服务来回复。
提前感谢您提供任何帮助,我们可以发送给您! />
-David R Underwood
drunderw AT presby.edu
< blockquote>你做了改动后重建了Web服务吗?
-
HTH,
Kevin Spencer
Microsoft MVP
..Net开发人员
太阳永远不会出现在天堂王国的b $ b上/>
" David" <博士****** @ presby.edu>在消息中写道
news:11 ********************** @ g43g2000cwa.googlegr oups.com ...
大家好!
我正在为一个定向学习班的项目工作,并且我遇到了webservices的问题。
我有.NET Framework版本1.1.4322.573与IIS和FrontPage
扩展安装和Visual Studio 2003.这些都是一个新的
安装,因为我删除并重新安装,以尝试解决问题没有
利用。
发生了什么
============
在Visual Studio中我可以创建一个新的Web服务项目,比如说
WebService1,以及所有在IIS上都可以正常创建。然后我打开由Visual Studio(service1.asmx)创建的默认
文件,并取消注释Hello
World。网络服务。
[WebMethod]
公共字符串HelloWorld()
{
返回Hello World;
}
http:// localhost / WebService1 / s ervice1.asmx和
单击Web方法HelloWorld的链接。然后我点击Invoke
按钮。
一个新窗口打开,它是空白的,那里什么都没有。在另外一台
机器上,我在校园里看到了这项工作,其中XML与
Hello World一起返回。文字在里面,但不在这里。当我尝试在Internet Explorer中查看源代码时,Source的文本在视图菜单中显示为灰色。
在2台机器上我试图让它工作,我得到相同的结果。我真的不知道去哪里。
我正在为C#和Web Services编写一个Instant Messenger应用程序,但是我在这里的墙上,我无法继续前进,直到我可以获得网页
服务以作出回应。
提前感谢您提供的任何帮助!
-David R Underwood
drunderw AT presby.edu
感谢Kevin的回复。我重建了解决方案和Web服务
我还在Visual Studio中创建了一个新的空白Web服务项目
,这只是默认的HelloWorld。网络服务。两者都不会起作用。
谢谢!
抱歉让大卫失望,但我很神秘。我无法想到一个原因
offhand。当您使用F5运行它时,您可以尝试使用调试器来逐步执行代码。
-
HTH,
Kevin Spencer
Microsoft MVP
..Net开发人员
太阳永远不会开启
天国
" David" <博士****** @ presby.edu>在消息中写道
news:11 ********************** @ g14g2000cwa.googlegr oups.com ...感谢Kevin的回复。我重建了解决方案和Web服务
我还在Visual Studio中创建了一个新的空白Web服务项目
,它只是默认的HelloWorld。网络服务。两者都不会起作用。
谢谢!
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
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
"David" <dr******@presby.edu> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...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
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!
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
"David" <dr******@presby.edu> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...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!
这篇关于Web服务在调用时返回空白页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!