-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PlatformNotSupportedException on UWP #4
Comments
I have neither experience with UWP nor a workaround to propose you. However since 1.0.3, the library targets .netstandard20, which include UWP 10.0.16299.
PS: don't try the v1.0.4 as it contains a very stupid bug of mine that make the library completely useless (see #2) |
I have also tested my own .NET Standard 2.0 fork of xml-rpc.net with the same outcome, so I am pretty certain the issue is with UWP missing the implementation of Unfortunately you occasionally run into these issues with UWP, where peripheral functionality has not been implemented for whatever reason. I have not examined xml-rpc.net yet to tell whether there are alternative ways to accomplish the same thing, but if you have more experience with it I am happy for any suggestion you may have. BTW, I am using UWP Build 17134. I was using Kveer.XmlRPC 1.0.4, but I doubt it that any other version would have resolved this particular issue anyway. |
One more thing: if 1.0.4 is broken, you might consider hiding it on NuGet. You cannot delete it from NuGet, but you can hide it so that newcomers don't pick it by accident when picking the Kveer.XmlRPC package for the first time. |
I get this issue in netcoreapp2.0 |
@lorddev can you elaborate ? netcoreapp2.0 is just an interface and not an implementation. As said previously, I do not use UWP and from the stack trace, it is unfortunately more than likely that the issue is, like the Exception imply that the implementation (here UWP) is missing a feature. So I cannot offer support for that. You can probably hack on CookComputing.XmlRpc.XmlRpcClientProtocol.SetProperties to disable the call to System.Net.HttpWebRequest.get_ServicePoint which will lead to the exception. If nicely done (that is without disabling the http proxy support for other platform), I could merge that. I'm using this library on a .netcore mvc application without issue. |
@LordVeovis This is also a dotnet core MVC application. The csproj uses "netcoreapp2.0". Is your MVC application also using netcoreapp2.0? |
@lorddev I can confirm that the |
You both have a valid point, and thank you for your precise report. Thats remind me of a hack I have completely forgotten. The hack: WebRequest.DefaultWebProxy = null;
var rpc = XmlRpcProxyGen.Create<IRtorrent>(); I'm sorry I didn't think of that earlier. While not solving the problem directly from the library, this will prevent the present case resulting on a PlatformNotSUpportedException. You just have to put the first line once, but absolutely before the creation of a xmlrpc proxy. |
Interesting that RestSharp also experienced this issue: restsharp/RestSharp#1061 - Is there a config setting I can use to disable proxy detection? (edit: sorry, I didn't see you answered this yesterday) |
If the stack trace is the same as here, just use this before calling RestSharp. WebRequest.DefaultWebProxy = null; |
When trying out a very simple client example on Universal Windows Platform, UWP,
I get a
PlatformNotSupportedException
with the following stack trace:Any known workarounds to this issue?
The text was updated successfully, but these errors were encountered: