小编M4s*_*s0n的帖子

UWP启用本地网络环回

我写了一个UWP-App,在生成并安装了.appxbundle之后,每次启动App都会得到一个net_http_client_execution_error.在Visual Studio 2015中启动时,应用程序正在启动并正常运行.因此,如果我调试应用程序,我就没有机会解决问题.

更新:
默认情况下,Windows会限制应用程序访问localhost(127.0.0.1).我在那里运行沙发数据库.这个沙发数据库也应该在那里为我们的客户运行.是否可以允许应用程序访问localhost(启用本地网络环回)?

c# win-universal-app uwp

21
推荐指数
1
解决办法
2万
查看次数

UWP NetworkConnectionChanged 事件

我正在开发一个 UWP 应用程序,需要在丢失网络连接或重新连接设备后做一些事情。

连接丢失或连接后是否会触发任何事件?

我搜索了 www,但我发现的任何内容都是针对 WP8 的...

我需要这个用于 Windows 10 上的 UWP。

我尝试使用NetworkInformation.NetworkStatusChanged.

c# events win-universal-app .net-core uwp

3
推荐指数
1
解决办法
2055
查看次数

带参数的HTTP摘要式身份验证

我们正在尝试使用摘要式身份验证连接到WebService.只要我在uri中没有任何参数,它就能正常工作.我几天都在寻找解决方案.

我也尝试了很多我发现的例子:http:
//blogs.msdn.com/b/daniem/archive/2013/02/27/digest-authentication-in-system-net-classes-not-compliant-with-rfc2617的.aspx

但是我总是得到401未授权.

请参阅附加的代码:

private string WebServiceCall(string methodname)
    {
        try
        {
            string response = string.Empty;

            Uri uri = new Uri(string.Format("http://{0}:{1}/{2}", servername, port, methodname));
            UriBuilder builder = new UriBuilder(uri);
            var query = HttpUtility.ParseQueryString(builder.Query);
            query["fields"] = "posgood";
            builder.Query = query.ToString();
            uri = builder.Uri;

            WebProxy proxy = new WebProxy(uri, true);

            HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(uri);
            webRequest.Method = "GET";
            webRequest.Proxy = proxy;
            webRequest.PreAuthenticate = true;
            webRequest.AllowAutoRedirect = true;
            CredentialCache cache = new CredentialCache();
            cache.Add(new Uri(string.Format("http://{0}:{1}/{2}", servername, port, methodname)), "Digest", new NetworkCredential("myUser", "myPassowrd", …
Run Code Online (Sandbox Code Playgroud)

c#

1
推荐指数
1
解决办法
5730
查看次数

标签 统计

c# ×3

uwp ×2

win-universal-app ×2

.net-core ×1

events ×1