VS2008和Webservice [英] VS2008 and Webservice

查看:107
本文介绍了VS2008和Webservice的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在尝试在Win2003

服务器盒上开发web服务和aspx客户端。 IDE是VS2008。

这个东西看起来完全不稳定。

Webservice编译并发布没有错误。

使用 http:// localhost:2092 / EasyVend0r.asmx (注意

使用IDE分配的端口)

没问题。


但是启动浏览器并使用发布的URL访问ASMX

http:localhost // EasyVend0r.asmx你得到

解析器错误消息:无法创建类型''EasyVend0r.EasyVend0r''。


来源错误:


第1行:<%@ WebService语言=" C#" CodeBehind =" EasyVend0r.asmx.cs"

Class =" EasyVend0r.EasyVend0r" %>


尝试访问aspx客户端页面时出现类似错误。


基本上只要你留在IDE中或使用IDE

分配给你的端口你可以查看asmx和aspx

走到外面然后车轮掉下来。


我不是网络开发人员所以我可能错过了一些基本的

步骤。


但是根据

IDE但是浏览器对''已发布''即未指定的

端口结果不满意。

我不记得这样的悲伤了VS2005

关于我做错了什么的线索?


谢谢

Bob

Hi,
I am trying to develop a webservice and an aspx client on a Win2003
server box. The IDE is VS2008.
The thing just seems totally flaky.
Webservice compiles and publishes with no errors.
Access the Service with http://localhost:2092/EasyVend0r.asmx (Note
using the port assigned by the IDE)
and no problem.

But start a browser and go to access the ASMX with the published URL
of http:localhost//EasyVend0r.asmx and you get
Parser Error Message: Could not create type ''EasyVend0r.EasyVend0r''.

Source Error:

Line 1: <%@ WebService Language="C#" CodeBehind="EasyVend0r.asmx.cs"
Class="EasyVend0r.EasyVend0r" %>

Getting similar errors when trying to access the aspx client page.

Basically as long as you stay in the IDE or use the port that the IDE
has assigned you can view the asmx and aspx
Go outside and the wheels fall off.

I am not a web developer so I am probably missing some fundamental
step.

But it is annoying that everything seems to deploy OK according to the
IDE but the browser is unhappy with the ''published'' i.e. Unspecified
port result.
I don''t remember grief like this with VS2005
Any clues as to what I am doing wrong?

Thanks
Bob

推荐答案

bob写道:
bob wrote:

Webservice编译并发布没有错误。

访问服务与 http:// localhost:2092 / EasyVend0r.asmx (注意

使用IDE分配的端口)

和没问题。


但是启动一个浏览器并使用已发布的U​​RL访问ASMX

的http:localhost // EasyVend0r.asmx然后你得到

分析器错误消息:无法创建类型''EasyVend0r.EasyVend0r''。

[...]

第1行:<% @ WebService Language =" C#" CodeBehind =" EasyVend0r.asmx.cs"

Class =" EasyVend0r.EasyVend0r" %GT;
Webservice compiles and publishes with no errors.
Access the Service with http://localhost:2092/EasyVend0r.asmx (Note
using the port assigned by the IDE)
and no problem.

But start a browser and go to access the ASMX with the published URL
of http:localhost//EasyVend0r.asmx and you get
Parser Error Message: Could not create type ''EasyVend0r.EasyVend0r''.
[...]
Line 1: <%@ WebService Language="C#" CodeBehind="EasyVend0r.asmx.cs"
Class="EasyVend0r.EasyVend0r" %>



Bob,当您从IDE运行时,您在选定端口上使用内置网络服务器

(卡西尼号)。 br />

使用/ localhost /时,如果没有端口,则必须在PC上安装的服务器(IE)上使用虚拟的

目录。 />

显然你没有正确地将整个web服务发布到这个

虚拟目录。尝试使用IDE中的Publish_Website选项。


看起来你也在使用根虚拟目录,这可能不是明智的。请注意,发布工具将清理这是目标文件夹。


-HH-

Bob, when you run from the IDE you are using the built-in webserver
(Cassini), on a selected port.

When you use /localhost/ , without a port, you must be using a virtual
directory on the installed server (IE) on your PC.

Apparently you did not correctly publish the entire webservice to this
virtual directory. Try using the Publish_Website option from the IDE.

It also looks like you are using the root virtual dir, that may not be
wise. Be aware that the Publish tool will "clean" it''s target folder.

-HH-


bob写道:
bob wrote:

Webservice编译并发布没有错误。

使用 http:// localhost:2092 / EasyVend0r.asmx (注意

使用IDE分配的端口)

和没问题。


但是启动一个浏览器并使用已发布的U​​RL访问ASMX

的http:localhost // EasyVend0r.asmx然后你得到

分析器错误消息:无法创建类型''EasyVend0r.EasyVend0r''。
Webservice compiles and publishes with no errors.
Access the Service with http://localhost:2092/EasyVend0r.asmx (Note
using the port assigned by the IDE)
and no problem.

But start a browser and go to access the ASMX with the published URL
of http:localhost//EasyVend0r.asmx and you get
Parser Error Message: Could not create type ''EasyVend0r.EasyVend0r''.



鲍勃,当您从IDE运行时,您在选定端口上使用内置网络服务器

(卡西尼号)。 br />

使用/ localhost /时,如果没有端口,则必须在PC上已安装的服务器(IIS)上使用虚拟的

目录。 />

显然你没有正确地将整个web服务发布到这个

虚拟目录。尝试使用IDE中的Publish_Website选项。


看起来你也在使用根虚拟目录,这可能不是明智的。请注意,发布工具将清理它是目标文件夹。


-HH-


Bob, when you run from the IDE you are using the built-in webserver
(Cassini), on a selected port.

When you use /localhost/ , without a port, you must be using a virtual
directory on the installed server (IIS) on your PC.

Apparently you did not correctly publish the entire webservice to this
virtual directory. Try using the Publish_Website option from the IDE.

It also looks like you are using the root virtual dir, that may not be
wise. Be aware that the Publish tool will "clean" it''s target folder.

-HH-


您是否已将目标目录(在IIS或其他中)配置为运行

作为申请?您需要手动执行此操作,否则app

将位于错误的文件夹中,而bin将位于错误的文件夹中。文件夹不会被使用,所以

你的类型不存在。


这通常是这个错误信息的问题...
Have you configured the target directory (in IIS or whatever) to run
as an application? You need to do this manually, otherwise the "app"
will be at the wrong folder, and the "bin" folder won''t be used, so
your types don''t exist.

This is usually the problem with this error message...


这篇关于VS2008和Webservice的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