locked
Modifying Request Headers RRS feed

  • Question

  • User-119324200 posted

    when i try to modify the request headers i get this error message: "Operation is not supported on this platform."

    here is what i am trying to do:

     

    System.Uri url = new System.Uri(Request.Url, Request.ApplicationPath);
    System.Web.HttpRequest request = new System.Web.HttpRequest(Server.MapPath(url.LocalPath), url.ToString(), url.Query);
    request.Headers["Credentials"] = EncryptCredentials(System.IO.File.ReadAllText(System.IO.Path.GetPathRoot(Server.MapPath("."))+"Public Key.xml"), username, password);
    
    System.Web.HttpResponse response = new System.Web.HttpResponse(Response.Output);
    System.Web.HttpContext context = new System.Web.HttpContext(request, response);
    
    Response.Clear();
    new Default().ProcessRequest(context);
     
    Monday, June 11, 2007 4:14 PM

Answers