草庐IT

sub-domain

全部标签

c# - 如何从 AD DirectoryEntry 获取 DOMAIN\USER?

如何从ActiveDirectoryDirectoryEntry(SchemaClassName="user")对象获取Windows用户和域?用户名在sAMAccountName属性中,但我可以在哪里查找域名?(我不能假设一个固定的域名,因为用户来自不同的子域。) 最佳答案 这假定results是从DirectorySearcher获得的SearchResultCollection,但您应该能够直接从DirectoryEntry获得objectsid。SearchResultresult=results[0];varpropert

c# - 如何从 DOMAIN\user 格式的用户名创建 WindowsIdentity/WindowsPrincipal

WindowsIdentity(string)构造函数要求用户名采用username@domain.com格式。但在我的例子中,我从旧的DOMAIN\user格式的数据库中获取用户名(然后必须检查他们的Windows角色成员身份)。从旧式(sAMAccountName)用户名​​创建WindowsPrincipal的最佳方法是什么? 最佳答案 似乎没有办法在不涉及对ActiveDirectory的查询的情况下转换用户名格式。由于是这种情况,因此无需创建WindowsPrincipal来检查组成员身份,因为这可能需要与AD的另一个连接

javascript - iframe contentWindow 在缩短 document.domain 后抛出拒绝访问错误

我通过以下方式动态创建IFRAME:varwrapUpIframe=document.createElement("iframe");wrapUpIframe.id='WrapUpDialog3';wrapUpIframe.src='WrapUpDialog.html';document.body.appendChild(wrapUpIframe);在动态创建之后,我的document.domain正在从Servername.dc.com缩短为仅dc.com,但是当我尝试访问contentWindow时,我得到了一个Accessisdenied错误:document.getElemen

javascript - "Protocols, domains, and ports must match"问题

当我在控制台上查看时,我的网站有这些错误消息。谁能告诉我通常导致这些错误消息的问题是什么?Blockedaframewithorigin"mysite"fromaccessingaframewithorigin"facebook".Theframebeingaccessedset"document.domain"to"facebook",buttheframerequestingaccessdidnot.Bothmustset"document.domain"tothesamevaluetoallowaccess.contentscript_siteoverlay_bin.js:78B

javascript - 谷歌浏览器插件 : How to get domain from URL (tab. 网址)

使用GoogleChromeAPI的tab.urlvalue,从整个值中获取域的最佳方法是什么?在JavaScript中,我会使用window.location.protocol和window.location.hostname。例如这样的事情:vardomain=window.location.protocol+"//"+window.location.hostname;但是那获取的是扩展域而不是选项卡,所以不能使用该方法。因此,使用类似于下面的函数...我如何从tab.url值中删除域?functionshow_alert(){chrome.tabs.getSelected(nul

javascript - 即使正确设置了 document.domain,跨子域 ajax 请求也被拒绝

在我的应用程序中,我在一个子域(dev.u413.com)上有一个网站,我使用jQuery向另一个子域(api.u413.com)上的JSONapi发出ajax请求。当我检查Chrome开发工具和FirefoxFirebug中的请求时,我的请求似乎被Access-Control-Allowed-Origin阻止了。我将document.domain设置为当前域的后缀:document.domain='u413.com';。这是我的要求:$.ajax({dataType:'json',data:{parseAsHtml:true,cli:'help'},url:'http://api.u

javascript - 设置 document.domain 是否适用于所有(大多数)浏览器?

SameOriginPolicyDocumentation是这样说的:Thereisoneexceptiontothesameoriginrule.Ascriptcansetthevalueofdocument.domaintoasuffixofthecurrentdomain.Ifitdoesso,theshorterdomainisusedforsubsequentoriginchecks.Forexample,assumeascriptinthedocumentathttp://store.company.com/dir/other.htmlexecutesthefollowin

php - 无法加载 URL : The domain of this URL isn't included in the app's domains. 要能够加载此 URL... Codeigniter

我正在尝试使用codeigniterphp登录facebook应用程序。我收到错误:WarningCan'tLoadURL:ThedomainofthisURLisn'tincludedintheapp'sdomains.TobeabletoloadthisURL,addalldomainsandsubdomainsofyourapptotheAppDomainsfieldinyourappsettings.我做了一些研究,我认为我在Facebook应用程序中的有效OAuth重定向URI是错误的/无效的。有人可以指导我如何解决这个问题吗?这是我的链接图片 最

php - Facebook 授权 : Can't Load URL: The domain of this URL isn't included in the app's domains

我知道这个问题之前在这个链接中被问过FacebookOAuth"ThedomainofthisURLisn'tincludedintheapp'sdomain",但该解决方案对我不起作用。它显示的错误是这样的:我也将我的域包含在应用程序的facebookapi域中,我传递的重定向url格式如下所示:https://example.com/clients/authorization/facebook/a1njk2nkll55343nlk4/page这里facebook/后面的随机字符是动态的客户端id。此外,我在通过facebook登录时也遇到了同样的问题。谢谢。

php - preg_match 到 domain.tld

如何获取只包含domain.tld的字符串?if(preg_match('^(?:[-A-Za-z0-9]+\.)+[A-Za-z]{2,6}$',$domain))echo"domain.tldfound!";但对于正则表达式^(?:[-A-Za-z0-9]+\.)+[A-Za-z]{2,6}$,子域是还可以。但我只想检查“domain.tld”。我应该使用什么正则表达式?谢谢。 最佳答案 if(preg_match('/^[-a-z0-9]+\.[a-z]{2,6}$/',strtolower($domain)))echo"do