我們大多數人都能夠提交服務器停用請求表單,但因無法提交請求表單而無法提交請求表單的原因是彈出式提醒說「無效用戶數據,返回表單」。 我已經仔細檢查了計算機管理員的組權限,他已經有權提交請求。ASP.NET:爲什麼特定用戶不斷收到驗證錯誤?
這XmlUserInfo標籤的作用是顯示和獲取用戶喜歡的UID,姓名,聯繫方式,等
<xml id="XmlUserInfo" src="http://USMDLCDOWW002.intranet.dow.com/common/components/userinfo/UserInfoXml.asp?UserID=me"> </xml>
然後在HTML的底部,他們得到特定的XML標籤UID(用戶ID)和cn (contactname)傳遞給javascript來驗證。這裏是這個例子,
<p>
Please verify the entries below before submitting your request.</p>
<!--<form action="<%=Application("GSDISMConfirmationPage")%>" method="POST" id="ISform" name="ISform" onsubmit="javascript: return validate();">-->
<form method="POST" id="ISform" name="ISform" onsubmit="javascript: return validate();">
<input type="hidden" name="Form_ID" id="Form_ID" value="08.01.8">
<input type="hidden" name="Form_Name" id="Form_Name" value="NEAt - Server Decommission">
<input type="hidden" name="Callback_Phone" id="Callback_Phone" value="NULL">
<input type="hidden" name="ISM_Class_ID" id="ISM_Class_ID" value="DOW42109" />
<input type="hidden" name="Case_Type" id="Case_Type" value="Request">
<input type="hidden" name="Level_1" id="Level_1" value="NEA">
<input type="hidden" name="Level_2" id="Level_2" value="Windows">
<input type="hidden" name="Level_3" id="Level_3" value="Server Decommission">
<input type="hidden" name="CC_List" id="CC_List" value="NULL">
<input type="hidden" name="More_Info_Value_1" id="More_Info_Value_1" value="<% =Request.Form("txtServName") %>">
<input type="hidden" name="More_Info_Tag_1" id="More_Info_Tag_1" value="PRI_SERVER">
<input type="hidden" name="More_Info_Value_2" id="More_Info_Value_2" value="NULL">
<input type="hidden" name="More_Info_Tag_2" id="More_Info_Tag_2" value="NULL">
<input type="hidden" name="More_Info_Value_3" id="More_Info_Value_3" value="NULL">
<input type="hidden" name="More_Info_Value_4" id="More_Info_Value_4" value="NULL">
<input type="hidden" name="More_Info_Value_5" id="More_Info_Value_5" value="NULL">
<input type="hidden" name="More_Info_Value_6" id="More_Info_Value_6" value="NULL">
<input type="hidden" name="More_Info_Value_7" id="More_Info_Value_7" value="NULL">
<input type="hidden" name="More_Info_Value_8" id="More_Info_Value_8" value="NULL">
<input type="hidden" name="More_Info_Value_9" id="More_Info_Value_9" value="NULL">
<input type="hidden" name="More_Info_Value_10" id="More_Info_Value_10" value="NULL">
<input type="hidden" name="More_Info_Value_11" id="More_Info_Value_11" value="NULL">
<input type="hidden" name="More_Info_Value_12" id="More_Info_Value_12" value="NULL">
<input type="hidden" name="More_Info_Value_13" id="More_Info_Value_13" value="NULL">
<input type="hidden" name="More_Info_Value_14" id="More_Info_Value_14" value="NULL">
<input type="hidden" name="More_Info_Value_15" id="More_Info_Value_15" value="NULL">
<input type="hidden" name="More_Info_Value_16" id="More_Info_Value_16" value="NULL">
<input type="hidden" name="More_Info_Value_17" id="More_Info_Value_17" value="NULL">
<input type="hidden" name="More_Info_Value_18" id="More_Info_Value_18" value="NULL">
<input type="hidden" name="More_Info_Value_19" id="More_Info_Value_19" value="NULL">
<input type="hidden" name="Needed_By_Date" id="Needed_By_Date" value="NULL">
<input type="hidden" name="Case_Notes" id="Case_Notes" value="
Server Decommission Request
Environment: <% Response.Write(Request.Form("cmbEnvironment")) %>
Server Type: <% Response.Write(Request.Form("cmbServerType")) %>
Server Name: <% Response.Write(Request.Form("txtServName")) %>
Notes and/or Special Instructions: <% Response.Write(Request.Form("txtNotes")) %>">
<input type="hidden" name="PreApprover_UserID" id="PreApprover_UserID" value="NULL">
<input type="hidden" name="Confirmation_String" id="Confirmation_String" value="NULL">
<input type="hidden" name="Display_Menu" id="Display_Menu" value="NULL">
<table style="display: none; border-collapse: collapse" bordercolor="#111111" cellpadding="0"
cellspacing="0" datasrc="#XmlUserInfo">
<tr>
<td>
<input type="hidden" datafld="cn" id="Contact_FullName" name="Contact_FullName">
<input type="hidden" datafld="uid" id="Contact_ID" name="Contact_ID">
<input type="hidden" datafld="telephoneNumber" name="Contact_Phone" id="Contact_Phone">
</td>
</tr>
</table>
然後傳遞Contact_FullName和Contact_ID到外部JavaScript文件來驗證。如果不匹配,它會顯示彈出消息,它的問題,
function validate()
{
if (ISform.Form_ID)
{
if ((ISform.Contact_FullName.value == "")||(ISform.Contact_ID.value == ""))
{
alert("Invalid User Data, return to form.");
return (false);
}
}
else
{
if (ISform.txtServName.value == "")
{
ServerValues();
if (ISform.txtServName.value == "")
{
alert("Please enter a Server Name.");
ISform.txtServName.focus();
return (false);
}
}
}
}
他的uid和聯繫人姓名是不是空的,因爲它已經存在於XmlUserInfo它假設得到他的UID和CN。它適用於我和其他人,但對他不起作用。
也許用戶無權訪問xml文件。如果該用戶可以直接從他們的計算機訪問xml文件,您可以嘗試。 –
用戶確實可以訪問xml文件並能夠顯示他的信息。當它顯示時,這意味着它應該能夠讓他的XML標記信息進行驗證。 – StudentIT