托管和访问Web服务器中用C#编写的Web服务 [英] Hosting and accessing web service written in C# from webserver

查看:79
本文介绍了托管和访问Web服务器中用C#编写的Web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在c#中编写了一个名为service.asmx的示例Web服务

i已将其发布在默认网站下的本地IIS中。

然后我从另一个c#项目。它工作正常。



现在我想将这个服务service.asmx托管到我的web服务器,这是在godaddy.com上托管的


所以我已将服务发布到Web服务器的web文件夹中。

我的ftp路径是ftp://ftp.abc.com/httpdocs/Service1/



现在,我该如何访问来自另一个应用程序。

我尝试通过上面的ftp路径,但显示错误。



请咨询。



我尝试过:



从网络服务器访问网络服务

I have written a sample web service in c# named service.asmx
i have published it in local IIS under the default web site.
Then i accessed the service from another c# project. It works fine.

Now i want to host this service service.asmx into my web server which is
hosted in godaddy.com
so i have published the service into my web folder in the web server.
my ftp path is "ftp://ftp.abc.com/httpdocs/Service1/ "

Now, how can i access it from another application.
I tried by giving the above ftp path, but showing error.

Please advice.

What I have tried:

accessing web service from web server

推荐答案

请查看您问题的评论。



FTP网址仅用于FTP通信,即通过网络共享文件的通信。要从HTTP访问WCF,您需要一个端点,您可以在其中执行HTTP通信或基于WCF支持的协议的其他通信。



要知道支持哪些协议,请查看以下链接,

WCF支持的协议是什么? | ASP.NET论坛 [ ^ ]

c# - 哪些协议可用于WCF? - 堆栈溢出 [ ^ ]

配置系统 - 提供绑定 [ ^ ]



最后,它位于GoDaddy控制面板下,您可以在其中访问有关WCF应用程序端点的详细信息。然后,您需要从该URL访问该服务。如果您是新手,请阅读以下链接以了解有关此主题的更多信息,

在GoDaddy上托管WCF服务 [ ^ ]

自定义IIS设置Web&经典主机 - GoDaddy帮助PK [ ^ ]



这些链接将指导您设置应用程序所需的绑定,以便在GoDaddy上实际运行WCF服务并能够进行通信通过网络。
Please see the comment to your question.

The FTP urls are just used for FTP communication, the communication where you share files over the network. To access the WCF from HTTP, you need an endpoint where you can perform an HTTP communication, or other communication based on the protocols that are supported by WCF.

To know which protocols are supported, have a look at the following links,
what are the protocols supported in WCF? | The ASP.NET Forums[^]
c# - Which protocols are there, that can be used with WCF? - Stack Overflow[^]
Configuring System-Provided Bindings[^]

Then finally, it is under the GoDaddy control panel where you can access the details about endpoints of your WCF application. You need to then access the service from that URL. IF you are new to this, you should read the following links to learn more on this topic,
Hosting a WCF Service on GoDaddy[^]
Customize IIS settings | Web & Classic Hosting - GoDaddy Help PK[^]

These links will guide you setup the bindings that are required by your application in order to actually run the WCF service on GoDaddy and to be able to communicate over the network.


这篇关于托管和访问Web服务器中用C#编写的Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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