Click here to Skip to main content
15,895,011 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi, i executed the application with my credentials and i got the output in c#.net but once i converted to vb.net after entering credentilals and wen i click on agree button,control not enntering into retrieve contacts block throwing exception :

The remote server returned an error: (401) Unauthorized.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
length: 6
stack trace: at System.Net.HttpWebRequest.GetResponse() at _Default.RetriveContacts() in D:\ImportYahooContacts\MyYahooContacts.aspx.vb:line 339
status: ProtocolError
Status Code: (401) Unauthorized
Status Description: Authorization Required
source: System
headers: 0: Keep-Alive
headers: 1: chunked
headers: 2: Accept-Encoding
headers: 3: private
headers: 4: application/xml
headers: 5: Fri, 14 Jun 2013 04:47:24 GMT
headers: 6: HTTP/1.1 UserFiberFramework/1.0
headers: 7: HTTP/1.1 r07.ycpi.inc.yahoo.net UserFiberFramework/1.0
headers: 8: OAuth oauth_problem="signature_invalid", realm="yahooapis.com" 


can any 1 resolve my solution
Posted

Without seeing your code, we can't help that much, but two things do stand out:
1) "i executed the application with my credentials and i got the output in c#"
2) "once i converted to vb.net after entering credentilals" and "The remote server returned an error: (401) Unauthorized."

Which implies that the credentials you supplied via the VB code were not the same as the credentials you supplied via the VB.

So either you converted the code incorrectly, or you entered the credentials wrong.

So check your code. I suspect you may have translated it wrong.

BTW: In future, use correct capitalization: ALL CAPS is seem as shouting, and all lower case is seen as childish. And please don't use txtspk here - you have a full keyboard, so use it or you will annoy people and that reduces your chances of a helpful answer.
 
Share this answer
 
hi OriginalGriff,

1)watevr i got consumer key and secret key from yahoo api of my project i added in c#.net code with my localhost url and finally i got the output

2) im working on vb.net,and that c# executed code i got converted to vb.net and again i created one more project in yahoo api in my account and i registerd my localhost fro vb project

url: http://localhost:56566/ImportYahooContacts/MyYahooContacts.aspx
with consumer key and secretkey

but once i run the aplication i got the above error so pls u people can convert to vb.net and check it once, if u get the output incase, den 4wrd me the code to my id laxmanbtech.it@gamil.com
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900