标签: endpoint

使用自定义身份验证保护WCF服务端点

我想保护WCF服务的某些端点,我不知道你是否可以保护某些端点而不是某些端点.下面我有剥离的WCF服务(自托管).相同的WCF也用于CA Policy文件.如果我保护此WCF服务或某些端点,则CA Policy部分不得向我询问用户名密码.策略文件必须始终可访问.这也可能吗?

我找到了很多WCF自定义博客/帖子.有很多方法可以做到安全.我想要的只是我可以使用用户名/密码保护一些端点,但使用像Fiddler这样的工具不能看到凭据.但是数据在这种情况下可见.

我已经实现了一个Customvalidator,但是app.config文件也是重要的来定义东西.我并不擅长这一点.

namespace WindowsFormsApplication11
{
    public partial class Form1 : Form
    {
        public ServiceHost _host = null;

        public Form1()
        {
            InitializeComponent();
        }      

        private void button1_Click(object sender, EventArgs e)
        {
            // Create a ServiceHost for the CalculatorService type and 
            // provide the base address.
            _host = new ServiceHost(typeof(WmsStatService));
            _host.AddServiceEndpoint(typeof(IPolicyProvider), new WebHttpBinding(), "").Behaviors.Add(new WebHttpBehavior());

            _host.Open();
        }
    }

    // Define a service contract.
    [ServiceContract(Namespace = "http://WindowsFormsApplication11")]
    public interface IWmsStat
    {
        [OperationContract]
        string getConnectedViewers(string channelName);
        [OperationContract]
        string sayHello(string name);
    }

