【发布时间】:2011-09-19 07:36:34
【问题描述】:
我有一个信息路径表单,当我单击按钮时,它应该重定向到共享点列表项的添加项模板。在我给出的代码中
try
{
string url = "Sharepoint List item's URL";
HttpContext.Current.Response.Redirect("url");
}
catch
{
}
但我收到这样的安全错误
System.Security.SecurityException 请求“System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”类型的权限失败。 在 Activity_Profile.FormCode.btnNewReportingUnit_Clicked(对象发送者,ClickedEventArgs e) 在 Microsoft.Office.InfoPath.Internal.ButtonEventHost.OnButtonClick(DocActionEvent pEvent) 在 Microsoft.Office.Interop.InfoPath.SemiTrust._ButtonEventSink_SinkHelper.OnClick(DocActionEvent pEvent)
请帮帮我:)
【问题讨论】:
-
即使在 URL 字段中,如果我提供 www.google.com 我也会遇到同样的错误......使用 HttpContext.Current.Response.Redirect("url");
标签: c# sharepoint-2010 infopath infopath2010