Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/apache-flex/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Coldfusion e> 询问。用cftry包围代码并在cfcatch中转储错误可能会告诉您错误。同样的情况也会发生错误信息空白屏幕,正确的信息会显示dn、givenname、mail、memberof、samaccountname,您是说看不到cfdump后面的文本行吗?使_Coldfusion - Fatal编程技术网

Coldfusion e> 询问。用cftry包围代码并在cfcatch中转储错误可能会告诉您错误。同样的情况也会发生错误信息空白屏幕,正确的信息会显示dn、givenname、mail、memberof、samaccountname,您是说看不到cfdump后面的文本行吗?使

Coldfusion e> 询问。用cftry包围代码并在cfcatch中转储错误可能会告诉您错误。同样的情况也会发生错误信息空白屏幕,正确的信息会显示dn、givenname、mail、memberof、samaccountname,您是说看不到cfdump后面的文本行吗?使,coldfusion,Coldfusion,e> 询问。用cftry包围代码并在cfcatch中转储错误可能会告诉您错误。同样的情况也会发生错误信息空白屏幕,正确的信息会显示dn、givenname、mail、memberof、samaccountname,您是说看不到cfdump后面的文本行吗?使用3个cfdump进行尝试。因此,当我运行正确和不正确的凭据时,cfldap标记前面只显示了,然后我将第一个转储拿走,并获得两个的空白白屏。如果这是在具有全局错误处理的应用程序中,请将其移动到一个没有全局错误处理的应用程序中。您必须能够看到cf



e> 询问。用
cftry
包围代码并在
cfcatch
中转储错误可能会告诉您错误。同样的情况也会发生错误信息空白屏幕,正确的信息会显示dn、givenname、mail、memberof、samaccountname,您是说看不到cfdump后面的文本行吗?使用3个cfdump进行尝试。因此,当我运行正确和不正确的凭据时,cfldap标记前面只显示了

,然后我将第一个转储拿走,并获得两个的空白白屏。如果这是在具有全局错误处理的应用程序中,请将其移动到一个没有全局错误处理的应用程序中。您必须能够看到cfldap尝试发生了什么。同样的情况也会发生错误信息空白屏幕,正确的信息显示dn、givenname、mail、memberof、samaccountname、snAre您是说您没有看到cfdump后面的文本行吗?使用3个cfdump进行尝试。因此,当我运行正确和不正确的凭据时,cfldap标记前面只显示了

,然后我将第一个转储拿走,并获得两个的空白白屏。如果这是在具有全局错误处理的应用程序中,请将其移动到一个没有全局错误处理的应用程序中。您必须能够看到cfldap尝试的情况。如果输入了错误的凭据,这也无法正常工作。如果输入了正确的凭据,但尝试输入了#LoginStatus#,它确实可以工作,它只会显示带有错误凭据的空白白色屏幕,但显示正确凭据的成功。当输入错误凭据时,您是否收到Javascript警报?嗯。。。尝试在
之间添加一些普通的旧HTML。看看你是否看到了。我能够让它工作到与此非常相似的程度!!!谢谢大家的帮助!!老兄,那真是太痛苦了!如果输入了错误的凭据,这也无法正常工作。如果输入了正确的凭据,但尝试输入了#LoginStatus#,它确实可以工作,它只会显示带有错误凭据的空白白色屏幕,但显示正确凭据的成功。当输入错误凭据时,您是否收到Javascript警报?嗯。。。尝试在
之间添加一些普通的旧HTML。看看你是否看到了。我能够让它工作到与此非常相似的程度!!!谢谢大家的帮助!!老兄,那真是太痛苦了!
<cfldap action="query"
              name="AuthenticateUser"
              attributes="dn,mail,givenname,sn,samaccountname,memberof"
              start="DC=domain,DC=net"
              filter="(&(objectclass=user)(samAccountName=#trim(form.user_name)#))"
              server="servername"
              Port="389"
              username="tc\#trim(form.user_name)#" 
              password="#trim(form.user_pass)#">
<cfoutput>#AuthenticateUser.RecordCount#</cfoutput>
<!--- Get all records from the database that match this users credentials ---> 
<cfquery name="userVerify" datasource="test">
    SELECT  *
    FROM    dbo.Users
    WHERE   user_name = <cfqueryparam value="#AuthenticateUser.samaccountname#" cfsqltype="cf_sql_varchar" />
</cfquery>
<cfif AuthenticateUser.RecordCount gt 0> 
    <!--- This user has logged in correctly, change the value of the session.allowin value ---> 
    <cfset session.allowin = "True" /> 
    <cfset session.employee_number = userVerify.employee_number /> 

     <!--- Now welcome user and redirect to "index.html" ---> 
    <script>  
        self.location="../dashboard/dashboard.cfm"; 
    </script> 
<cfelse> 
    <!--- this user did not log in correctly, alert and redirect to the login page ---> 
    <script> 
        alert("Your credentials could not be verified, please try again!"); 
        self.location="Javascript:history.go(-1)"; 
    </script> 
    </cfif> 
<cfdump var="before cfldap tag<br />">

<cfldap action="query"
          name="AuthenticateUser"
 etc
 >
<cfdump var="after cfldap tag<br />">
<cfdump var = "#AuthenticateUser#">
<cfdump var="after cfdump<br />">
<cftry>
    <cfldap  action="query"
              name="AuthenticateUser"
              attributes="dn,mail,givenname,sn,samaccountname,memberof"
              start="DC=domain,DC=net"
              filter="(&(objectclass=user)(samAccountName=#trim(form.user_name)#))"
              server="servername"
              Port="389"
              username="tc\#trim(form.user_name)#" 
              password="#trim(form.user_pass)#">
   <cfset LoginStatus = "Success">
   <cfcatch type="any">
       <cfset LoginStatus = "Failed">
   </cfcatch>
</cftry>
<cfif LoginStatus eq "Success"> 
    <!--- This user has logged in correctly, change the value of the session.allowin value ---> 
    <cfset session.allowin = "True" /> 
    <cfset session.employee_number = userVerify.employee_number /> 

     <!--- Now welcome user and redirect to "index.html" ---> 
    <script>  
        self.location="../dashboard/dashboard.cfm"; 
    </script> 
<cfelse> 
    <!--- this user did not log in correctly, alert and redirect to the login page ---> 
    <script> 
        alert("Your credentials could not be verified, please try again!"); 
        self.location="Javascript:history.go(-1)"; 
    </script> 
</cfif> 
<cftry>
    <cfldap action="Query"
        name="ADResult"
        attributes="dn"
        start="DC=domain,DC=net"
        filter="sAMAccountName=administrator" 
        server="servername"
        scope = "subtree"
        username="#arguments.username#"
        password="#arguments.password#" />

    <cfset isAuthenticated = true />
<cfcatch type="any">
    <cfset isAuthenticated = false />
</cfcatch>
</cftry>

<cfreturn isAuthenticated />
<cfldap action="Query"
    name="ADResult"
    attributes="mail,givenName"
    start="DC=domain,DC=net"
    filter="sAMAccountName=#arguments.username#" 
    server="servername"
    scope = "subtree"
    username="administrator"
    password="myAdminPassword" />
<cfset objAD = createobject("webservice", "http://mywebservice.com") />
<cfset isAuthenticated = objAD.authenticate(form.username, form.password) />
<cfif isAuthenticated>
    <cfset userDetails = objAD.getUserDetails(form.username)>
</cfif>