标签: soapcore

SoapCore 错误

当我尝试访问我在 .Net Core 3.0 中创建的服务的 wsdl 页面时,我不断遇到此问题。请求到达管道末端,但未执行端点:“SoapCore”。如果使用路由,请使用“IApplicationBuilder.UseEndpoints(...)”注册 EndpointMiddleware。

SoapCore 版本:1.1.0.1-beta 我也尝试过版本 1.0.0,结果相同

代码:配置服务功能

    services.AddControllers();
    services.AddSoapCore();
    services.TryAddSingleton<MyService>();
    services.AddMvc();
Run Code Online (Sandbox Code Playgroud)

配置功能

    if (env.IsDevelopment() || env.IsEnvironment("local"))
    {
        app.UseDeveloperExceptionPage();
    }
    else
    {
        app.UseHsts();
    }

    app.UseHttpsRedirection();
   
    app.UseRouting();
    app.UseAuthorization();            

    app.UseEndpoints(endpoints =>
    {
        endpoints.UseSoapEndpoint<MyService>("/Service.svc", new BasicHttpBinding(), SoapSerializer.DataContractSerializer);
        endpoints.MapControllers();
    });
Run Code Online (Sandbox Code Playgroud)

c# .net-core asp.net-core soapcore

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

标签 统计

.net-core ×1

asp.net-core ×1

c# ×1

soapcore ×1