TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
gaurav sharma
NA
1
39.7k
The remote server returned an error: (401) Unauthorized.
May 21 2015 8:03 AM
while i am running my c# code then i am getting this error here is my code below
var postBody = "screen_name=" + Uri.EscapeDataString(screen_name) + "&count=" + Uri.EscapeDataString(notweets);//
resource_url += "?" + postBody;
byte[] postDataEncoded = System.Text.Encoding.UTF8.GetBytes(authHeader);
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(resource_url);
request.Accept = "application/xml";
request.Headers.Add("Authorization", authHeader);
request.Method = "GET";
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = postDataEncoded.Length;
WebResponse response = request.GetResponse();
string responseData = new StreamReader(response.GetResponseStream()).ReadToEnd();
context.Response.Write(new System.Web.Script.Serialization.JavaScriptSerializer().Serialize(responseData));
context.Response.End();
Reply
Answers (
2
)
The Microsoft Jet database engine cannot open the file
Redirecting URL in ASP.net MVC 5