Windows 7程序不再适用于wordpress / woocommerce API的Windows 10 [英] Windows 7 program no longer working on windows 10 for wordpress/woocommerce API

查看:106
本文介绍了Windows 7程序不再适用于wordpress / woocommerce API的Windows 10的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个VB 2010桌面程序(构建并部署到msi).Net 4.5程序已在所有受支持的Windows版本上运行多年。



在过去的几周里,它不再适用于Windows 10,包括我们的客户端和我们的开发系统。



它实际上是试图从WordPress / WooCommerce获得订单API(WP API V1或V2)。



收到的错误是

发生了一个或多个错误。发送请求时发生错误。



We have a VB 2010 Desktop program (built and deployed to msi) .Net 4.5 program that has been working for years on all supported versions of Windows.

Over the past few weeks it no longer works correctly on Windows 10 including our client and from our development system.

It is actually trying to get orders from the WordPress/WooCommerce API (WP API V1 or V2).

The error received is
One or more errors occurred. An error occurred while sending the request.

Using client As HttpClient = New HttpClient()
                client.DefaultRequestHeaders.Accept.Add(New MediaTypeWithQualityHeaderValue("application/json"))
                Dim v As Object = Nothing
                If pJSON = NIL Then

                    v = client.GetStringAsync(pURL)
                Else
                    Static myTestSwt As Boolean = False
                    If MyTesting AndAlso TestingDontUpdate Then
                        If Not myTestSwt Then
                            Stop
                            myTestSwt = True
                        End If
                    End If

                    Dim requestMessage = New HttpRequestMessage
                    Dim httpContent As StringContent = New StringContent(pJSON, Encoding.UTF8, "application/json")

                    Dim result As HttpResponseMessage = Nothing ' As Object = Nothing

                    result = client.PutAsync(pURL, httpContent).Result
                    If result.IsSuccessStatusCode Then
                        funRC = True
                        pOutJSON = "{""AaaTeXStatus"": ""OK""}"
                    Else
                        pOutReason = result.StatusCode & Sp & result.ReasonPhrase ' & SP & requestMessage.ToString
                    End If

                    GoTo ExitFunction
                End If

                If v Is Nothing Then
                    GoTo ExitFunction
                End If
                If v.Result Is Nothing Then  ' 401 unauthorized ' should be json
                    GoTo ExitFunction
                End If
                pOutJSON = v.Result  '  json response
            End Using
Catch ex As Exception
            pOutReason = ex.Message
            If ex.InnerException IsNot Nothing Then pOutReason &= Sp & ex.InnerException.Message
 
        End Try





我尝试了什么:



Windows 7适用于VS 2010 IDE和exe。

在Windows 10上使用VS 2017 IDE。



What I have tried:

On Windows 7 works from VS 2010 IDE and exe.
On Windows 10 worked from VS 2017 IDE.

推荐答案

在Windows 10中更改exe的兼容模式可能会有所帮助......

可以通过exe属性找到它,在兼容性选项卡上,

- 也许设置与Windows 7的兼容性可以解决问题,

BR,
Changing the compatibility mode of the exe in Windows 10 might help ...
It can be found through exe properties, on the "Compatibility" tab,
- perhaps setting compatibility to Windows 7 would solve the issue,
BR,


这篇关于Windows 7程序不再适用于wordpress / woocommerce API的Windows 10的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