    [ServiceContract] …
Run Code Online (Sandbox Code Playgroud)

authentication wcf endpoint

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

有没有办法允许多个链在Catalyst中共享同一个端点?

我是一个催化剂新手,我正试图让多个链访问同一个端点('description'子例程),例如:

/object/fetch_by_id/*/description
/object/fetch_by_name/*/description
/object/fetch_by_xref/*/description
Run Code Online (Sandbox Code Playgroud)

例如,我不想为3个单独的端点编写代码,而是允许端点在三个不同的链接操作之间共享.我正在包装后端API,在此示例中,可以通过不同的方法检索对象.

理想的解决方案是:

sub description : Chained('fetch_by_id','fetch_by_name','fetch_by_xref') PathPart('description') Args(0) ActionClass('REST') {
    # code here
}
Run Code Online (Sandbox Code Playgroud)

或者我可以为每个链调用通用描述子例程编写不同的描述子,但任何更优雅的解决方案都会很棒!任何帮助应该非常感谢!

perl catalyst endpoint chaining

7
推荐指数
1
解决办法
283
查看次数

IIS中托管的NET TCP/HTTP WCF

我是WCF和IIS的新手,但他正在阅读如何在IIS中托管WCF应用程序.我们有一个系统,我们试图部署到IIS,需要HTTP和NET.TCP端点.我在随机教程中看到了所有配置,但我仍然无法从我的客户端连接.任何有关配置的帮助将不胜感激!

我的WCF目录中的EdWCF.svc文件:

< %@ ServiceHost Language="C#" Debug="true" Service="TwoFour.WCF.Engine.EdWCF" % >
Run Code Online (Sandbox Code Playgroud)

我的Web.Config:

    <?xml version="1.0"?>
<configuration>
<system.serviceModel>

    <behaviors>
      <serviceBehaviors>
        <behavior name="MyBehaviour">
          <serviceMetadata HttpGetEnabled="True" />
        </behavior>
      </serviceBehaviors>
    </behaviors>

<service name="TwoFour.WCF.Engine.EdWCF" behaviorConfiguration="MyBehaviour">
       <host>
          <baseAddresses>
            <add baseAddress="net.tcp://localhost:12345/WCF/EdWCF.svc"/>
          </baseAddresses>
       </host>
       <endpoint address=""
                 binding="netTcpBinding"
                 bindingConfiguration="InsecureTcp"
                 contract="TwoFour.WCF.Interface.Shared.IEdWCF" />
       <endpoint address="mexhttp" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>

  <bindings>
            <netTcpBinding>
                <binding name="InsecureTcp" portSharingEnabled="true">
                    <security mode="None" />
                </binding>
            </netTcpBinding>
        </bindings>

</system.serviceModel>

</configuration>
Run Code Online (Sandbox Code Playgroud)

感谢您的任何帮助或建议!

iis wcf endpoint net.tcp

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

端点SWS没有适配器

我正在尝试使用教程创建一个简单的Hello World WebService .

我正在运行Java 1.7.0_04,Spring 2.1,所有内容都是使用Maven构建的,并使用Tomcat6进行部署.但是,当尝试发送SOAP请求(soapUI)时,服务器返回我

No adapter for endpoint [public org.jdom.Element com.mycompany.hr.ws.HolidayEndpoint.handleHolidayRequest(org.jdom.Element) throws java.lang.Exception]: Is your endpoint annotated with @Endpoint, or does it implement a supported interface like MessageHandler or PayloadEndpoint?
Run Code Online (Sandbox Code Playgroud)

我认为注释有问题,但这是我的文件的样子:

web.xml中

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
         version="2.4">

    <display-name>Khozzy custom WebService</display-name>

    <servlet>
        <servlet-name>spring-ws</servlet-name>
        <servlet-class>org.springframework.ws.transport.http.MessageDispatcherServlet</servlet-class>

        <init-param>
            <param-name>transformWsdlLocations</param-name>
            <param-value>true</param-value>
        </init-param>
    </servlet>

    <servlet-mapping>
        <servlet-name>spring-ws</servlet-name>
        <url-pattern>/*</url-pattern>
    </servlet-mapping>

</web-app>
Run Code Online (Sandbox Code Playgroud)

弹簧-WS-servlet.xml中

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:sws="http://www.springframework.org/schema/web-services"
       xsi:schemaLocation=" http://www.springframework.org/schema/beans
                            http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
                            http://www.springframework.org/schema/web-services
                            http://www.springframework.org/schema/web-services/web-services-2.0.xsd
                            http://www.springframework.org/schema/context
                            http://www.springframework.org/schema/context/spring-context-3.0.xsd">

    <context:component-scan base-package="com.mycompany.hr.ws" …
Run Code Online (Sandbox Code Playgroud)

spring soap annotations adapter endpoint

7
推荐指数
1
解决办法
9427
查看次数

WCF服务在2个不同的服务合同上公开2个端点

我有一个WCF服务,我试图配置,以便它在不同的URL下公开2个端点,引用不同的功能.

我想要的是Service1,暴露方法A,B,C和Service2,暴露方法D,E.我希望能够浏览localhost/WebServiceName/Service1/Service.svclocalhost/WebServiceName/Service2/Service .svc.

引用localhost/WebServiceName/Service1/Service.svc的其他应用程序应该只看到包含方法A,B和C的接口.它们不应该看到有关Service2接口的任何内容.而对于Service2同样如此.

到目前为止,我已经在我的WCF服务中定义了两个接口,I_Service1I_Service2.

我在web.config中添加了两个端点,如下所示:

<endpoint address="http://localhost/WebServiceName/Service1/" binding="wsHttpBinding" contract="WebServiceName.I_Service1" bindingConfiguration="Binding1" />
<endpoint address="http://localhost/WebServiceName/Service2/" binding="wsHttpBinding" contract="WebServiceName.I_Service2" bindingConfiguration="Binding2" />  
Run Code Online (Sandbox Code Playgroud)

在这里使用完整地址的建议来自这里:IIS下的多个端点

但是,我仍然无法浏览localhost/WebServiceName/Service1/Service.svc.我收到:

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly. …
Run Code Online (Sandbox Code Playgroud)

c# wcf web-services endpoint servicecontract

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

获取WCF服务的当前端点?

我有一个WCF服务通过TCP与客户端通信.有没有在服务方法中收集有关当前连接的信息?例如,当前用户正在使用的端点?

.net c# wcf server-side endpoint

7
推荐指数
1
解决办法
7472
查看次数

Instagram API通过逗号分隔的ID获取批量对象

我有一个简单的应用程序,我有一个批量Instagram对象ID.我正在寻找一个API,从那里我可以发送id作为逗号分隔的字符串或以类似的方式,并获得Instagram对象的列表.我无法在官方Instagram API中找到端点.

我不想逐个检索每个对象,因为我需要检索批量数据并逐个检索会耗费太多时间,并且会耗尽我的资源.

twitter中的类似功能可以在下面找到

https://dev.twitter.com/rest/reference/get/statuses/lookup
Run Code Online (Sandbox Code Playgroud)

我正在为Instagram寻找类似的功能.这有解决方案吗?

仅供参考我正在寻找Instagram端点以外的其他解决方案 - tags/hello/media/recent因为我需要同时来自多个id的信息.此端点检索的信息数也不足.

bulk endpoint instagram-api

7
推荐指数
1
解决办法
448
查看次数

如何在没有任何其他框架的情况下在Heroku上部署和访问Java WebSocket端点

我已经按照这个非常基本的教程来设置Java中的WebSocket端点:http://www.oracle.com/webfolder/technetwork/tutorials/obe/java/HomeWebsocket/WebsocketHome.html

然而,Heroku希望我依赖Play Framework:https://devcenter.heroku.com/articles/play-java-websockets

我的问题是:如何在没有任何其他框架的情况下部署相同的内容,我应该通过哪些程序才能使其工作?

java deployment heroku endpoint websocket

7
推荐指数
1
解决办法
404
查看次数

Flask RESTFUL,从端点创建 cookie (restful.Resource)

我目前正在从端点创建 Cookie。由于我的后端和前端仅通过 RESTful 端点进行交互,所以当前端调用后端的端点时,我是否可以创建 cookie?

flask.make_response.set_cookie()似乎对我不起作用。另外,我也不能app.route('/')用来设置我的 cookie。

python cookies rest backend endpoint

6
推荐指数
1
解决办法
4105
查看次数

如何保护从单个 Windows 计算机对此端点的访问

如何保护从单个 Windows 计算机对此端点的访问。

网址: https: //test.rev.com:443 /press/api/v1/receiver

需要避免从 AWS 中的任何其他计算机进行 POST 访问

url endpoint amazon-web-services

6
推荐指数
1
解决办法
38
查看次数