1

请帮我解决以下问题:

win10更新红石4后,以下代码序列停止工作:

  1. RasPhoneBook pbk = GetUserPhoneBook();
    1. RasEntry entry = RasEntry.CreateVpnEntry(ConnectionName, server, this.VpnStrategy, RasDevice.GetDeviceByName(this.DeviceName, RasDeviceType.Vpn));
    2. pbk.Entries.Add(entry);

错误发生在第三行3. pbk.Entries.Add(entry);

错误消息是: 检测到不正确的结构大小。

StakTrace 是

在 DotRas.Internal.ThrowHelper.ThrowRasException(Int32 错误代码) 在 DotRas.Internal.RasHelper.SetEntryProperties(RasPhoneBook phoneBook, RasEntry 值) 在 DotRas.RasEntryCollection.InsertItem(Int32 索引, RasEntry 项) 在 DotRas.Design.RasCollection`1.Add (TObject 项)

谢谢

4

1 回答 1

2

RS4 中的 RAS API 发生了变化,这看起来正在搞砸大量 VPN 产品(我在大约 17025 版之后遇到了 Insider Builds 的问题) https://support.f5.com/csp/article /K84747528

我不知道实际的 API 更改是什么或短期内可用的解决方法是什么(MS 知识库搜索没有任何用处)但看起来 MS 终于承认了这个问题并希望在即将到来的时候解决它RS4 累积更新。

于 2018-05-04T10:43:41.977 回答