I am attempting to create a single sign on experience between an asp.net site and a wordpress site using a simple form POST method. I have built a simple php page that uses
From what I can see, your server side code is submitting the request to wp-load.php which is creating and logging the user in (in the session of the server side web request).
I beleive that wordpress will send back a cookie on each page, so you would have to extract the cookies from the WebResponse, and send those cookies back from your asp.net page, along with a
Response.Redirect("http://localhost:1350/wp/");
I am unable to test this as I don't have a WP install at the moment, and I don't use VB.net but i guess it would go something like:
Dim cookies As New CookieContainer()
Dim myRequest As HttpWebRequest = WebRequest.Create("http://localhost:1350/wpComm/createWPaccount.php")
myRequest.Method = "POST"
myRequest.ContentType = "application/x-www-form-urlencoded"
myRequest.ContentLength = data.Length
myRequest.CookieContainer = cookies;
Dim newStream As Stream = myRequest.GetRequestStream()
newStream.Write(data, 0, data.Length)
newStream.Close()
For Each c As Cookie In cookies
Response.Cookies.Add(c)
Next
Response.Redirect("http://localhost:1350/wp/")