我正在尝试在客户站点使用第三方身份验证Web服务.Web服务是用.Net编写的,并接受SecureString作为密码类型.
AuthResult Login(string username, SecureString passkey)
Run Code Online (Sandbox Code Playgroud)
我的应用程序是用Java编写的,我可以使用Java中的SecureString没有兼容类型:(当我生成一个轴代理时,它生成一个没有SecureString成员的存根,因此我无法进行身份验证调用服务.
public class SecureString implements java.io.Serializable {
public SecureString() {
...
}
}
Run Code Online (Sandbox Code Playgroud)
我正在尝试http://sanguinecomputing.com/a-secure-string-implementation-for-long-term-storage-of-sensitive-data-in-java/但我不是很有希望
任何人都可以帮我解决这个互操作性问题吗?我正在寻找一种方法将类型为secureString的参数从Java应用程序代码发送到.Net服务.
我对清理ServiceHost的最佳方法感到困惑.我在代码中发现了问题,因为Visual Studio代码分析器发出了CA1001警告,建议我为我的类实现IDisposable接口.
我已经阅读了关于IDisposable的讨论并熟悉了典型的用例,但在这个例子中发现自己很困惑.确保ServiceHost正在处理并可能满足CA1001的正确方法是什么.谢谢.
我的代码如下所示:
public class MyClass
{
private ServiceHost host = null;
public void StartListening(...)
{
// make sure we are not already listening for connections
if (host != null && host.State != CommunicationState.Closed)
StopListening();
// create service host instance
host = new ServiceHostWithData(typeof(ServiceHandler), address);
// do a bunch of configuration stuff on the host
host.Open();
}
public void StopListening()
{
// if we are not closed
if ((host != null) && (host.State != CommunicationState.Closed))
{
host.Close();
host = …Run Code Online (Sandbox Code Playgroud) 我花了很多时间在VS,最近开始在IDEA工作.VS和IDEA中的调试快捷方式不同.例如,Idea使用F7踩入,而VS使用F11.
我正在寻找能够在IDEA中更改调试快捷方式的能力.我做了一些研究,发现 键盘映射.但我的简短研究表明,键盘映射可以让您更改编辑器快捷方式,而不是调试快捷方式.或者我对键映射的初步评估是错误的,我们可以用它来配置调试快捷方式吗?如果不是keymap,还有另一种方法来改变IDEA快捷方式吗?