【问题标题】:In F#, .Net Core, The project doesn't know how to run the profile IIS Express在 F#、.Net Core 中,该项目不知道如何运行配置文件 IIS Express
【发布时间】: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

【问题讨论】:

    标签: f# iis-7


    【解决方案1】:

    下拉框用于选择运行应用程序的载体,IIS Express是选项之一。在下拉列表中,您可以选择使用 IIS Express 或其他方式来运行应用程序。使用 IIS Express 时,还可以选择使用哪个浏览器查看运行结果。同时,也可以通过它打开断点调试。

    IIS Express是一个轻量级的IIS,它拥有IIS的大部分功能,无需在调试应用程序时重复发布到IIS,使用更方便,集成在Visual Studio中。

    IIS and IIS Express

    【讨论】:

    • 什么是运行应用程序的“载体”?另外,如果 IIS Express 已经内置在 Visual Studio 中,它怎么不知道如何运行呢?谢谢。
    • 应用程序应该在应用程序池中运行,而应用程序池在IIS中,它就像一个容器。
    猜你喜欢
    • 1970-01-01
    • 2021-08-26
    • 2021-12-21
    • 2019-04-30
    • 1970-01-01
    • 2022-01-02
    • 2021-09-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多