Come posso aggiungere un parametro nello header della richiesta e fare un redirect?
quando viene eseguita questa riga di codice:
codice:
Request.Headers.Add("X-Titolo", Titolo);
mi esce questo errore:
codice:
System.PlatformNotSupportedException was unhandled by user code
Message=Operazione non supportata su questa piattaforma.
Source=System.Web
StackTrace:
in System.Web.HttpHeaderCollection.Set(String name, String value)
in System.Collections.Specialized.NameValueCollection.set_Item(String name, String value)
[...]
in System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
in System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
in System.Web.UI.Control.OnLoad(EventArgs e)
in System.Web.UI.Control.LoadRecursive()
in System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
InnerException:
ho provato anche in questo modo:
codice:
Response.AppendHeader("X-Titolo", Titolo);
Response.Redirect(url);
non viene inviato quando si fa il redirect