问题
We started to receive the below error a few months ago, it looks like mac os 6. Can someone help me shed some light on the below issue? We have a lot of partial rendering on our site, but it seems asp.net thinks ipad 6_0_1 cannot handle it.
Event Target: ctl00$ScriptManager1
Exception: System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.InvalidOperationException: The page is performing an async postback but the ScriptManager.SupportsPartialRendering property is set to false. Ensure that the property is set to true during an async postback. at System.Web.UI.ScriptManager.OnPageInitComplete(Object sender, EventArgs e) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
User Agent: Mozilla/5.0 (iPad; CPU OS 6_0_1 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A523 Safari/8536.25
回答1:
Since I've been working on this all day I thought I'd post what I ended up doing in addition to my above comments. It looks like the important browser capabilities are
ecmascriptversion=1.5
w3cdomversion=1.0
supportscallback=true
If any one of these aren't present the Sys.WebForms object won't get created.
I ended up creating a custom browser file in the App_Browsers folder:
<browsers>
<gateway id="IPad" parentID="Safari">
<identification>
<userAgent match="iPad" />
</identification>
<capabilities>
<capability name="ecmascriptversion" value="1.5" />
<capability name="w3cdomversion" value="1.0" />
<capability name="supportscallback" value="true" />
<capability name="supportsxmlhttp" value="true" />
</capabilities>
</gateway>
</browsers>
The last capability is not necessary for creation of the Sys.WebForms object however I'm not quite sure how Ajax is supposed to work without an XMLHttpRequest object.
来源:https://stackoverflow.com/questions/14635631/ipad-6-0-1-scriptmanager-supportspartialrendering-asp-net