标签: endpoint

WCF单个端点地址处的大型接口

我有一个wcf服务,在单个端点地址上公开了大量的服务方法.到目前为止,所有服务方法都在单个服务合同类中实现.此服务契约类实现了多个服务契约接口.现在我想将服务契约方法的实现分成几个类,以避免契约类增长到大.我使用ServiceHost的自托管方案.ServiceHost只采用实现服务方法的单一类型的类型,因此似乎必须在此类中实现所有内容.当然,方法的肉可以分解为几个类.但是还有一种方法可以将方法分成几个类吗?

service wcf contract endpoint

5
推荐指数
1
解决办法
1522
查看次数

Azure VM - 端点不起作用

我有两个端点3389和80的VM.它已经工作了大约1周.

昨天我无法远程访问它,不能通过端口80访问它的服务.我重新启动它 - 没有帮助.我决定删除并重新创建端点,它有所帮助.VM工作了几个小时然后我遇到了同样的问题.我再次重新创建了端点.

看起来这是Azure问题.有没有人遇到过同样的问题?有任何想法吗?

azure endpoint azure-virtual-machine

5
推荐指数
1
解决办法
1965
查看次数

常量"System.ServiceModel.EndpointNotFoundException:没有端点侦听<服务URL>"错误

我有许多WCF服务,IIS在专用服务器上运行.这些服务有他们的客户.总而言之,它可以工作,但每当我在客户端级别查找日志时,我通常会看到以下类型的错误:

System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at <Service URL> that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. 

---> System.Net.WebException: Unable to connect to the remote server 
---> System.Net.Sockets.SocketException: A socket operation was attempted to an unreachable network <Service IP>:80
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 …
Run Code Online (Sandbox Code Playgroud)

wcf endpoint wcf-endpoint

5
推荐指数
1
解决办法
8017
查看次数

由于内部错误,服务器无法处理请求

当我尝试从webservice加载方法时,我收到一个错误:

"由于内部错误,服务器无法处理请求.有关错误的更多信息,请在服务器上启用IncludeExceptionDetailInFaults(来自ServiceBehaviorAttribute或配置行为),以便将异常信息发送回客户端,或根据Microsoft .NET Framework SDK文档打开跟踪并检查服务器跟踪日志"

这是我的app.config端点def:

<services>
  <service name="Service" behaviorConfiguration="debug">
</services>

<client>
  <endpoint name="Service" address="net.tcp://localhost:12708/" binding="netTcpBinding" bindingConfiguration="netTcp" contract="path.IService" >
    <identity>
      <servicePrincipalName />
    </identity>
  </endpoint>
</client>

<serviceBehaviors>
    <behavior name="debug">
      <serviceDebug includeExceptionDetailInFaults="True" />
    </behavior>
  </serviceBehaviors>
Run Code Online (Sandbox Code Playgroud)

如果我声明了serviceBehaviors,我看不到更多信息事件.有人可以告诉我如何才能看到有关此错误的更多详细信息?

.net c# wcf endpoint

5
推荐指数
2
解决办法
6万
查看次数

WSDL绑定-soapAction值

在下面的WSDL摘录中,

<soap1:operation style="document" soapAction="petition"
Run Code Online (Sandbox Code Playgroud)

指定之间有什么区别

  • soapAction =“ petition”

  • soapAction =“ / Services / ReincarnationPermitService.serviceagent / ReincarnationRequestPortTypeEndpoint / petition”

<wsdl:service name="ReincarnationPermitService">
    <wsdl:port name="ReincarnationRequestPortTypeEndpoint" binding="tns:ReincarnationRequestPortTypeEndpointBinding">
        <soap1:address location="http://sheol:666/Services/ReincarnationPermitService.serviceagent/ReincarnationRequestPortTypeEndpoint"/>
    </wsdl:port>
</wsdl:service>
<wsdl:portType name="ReincarnationRequestPortType">
    <wsdl:operation name="acceptRequest">
        <wsdl:input message="tns:ReincarnationParticulars"/>
        <wsdl:output message="tns:PetitionResponse"/>
        <wsdl:fault name="denied" message="tns:Rejection"/>
    </wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ReincarnationRequestPortTypeEndpointBinding" type="tns:ReincarnationRequestPortType">
    <soap1:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="acceptRequest">
        <soap1:operation style="document" soapAction="petition" soapActionRequired="true"/>
        <wsdl:input>
            <soap1:body use="literal" parts="ReincarnationParticulars"/>
        </wsdl:input>
        <wsdl:output>
            <soap1:body use="literal" parts="Approved"/>
        </wsdl:output>
        <wsdl:fault name="denied">
            <soap1:fault use="literal" name="denied"/>
        </wsdl:fault>
    </wsdl:operation>
