Advertisement
Guest User

Untitled

a guest
Apr 21st, 2015
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.45 KB | None | 0 0
  1. An exception of type 'System.Net.WebException' occurred in System.dll but was not handled in user code
  2.  
  3. Additional information: The remote server returned an error: (404) Not Found.
  4.  
  5. var res = wc.UploadValues("http://ns2278995.ovh.net/proyectos/paymentsystem/trunk/backoffice/en/api/user/insert", nvc);
  6.  
  7. TimeSpan unixTicks = new TimeSpan(DateTime.UtcNow.Ticks) - epochTicks;
  8. string dt = unixTime.ToString();
  9.  
  10. string X_PUBLIC = GenerateHash(AccessToken + dt);
  11.  
  12. string status = "1",
  13. name = "test1",
  14. surnames = "test",
  15. email = "user@test.com",
  16. password = "password123",
  17. language = "ENG",
  18. country = "Spain",
  19. region = "Catalonia",
  20. city = "Barcelona",
  21. postalCode = "08007",
  22. streetAddress = "Balmes",
  23. numberAddress = "24",
  24. floorAddress = "2",
  25. phone = "9355552288",
  26. birthDay = "";
  27.  
  28.  
  29. string DATAs = "<?xml version='1.0' encoding='utf-8'?>" +
  30. "<TransaxRS>" +
  31. "' status ='" + status +
  32. "' name ='" + name +
  33. "' surnames ='" + surnames +
  34. "' email ='" + email +
  35. "' password ='" + password +
  36. "' language ='" + language +
  37. "' country ='" + country +
  38. "' region ='" + region +
  39. "' city ='" + city +
  40. "' postalCode ='" + postalCode +
  41. "' streetAddress ='" + streetAddress +
  42. "' floorAddress ='" + floorAddress +
  43. "' numberAddress ='" + numberAddress +
  44. "' phone ='" + phone +
  45. "' birthDay ='" + birthDay +
  46. "'/>" +
  47. "</TransaxRS>";
  48. string hmac = GenerateHMAC(AccessToken, DATAs);
  49. WebClient wc = new WebClient();
  50. wc.Headers.Add("token", X_PUBLIC);
  51. wc.Headers.Add("X_HASH", hmac);
  52. NameValueCollection nvc = new NameValueCollection();
  53. var res = wc.UploadValues("http://ns2278995.ovh.net/proyectos/paymentsystem/trunk/backoffice/en/api/user/insert", nvc);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement