小编F0r*_*gan的帖子

.NET中的Mongodb单元测试

我想做tdd并使用mongodb作为数据库.但我无法解决嘲弄mongodb的问题.有没有能力在.NET中模拟mongodb进行单元测试?


更新

我找到了很好的阅读博客.你可以在这里找到它:

.net c# unit-testing mocking mongodb

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

用于.NET的缓存服务器(示例Memcached)

我正在寻找.NET的缓存服务器.你能提出什么建议?据我所知,memcached有.net的提供者.在生产中使用.net是否足够好?

.net c# asp.net asp.net-mvc memcached

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

本地iis上的asp.net核心Windows身份验证

我从defaut模板创建了默认的asp.net核心应用程序.我在创建新项目的过程中选择了Windows身份验证选项(这就是我所做的).当我在issexpress上运行应用程序时,它就像一个魅力.

当我将应用程序移动到本地iis时,它可以工作,但它不会获得用户信息.我在Windows功能中启用了Windows身份验证.但它显示我空的User.Identity.Name.我试图将这些行添加到web.config

    <security>
        <authentication>
            <windowsAuthentication enabled="true" />
            <anonymousAuthentication enabled="false" />
        </authentication>
    </security>
Run Code Online (Sandbox Code Playgroud)

试图从IIS管理器打开Windows身份验证.我不知道还有什么可能是错的.我错过了什么?

iis windows-authentication kestrel-http-server asp.net-core

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

Xamarin Android:通过标准API(电子邮件,脸谱等)分享图像

我需要在Xamarin Android中实现标准共享.我发现并更改了Xamarin的代码.看起来像这样

    public void Share (string title, string content)
    {
        if (string.IsNullOrEmpty (title) || string.IsNullOrEmpty (content))
            return;

        var name = Application.Context.Resources.GetResourceName (Resource.Drawable.icon_120).Replace (':', '/');
        var imageUri = Uri.Parse ("android.resource://" + name);
        var sharingIntent = new Intent ();
        sharingIntent.SetAction (Intent.ActionSend);
        sharingIntent.SetType ("image/*");
        sharingIntent.PutExtra (Intent.ExtraText, content);
        sharingIntent.PutExtra (Intent.ExtraStream, imageUri);
        sharingIntent.AddFlags (ActivityFlags.GrantReadUriPermission);
        ActivityContext.Current.StartActivity (Intent.CreateChooser (sharingIntent, title));
    }
Run Code Online (Sandbox Code Playgroud)

此代码调用标准共享功能,但当我选择Facebook或电子邮件时,我得到"无法加载图像".文件位于"/Resources/drawable-xhdpi/icon_120.png".

你能指出我做错了什么吗?

android xamarin.android xamarin

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

当 SignalR 一次建立 8-10 个连接时,实时聊天不起作用

我正在使用 SignalR 开发实时聊天。这是一个很棒的图书馆。但是我解决了一个我有一段时间无法解决的问题。因此,当 SignalR 一次建立 8-10 个连接时,实时聊天不再起作用。也许是 b/ci 在本地机器上运行所有东西?

我想也许我在某个地方犯了错误。所以我找到了最简单的聊天。你可以在这里下载。我在 10 个窗口中打开它,它不再工作了。是signalR的性能问题还是程序员的错误?我怎样才能让它工作得更快?

我还发现了JabbR chat。它有现场演示 ,适用于很多人。他们没有做任何特别的事情,而且效果很好。

有人可以帮助解决这个问题吗?

非常感谢您的帮助,迪玛。

.net c# asp.net-mvc-3 signalr

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