Question : This request requires buffering of data for authentication or redirection to be successful.

Hi All,

Im having a weird problem

im trying to send a request to a url via post and i keep getting this error

"This request requires buffering of data for authentication or redirection to be successful."

Heres the code

        Dim rq = HttpWebRequest.CreateDefault(New Uri(PortalUrl & "/api/api.aspx"))

        rq.Method = "POST"
        rq.ContentLength = bytes.Length
        rq.Credentials = New NetworkCredential(Username, Password)
        rq.PreAuthenticate = True
        rq.ContentType = "text/xml"

        Dim snd = rq.GetRequestStream
        snd.Write(bytes, 0, bytes.Length)
        snd.Close()

        Dim res = rq.GetResponse.GetResponseStream
        Dim txtin = New IO.StreamReader(res).ReadToEnd

it freaks at the line "Dim snd = rq.GetRequestStream"

ive seen comments regarding "AllowWriteStreamBuffering" but that doesnt appear as a property ans the app wont even compile if i add it

Can anyone shed any light?

Answer : This request requires buffering of data for authentication or redirection to be successful.

>> You mean creating one field with a big string of emails seprated by commas and then parsing that. I read somewhere this is no good nromlized solution and hard to maintain.

Not exactly, Just create a function and create the comma separated email list on the fly. And don't store the list in database which is not normalized and its not a recommended approach too.

>> What is resource intensive?

Say, if you have only 10 customers, then you can create 10 DLs now manually. But if you have around 1 million customers in your table, then will you be creating 1 million DL for each customers..
And this is what I mentioned as resource intensive as it requires lots of efforts.

>> The solution is for customer to create the alias groups. We just update the email field to that alias.

Yes, you can.
In that case, then you need to plan on how to Add/ Remove or Modify emails list in the DL.
Random Solutions  
 
programming4us programming4us