小编Tyl*_*rdt的帖子

调用 NamedPipeServerStream.SetAccessControl 时“试图执行未经授权的操作”

我正在尝试使用PipeSecurity来保护NamedPipeServerStream. 当我调用this.pipeServer.SetAccessControl(pipeSecurity)下面的代码段时,出现以下异常:

Attempted to perform an unauthorized operation.
    at System.Security.AccessControl.Win32.SetSecurityInfo(ResourceType type, String name, SafeHandle handle, SecurityInfos securityInformation, SecurityIdentifier owner, SecurityIdentifier group, GenericAcl sacl, GenericAcl dacl)
    at System.Security.AccessControl.NativeObjectSecurity.Persist(String name, SafeHandle handle, AccessControlSections includeSections, Object exceptionContext)
    at System.Security.AccessControl.NativeObjectSecurity.Persist(SafeHandle handle, AccessControlSections includeSections, Object exceptionContext)
    at System.IO.Pipes.PipeSecurity.Persist(SafeHandle handle)
Run Code Online (Sandbox Code Playgroud)

代码:

this.pipeServer =
    new NamedPipeServerStream(
        pipeName,
        PipeDirection.InOut,
        1,
        PipeTransmissionMode.Byte,
        PipeOptions.Asynchronous);

PipeSecurity pipeSecurity = new PipeSecurity();

WindowsIdentity identity = WindowsIdentity.GetCurrent();
WindowsPrincipal principal = new WindowsPrincipal(identity);

if (principal.IsInRole(WindowsBuiltInRole.Administrator))
{
    // Allow the …
Run Code Online (Sandbox Code Playgroud)

.net c# named-pipes

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

RabbitMQ:当队列为空时是否可以删除队列?

理想情况下,我想在 RabbitMQ 中的队列变空时删除它们。基本上,我希望队列包含积压的消息,然后当发生某些事情时,这些消息将被发送,直到队列为空。一旦队列为空,我想删除它。

这可能吗?我正在使用节点。

javascript amqp rabbitmq node.js

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

错误:错误:用户"electron_release_server_user"的密码验证失败

我瞎搞这个惊人的帆船项目在这里.

我设法让我的Macbook Pro 100%正常运行,几乎没有任何困难.

这是我的叉子.

现在我正试图让它在Azure Ubuntu 14.04盒子上工作,并在运行它之后npm start只调用node app.js我得到这个错误:

Error creating a connection to Postgresql using the following settings:
{ host: 'localhost',
 port: 5432,
 schema: true,
 ssl: false,
 adapter: 'sails-postgresql',
 user: 'electron_release_server_user',
 password: '[redacted]',
 database: 'electron_release_server',
 identity: 'postgresql' }

* * *
Complete error details:
 { error: password authentication failed for user "electron_release_server_user"
    at Connection.parseE (/home/azureuser/electron-release-server/node_modules/sails-postgresql/node_modules/pg/lib/connection.js:539:11)
at Connection.parseMessage (/home/azureuser/electron-release-server/node_modules/sails-postgresql/node_modules/pg/lib/connection.js:366:17)
at Socket.<anonymous> (/home/azureuser/electron-release-server/node_modules/sails-postgresql/node_modules/pg/lib/connection.js:105:22)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:172:18)
at …
Run Code Online (Sandbox Code Playgroud)

postgresql azure node.js sails.js sails-postgresql

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

仅当您单击文本区域之外后,才会在文本区域上触发更改事件的 METEOR

这是我的模板:

<template name="textGoesHere">
{{#if currentUser}}
    <div id="boxdiv">
        <textarea id="box">{{user.text}}</textarea>
    </div>

{{/if}}
</template>
Run Code Online (Sandbox Code Playgroud)

这是我的流星事件:

'change #box': function (e) {
        Meteor.call('click', $("#box").val());

}
Run Code Online (Sandbox Code Playgroud)

由于某种原因,只有当您更改文本区域的内容后单击文本区域之外时,才会触发此事件。但显然,当文本区域更改时应该调用该事件,这是我正在寻找的功能。

html javascript jquery meteor

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

为什么使用 .gitignore?为什么我不需要包含某些文件?

互联网上的每个地方都说“这就是您设置 .gitignore 的方式”。“你想要一个这样你就可以忽略文件。” “等等等等等等。” 但我的问题是“为什么?” 为什么我不需要包含 repo 中的某些文件?我知道您不希望其中包含敏感信息的文件,但是生成的文件呢?那些我们被认为忽略的其他类型的文件呢?我知道这是我们应该做的事情……但为什么呢?

git github

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

在 Visual Studio Code 中调试时是否可以不显示调试侧栏?

为了为新用户(不认为自己是开发人员)简化 VS Code 的外观和感觉,我想永远隐藏调试侧栏:

调试侧栏

当前发生的情况是,每次我按 F5 时,调试侧栏都会弹出,即使我用cmd+B. 有什么办法可以强迫它隐藏起来吗?

visual-studio-code vscode-settings vscode-debugger

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