我遇到了一個問題,其中鉻和歌劇工作正常,但有一種形式扔在適當的Internet Explorer 9和10當我在URL中使用主機名或IP而不是本地主機。還有另一個表單對象適用於只有文本框和提交按鈕的所有內容。ServiceStack webservice工作ie9或IE10使用本地主機作爲地址,但不是與IP地址作爲地址
我遇到問題的表單有文本字段,選擇列表,下拉列表和複選框。
我沒有收到從Internet Explorer中的提交按鈕的事件,但我在其他瀏覽器中。
錯誤:
Error Code:
RequestBindingException: Unable to bind request
Stack:
at ServiceStack.WebHost.Endpoints.RestHandler.GetRequest(IHttpRequest httpReq, IRestPath restPath) at ServiceStack.WebHost.Endpoints.RestHandler.ProcessRequest(IHttpRequest httpReq, IHttpResponse httpRes, String operationName)
代碼:
<form style="width:inherit; margin:4px" action="/search" method="post"><label style="color: white;">Quick Search</label><br>
<label style="color: white;">Colors:</label>
<br/>
@*<input style="width:100px;" name="Colors" type="text"><br>*@
<select name="Colors" style="height:200px; width:100px;" multiple>
@{
@:<option value ="Any">Any</option>
foreach(Color colors in Repositories.TypeGetters.GetAllColors())
{
@:<option value ="@colors.Description">@colors.Description</option>
}
}
</select><br>
<input style="color: white; font-size:small" type="checkbox" name="PredominantColor" value="1" />
<label style="color: white;">Predominant Color?</label><br />
<label style="color: white; width:30px">D1</label><label style="color: white; width:30px">xD2:</label><br />
<input style="width:30px" name="D1" type="text"><label style="color: white;">mm. X </label>
<input style="width:30px" name="D2" type="text"><label style="color: white;">mm.</label><br />
<label style="color: white;">Number of Layers:</label><br>
<input style="width:30px" name="LayersCount" type="text"><br>
<label style="color: white; width:100px">Flexibility:</label><br/>
<select style="width:100px" name="Flexibility">
@{
@:<option value ="Any">Any</option>
foreach(FlexibilityType flex in Repositories.TypeGetters.GetAllFlexTypes())
{
@:<option value ="@flex.Description">@flex.Description</option>
}
}
</select> <br />
<button name="SearchType" type="submit" value="2" style="float:right; margin-right:20px;">Submit</button><br />
</form>