使用非域帐户对网络服务器进行身份验证 [英] Authenticating against network server using non-domain account
问题描述
我需要访问网络计算机上的调度程序服务,以便从.NET远程操作它;我有所有必要的代码来执行操作,它很有用 - 很好 - 但是我在验证方面遇到了问题。
我尝试过使用LogonUser,这对域帐号工作正常但是,不能将其用于仅在远程计算机上定义的帐户 - 它仅适用于本地或域帐户。
有关如何进行身份验证的任何建议我使用该机器本地的登录和密码连接远程PC?
I need to access the scheduler service on a network computer in order to manipulate it remotely from .NET; I have all of the necessary code to perform the manipulation and it works - great - but I am having problems with authentication.
I have tried using LogonUser and this works fine with a domain account, however it is not possible to use this with an account that is defined only on the remote computer - it only works with local or domain accounts.
Any suggestions as to how I can authenticate my connection to the remote PC using a logon and password local to that machine?
推荐答案
Martin,
您是否尝试过在domain参数中使用机器名?
-
- Nicholas Paldino [.NET / C#MVP]
- mv*@spam.guard.caspershouse.com
" Martin Robins" < martin dot robins at technicaldirect dot co dot uk>在消息新闻中写道:e9 ************** @ TK2MSFTNGP14.phx.gbl ...
我需要在网络计算机上按顺序访问调度程序服务从.NET远程操作它;我有所有必要的代码来执行操作,它很有用 - 很好 - 但是我在验证方面遇到了问题。
我尝试过使用LogonUser,这对域帐号工作正常但是,不能将其用于仅在远程计算机上定义的帐户 - 它仅适用于本地或域帐户。
有关如何进行身份验证的任何建议我使用该机器本地的登录和密码连接远程PC?
Martin,
Have you tried using the machine name in the domain parameter?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Martin Robins" <martin dot robins at technicaldirect dot co dot uk> wrote in message news:e9**************@TK2MSFTNGP14.phx.gbl...
I need to access the scheduler service on a network computer in order to manipulate it remotely from .NET; I have all of the necessary code to perform the manipulation and it works - great - but I am having problems with authentication.
I have tried using LogonUser and this works fine with a domain account, however it is not possible to use this with an account that is defined only on the remote computer - it only works with local or domain accounts.
Any suggestions as to how I can authenticate my connection to the remote PC using a logon and password local to that machine?
我有;它不被接受。
LogonUser仅在指定本地计算机名称或对本地计算机有效的域名时起作用,因为您有效地将新用户登录到该计算机上(当然另一台机器上的本地用户也无法登录本地机器。
干杯。
" Nicholas Paldino [.NET / C#MVP]" < mv*@spam.guard.caspershouse.com>在消息新闻中写道:uf ************** @ TK2MSFTNGP15.phx.gbl ...
Martin,
您是否尝试过在domain参数中使用机器名?
-
- Nicholas Paldino [.NET / C#MVP]
- mv*@spam.guard.caspershouse.com
" Martin Robins" < martin dot robins at technicaldirect dot co dot uk>在消息新闻中写道:e9 ************** @ TK2MSFTNGP14.phx.gbl ...
我需要在网络计算机上按顺序访问调度程序服务从.NET远程操作它;我有所有必要的代码来执行操作,它很有用 - 很好 - 但是我在验证方面遇到了问题。
我尝试过使用LogonUser,这对域帐号工作正常但是,不能将其用于仅在远程计算机上定义的帐户 - 它仅适用于本地或域帐户。
有关如何进行身份验证的任何建议我使用该机器本地的登录和密码连接到远程PC?
I have; it is not accepted.
LogonUser will only work when specifying the local machine name or a domain name that is valid for the local machine as you are effectively logging a new user onto that machine (and of course a local user on another machine would not be able to log onto the local machine).
Cheers.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in message news:uf**************@TK2MSFTNGP15.phx.gbl...
Martin,
Have you tried using the machine name in the domain parameter?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Martin Robins" <martin dot robins at technicaldirect dot co dot uk> wrote in message news:e9**************@TK2MSFTNGP14.phx.gbl...
I need to access the scheduler service on a network computer in order to manipulate it remotely from .NET; I have all of the necessary code to perform the manipulation and it works - great - but I am having problems with authentication.
I have tried using LogonUser and this works fine with a domain account, however it is not possible to use this with an account that is defined only on the remote computer - it only works with local or domain accounts.
Any suggestions as to how I can authenticate my connection to the remote PC using a logon and password local to that machine?
PS我已经看了
WebConfigurationManager.GetWebApplication(" system.net / mailSettings");
但是我永远无法让它返回任何内容我能找到的唯一例子
使用的是ConnectionStrings。
我原以为这会有用。
>
SmtpSection smtpSec =
WebConfigurationManager.GetWebApplicationSection(" mailSettings")as
SmtpSection;
Debug。 WriteLine(smtpSect.Network.UserName);
但是smtpSec总是为空
P.S. I''ve looked at
WebConfigurationManager.GetWebApplication("system. net/mailSettings");
But I can never get that to return anything and the only example I can find
with it being used is with ConnectionStrings.
I would have thought this would have worked.
SmtpSection smtpSec =
WebConfigurationManager.GetWebApplicationSection(" mailSettings") as
SmtpSection;
Debug.WriteLine(smtpSect.Network.UserName);
But smtpSec is always null
这篇关于使用非域帐户对网络服务器进行身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!