Top*_*000 1 c# .net-core asp.net-core 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)
| 归档时间: |
|
| 查看次数: |
2446 次 |
| 最近记录: |