You need to sign in to do that
Don't have an account?
Raj_S
Login to Salesforce using POST or GET request.
Is it possible to login to the salesforce using Post / Get request?? I mean i want to open my salesforce Home page directly by using my organization username and password with the URL(www.salesforce.com) string.
Thanks
Raj S
Thanks
Raj S
string strusername = UserName;
string strpassword = Password;
ASCIIEncoding encoding = new ASCIIEncoding();
string postData = "username=" + strusername;
postData += ("&password=" + strpassword);
byte[] data = encoding.GetBytes(postData);
HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create("https://na6.salesforce.com/home/home.jsp");
myRequest.Method = "POST";
myRequest.ContentType = "application/x-www-form-urlencoded";
myRequest.ContentLength = data.Length;
myRequest.Proxy = new System.Net.WebProxy("1.1.1.1", 8080);
myRequest.Proxy.Credentials = new System.Net.NetworkCredential("XYZ", "ABC", "123");
Stream newstream = myRequest.GetRequestStream();
newstream.Write(data, 0, data.Length);
newstream.Close();
But I got this Error :
Length = 'newstream.Length' threw an exception of type 'System.NotSupportedException'
Can someone help me out in this.
Thanks!
Raj S
I think https://login.salesforce.com/ is the primary gateway for authentication now.
Viewing the source (below), I wonder if posting the hidden values would achieve what you're looking for.
create a simple form with a "get" method. have 2 fields un and pw for the username and password. A url of the form shown below will be created and log you in. You can try it by putting into the url your username and password to test.
https://login.salesforce.com/?un=blah@blah.com&pw=mypassword
Rich.