【发布时间】:2020-11-01 09:10:52
【问题描述】:
我正在使用 Visual Studio 16.7.7。
我有一个通过本地计算机上的 WCF/IIS 7 服务器运行的 postgreSQL 数据库。一切都适用于 .NET Framework。将我的 F# 代码移至 .Net Core 3.1 后,我在一个 C# 项目中创建了一个 ConnectedService.json,该项目现在具有以下内容:
{
"ProviderId": "Microsoft.VisualStudio.ConnectedService.Wcf",
"Version": "15.0.40203.910",
"ExtendedData": {
"inputs": [
"http://sager:9003/MedicalServiceHost.svc"
],
"collectionTypes": [
"System.Array",
"System.Collections.Generic.Dictionary`2"
],
"namespaceMappings": [
"*, MedicalService"
],
"references": [
"Microsoft.Xaml.Behaviors, {Microsoft.Xaml.Behaviors.Wpf, 1.1.19}"
],
"targetFramework": "netcoreapp3.1",
"typeReuseMode": "All"
}
}
然后在我的 F# 代码中:
module FsNetwork =
let context = new MedicalService.MedicalServiceClient(new BasicHttpBinding(MaxReceivedMessageSize =2147483647L), new EndpointAddress("http://sager:9003/MedicalServiceHost.svc"))
/// Get the office schedule for the tableDate.
let GetScheduleAsync (tableDate : DateTime) =
async {
let! data = context.GetOfficeScheduleAsync(tableDate) |> Async.AwaitTask
return data |> Seq.map(fun q -> {
Visit.lastName = q.lastname
firstName = q.firstname
birthDate = q.birthdate
appointmentTime = q.appointment_time
tservice = q.service_time
postingTime = q.posting_time
chartNumber = q.chart_number
})
}
|> Async.StartAsTask
我在哪里增加了 MaxReceivedMessageSize。
现在启动时我得到: 项目不知道如何运行配置文件 IIS Express
这很奇怪,因为我在本地运行 IIS 7。
如何解决这个错误?
谢谢。
附录:
在浪费了很多时间和头发之后,我偶然发现了How to disable the iis express launch profile
我之前没有注意到 Visual Studio 显示屏上的“Express”:
当使用“Express”上的下拉菜单,并改回我的启动项目--StargateIX,然后重新编译并运行--ALL WORKS CORRECTLY!
那么,这个下拉框到底是什么意思?
TIA
【问题讨论】: