草庐IT

login-attempts

全部标签

python 3.7 : How to get the Windows user Login Time?

我正在尝试使用Python3.7获取系统用户的登录时间。我已经尝试过win32net和Python的平台模块,但是平台模块中没有定义函数,Win32net与Python3等不兼容。我尝试了以下代码:importplatformplatform.uname()importplatformos_name=platform.uname()[0].lower()ifos_name=="windows":get_win_login_time()elifos_name.endswith("nix"):get_nix_login_time() 最佳答案

c# - 尝试读取 xml 文件时的 ASP.Net, "An operation was attempted on a nonexistent network connection"

stringurl="http://www.example.com/feed.xml";varsettings=newXmlReaderSettings();settings.IgnoreComments=true;settings.IgnoreProcessingInstructions=true;settings.IgnoreWhitespace=true;settings.XmlResolver=null;settings.DtdProcessing=DtdProcessing.Parse;settings.CheckCharacters=false;varrequest=(Ht

c# - 随机错误 : Attempted to read or write protected memory

我们有一个使用WCF服务的C#.Net应用程序。该应用程序部署在我们的生产服务器中的Windows服务应用程序下。该模块的一部分负责为worker今天要工作的较小区域创建形状文件((*.shp,*.dbf),并将它们发送到PDA。为了编写形状文件,我们使用第三方dll,NetTopologySuiteGisSharpBlog.NetTopologySuite.IO.ShapefileWriter它也在C#中。(我不确定它引用的任何dll是否使用非托管代码。)该系统可能会正常工作一段时间,比如一周。然后突然我们得到一个异常说Attemptedtoreadorwriteprotectedm

c# - ASP.NET Core 2.0 预览版 1 : How to set up Cookie Authentication with custom login path

在ASP.NETCore2.0中,.UseAuthentication()中间件有一个重大更改,不再允许oldsyntaxmentionedhere去工作。新版本似乎在addAuthentication中处理配置,但我无法在任何地方找到任何关于如何更改指定自定义登录和注销url的旧代码的详细信息。services.AddAuthentication(o=>{//WherecanIspecifythis?????varopt=newCookieAuthenticationOptions(){LoginPath="/api/login",LogoutPath="/api/logout",}

c# - 如何找到asp :Login LoginError error type

当asp:Login控件的LoginError事件触发时,我如何找到错误发生的原因?是否有类似e.ErrorType的属性告诉我登录失败的原因?或者我是否必须像本教程中那样手动检查所有内容:http://www.asp.net/security/tutorials/validating-user-credentials-against-the-membership-user-store-cs或http://www.aspnettutorials.com/tutorials/controls/howto-errors-login-asp4-csharp.aspx

c# - C# 中的 0.0/0.0 不会抛出 "Attempted to divide by zero."?

我在我friend的电脑上看到了这段财务计算代码:doubleTotal=...doublePaid=...doubleWating_For_Details=...doubleDecuctibles=...doubleRejected=...好吧,我一看到这个,就告诉他double以base2表示,NOT不能表示财务计算。使用decimal代替。很好。但是我把它改成double的那一刻我遇到了:试图除以零。嗯?显然-使用double时,除以0.0它确实NOT抛出异常:但返回NAN。虽然我的代码(使用decimal)确实抛出异常(当Total为0时)所以我问:我检查了0.0==0,它返回

c# - 为什么我得到异常 : Too many automatic redirections were attempted on webclient?

在form1的顶部我做了:WebClientClient;然后在构造函数中:Client=newWebClient();Client.DownloadFileCompleted+=Client_DownloadFileCompleted;Client.DownloadProgressChanged+=Client_DownloadProgressChanged;然后我每分钟都会调用这个方法:privatevoidfileDownloadRadar(){if(Client.IsBusy==true){Client.CancelAsync();}else{Client.DownloadPr

c# - TaskCompletionSource 抛出 "An attempt was made to transition a task to a final state when it had already completed"

我想使用TaskCompletionSource来包装MyService这是一个简单的服务:publicstaticTaskProcessAsync(MyServiceservice,intparameter){vartcs=newTaskCompletionSource();//EverytimeProccessAsynciscalledthisassignstoCompleted!service.Completed+=(sender,e)=>{tcs.SetResult(e.Result);};service.RunAsync(parameter);returntcs.Task;}

c# - Azure 网站不断抛出错误 "An attempt was made to access a socket in a way forbidden by its access permissions"

我有一个网站在专用的Azure计划中作为Web应用程序运行。它连接到Redis、SQLAzure和MongoDB后端。该网站现在已经运行良好数周,然后没有任何新代码,我现在收到很多套接字异常,如下所示。试图以访问权限禁止的方式访问套接字。网站在连接到Redis、SQLAzure和MongoDB时间歇性地出现错误,这毫无意义。我更改了网站的定价层,这会将网站从一个虚拟机转移到幕后的另一个虚拟机,错误消失了几天又回来了。我刚刚将站点从S3更改为S2(使其更小),它们已经消失,但我不知道会持续多久。我该如何解决?Azure是否限制站点的套接字数量?Azure中的某个站点是否存在某些可能导致此

javascript - 如何使用 FB.login 判断用户是否授予了您的权限

我看到一个类似的问题,它提到了2011年12月的变化,那部分是对的http://facebook.stackoverflow.com/questions/8753085/in-facebook-login-how-do-you-see-the-permissions-that-the-user-granted但其余的答案都是错误的虽然我确实注意到这是url的一部分https://s-static.ak.fbcdn.net/connect/xd_proxy.php?version=3&error_reason=user_denied&error=access_denied&error_d