</wsdl:binding>
Run Code Online (Sandbox Code Playgroud)

soap wsdl endpoint

5
推荐指数
1
解决办法
2万
查看次数

有没有办法在 Java 中创建动态 @ServerEndpoint 地址?

例如,我有一个房间

public class Room {
   private int id;
   private Set<User> users;
}
Run Code Online (Sandbox Code Playgroud)

所以我希望它成为我的 websocket 应用程序的端点。但是可能有很多房间,我希望每个房间都有自己的 URI(例如,房间/1、房间/2 等)

显然,@ServerEnpoint 注释只允许常量。那么,有什么办法可以实现吗?

java endpoint websocket server

5
推荐指数
1
解决办法
3335
查看次数

为什么将 HEAD 请求转换为 GET 请求有用?

在一个新的 Phoenix 应用程序中,Plug.Head插件默认存在,我对它的重要性很感兴趣。

我知道“ HEAD 方法与 GET 相同,只是服务器不得在响应中发送消息正文”。

我认为凤凰城官方指南是一流的,但这让我在路由指南中感到失望:

Plug.Head - 将 HEAD 请求转换为 GET 请求并剥离响应正文

如果 HEAD 请求没有正文,那么为什么需要这样做?我想也许可以控制格式错误的请求,但查看Plug.Head 实现,它只是将 HEAD 方法切换为 GET。

  def call(%Conn{method: "HEAD"} = conn, []), do: %{conn | method: "GET"}
  def call(conn, []), do: conn
end
Run Code Online (Sandbox Code Playgroud)

我能在这个主题上找到的最接近的事情是关于 ServerFault 的一个问题,但它与 NGINX 和有缺陷的应用程序逻辑有关,其中 HEAD 请求需要转换为 GET,并且相应的 GET 响应返回到 HEAD。

http endpoint phoenix-framework plug

5
推荐指数
1
解决办法
1179
查看次数

无法通过Lambda中的VPC端点访问S3

我的VPC中有一个Lambda函数,我想访问S3存储桶。

我认为我已经正确设置了S3 VPC端点,

因为我在同一子网(Lambda函数子网)中创建了EC2实例,

使用相同的安全组,

并运行Lambda函数代码的副本,

它可以正确显示S3文件内容。

但是,当我在Lambda中运行代码时,它失败了。

因此,我想知道“在EC2中运行”和“在Lambda中运行”之间有什么区别?

为什么在Lambda中运行它失败?

这是我的Lambda函数代码:

import boto3

s3 = boto3.client('s3', region_name='ap-northeast-1')

def lambda_handler(event, context):
    bucket = '*xxxxxx*'
    key = 's3-upload.json'
    try:
        response = s3.get_object(Bucket=bucket, Key=key)
        print('--------------------------------------')
        print(response)
        print('--------------------------------------')
        body = response['Body'].read()
        print(body)
        print('--------------------------------------')
        print("CONTENT TYPE: " + response['ContentType'])

    except Exception as e:
        print('Error getting object.')
        print(e)
        raise e
Run Code Online (Sandbox Code Playgroud)

amazon-s3 endpoint vpc amazon-web-services aws-lambda

5
推荐指数
1
解决办法
2234
查看次数

REST API入口点和端点

REST API入口点是什么,它与端点有何不同?

我在网上搜索了各种定义,但似乎仍然无法绕开它们(一般来说,我是API的新手)。据我了解,它们提供了与服务器进行通信的方式,但是它们到底是什么?入口点和端点如何相似或不同?

rest endpoint

5
推荐指数
2
解决办法
3307
查看次数

Azure云服务嵌入式FTP服务器

我想在Azure云服务工作者角色中托管嵌入式FTP服务器.

要提供对FTP服务器的被动访问,它使用端口范围20000-21000.ServiceDefinition.csdef我在里面定义了所有需要的端口(见截图).

ServiceDefinition.cscfg

主要问题是港口数量巨大.如果我尝试将服务上传到云端,则会出现以下错误.

验证错误:输入端点数无效 - 当前1002,最大值 25

如何通过云服务实现这项工作?

c# azure endpoint ftp-server azure-cloud-services

5
推荐指数
1
解决办法
332
查看次数