Web Service Failing With The Request Failed With HTTP Status 401: Unauthorized?
Apr 23, 2012
I have a very long running task I need to take from my website and put into a web service however every time I try call the web service I get this error message The request failed with HTTP status 401: Unauthorized.
View 1 Replies
ADVERTISEMENT
Mar 26, 2012
I'm attempting to login to a cPanel using a POST Request in VB.Net. I have the correct credentials when logging in and when posting I still get an 'Unauthorized (401)' response when it should be '301' (analysed using Tamper Data Firefox Add-On). Below is my post request information and function.[code...]
View 1 Replies
Aug 23, 2011
I have a task to create a web service to receive client-side app's http request(with rpc={json data} in the end), deserilize it and put he parameter in stored Procedure in order to retrive data from sql server. the procedure query and client-side's app are already there and the return data to client-side app is JSON too
View 1 Replies
Jun 2, 2009
I'm attempting to update a legacy VB6 component (not written by me) to the .NET platform. There is one function which posts an XML string to a URL:
Function PostToUrl(ByRef psUrl, ByRef psData, Byref psResponseText, ByRef psErrorMsg, ByRef psUsername, ByRef psPassword)
On Error Resume Next
Dim objWinHTTP
[CODE]...
I've updated this to:
Public Function PostXml(ByVal XML As String) As Boolean
Try
Dim URL As String = My.Settings.NTSPostURL
'TODO: supply username and password! '
[CODE]...
However when I run the .NET code the server returns the error '403 Forbidden - protocol error' on the line: Using Response As HttpWebResponse = DirectCas (HTTPRequest.GetResponse(), HttpWebResponse). The VB6 code runs fine. identify any discrepancies between the two that might be causing this?
View 4 Replies
Jun 2, 2009
I created a simple service that does some inventory and records the data to a MySQL server. The service starts just fine when told to from the services administration panel. However, it will not on computer bootup. I get the famous error.
The InventoryService service failed to start due to the following error:The service did not respond to the start or control request in a timely fashion. I've read that logs can be a problem, so I disabled the autolog...but that didn't solve any problems. I believe it has something to do with the user not already being logged in and attempting to connect to a remote database. So, I added a function to check for internet connectivity before executing any inventory methods or SQL queries. This did not fix it either.
EDIT: I also am receiving the following error in the administrative logs. I create the service dependant upon the Tcpip service, but it still fails.A timeout was reached (30000 milliseconds) while waiting for the InventoryService service to connect.
View 1 Replies
Apr 1, 2011
I am writing a .NET program which will run on a computer with several IP addresses. The program makes HTTP requests to given web addresses. I want to choose which IP address I use (so I can determine which IP address will appear on the log of the other server).
View 1 Replies
Jun 17, 2011
Is there any way we could get directly say the 1000 characters after the first 5000 characters, skipping everything before that after sending in an HTTP request to an HTTPS page using either GET or POST in VB.NET? The reason why I ask this question is because in one of the webpage I am trying the get through my program, the website is sending response data in chunks with the first chunk containing some javascript garbage that I have no interest in, the only data I care is in the second chunk and
how to get the second chunk after receiving the first one since it is within the same HTTP request.It would save some time and Internet traffic if I can skip the first chunk that I do not need.Is that possible or I am just day dreaming?
ADDED: Here is how a typical header of the response I am getting from the webpage I am trying to get:
Date: Mon, 20 Jun 2011 13:21:56 GMT
Set-Cookie: JSESSIONID=1AF1AF9EF936E1CB2FA85B750EDC67C4; Path=****some path******; Secure
Content-Type: text/html; charset=ISO-8859-1[code].....
Not sure if that helps, but as you can see, the chunk size is not visible to me, there is no "Trailer" in the header as well.
View 1 Replies
Jun 24, 2010
Im using httpWebRequest to get a response from a website.Ive created / creating a dvd manager for my dvds on disk. My method works fine if i double click a movie name. It will download the data into the correct directories. Im implementing a "process all titles" feature and im finding that around 15 titles im getting "internal Server error 500" or the program bombs out Could this error becoming from the poor internet speed (3G dongle) and the website rejecting my query because of slow downloading?Moved into a new house and ive no broadband in yet?
View 2 Replies
Jul 28, 2011
I have gotten this code in python - been going in circles trying to figure out the vb.net equivalent. Will pay somebody for the conversion also.
[Code]...
View 1 Replies
Sep 15, 2011
i have a program that uses a web browser to view the users website in side a proxy.But of course web browsers are slow so would like to change to http request. [ code] To go to the url and the url is stored in (url)Is there any way i can change it to http request ?
View 1 Replies
Apr 10, 2012
Okay, i've tried httpwebrequest, webclient, and a couple of others methods; using the headers parameter of each to set headers and then either opening a response stream or simply setting the system.net.webclient method to download a response into a string. Put simply, how do I make a simple GET request with a few headers and read the data back! I am very, very stuck in a hole right now..
View 4 Replies
Mar 21, 2011
I've got a webservice called Converter.asmx and I've just noticed that on the remote server I basically can't connect to it. The error that I get: "No connection could be made because the target machine actively refused it 127.0.0.1:49792" and the error occurs where I'm calling the web service (second line below).
Dim webservice As New localhost.Converter
results.InnerHtml = webservice.ParseData(txtInput.InnerText, options)
On my localhost it works fine. How can I change the webservice so that it'll work on the remote host as well?
View 1 Replies
Apr 27, 2011
I have a asp.net mvc route that is taking a url and doing a simple get and return the status code from the request.
<AcceptVerbs(HttpVerbs.Post)> _
Public Function ValidateUrlStatusCode(ByVal url As String) As ActionResult
Dim code As Integer = 0
[Code]....
Now if I use firefox (using Firebug) and go to the url http://www.facebook.com/blah.html, I get the expected 404 returned. However if I use my application to call the mvc route via an ajax call, I get 200. If I set the request object's AllowAutoRedirect to false, I get 302. I never get a 404. I am verifying this once again through Firebug.
View 1 Replies
Mar 19, 2010
I have a asp.net mvc route that is taking a url and doing a simple get and return the status code from the request.
<AcceptVerbs(HttpVerbs.Post)> _
Public Function ValidateUrlStatusCode(ByVal url As String) As ActionResult
Dim code As Integer = 0
[code].....
View 26 Replies
Feb 28, 2012
I want to use a database table as a a queue...but the processing of these messages cannot be done from the database.I have a table that stores the requests i get from a .Net component. I now have to read the data from these tables and make http calls to 2 webservices. Based on the response received from the webservices, the data gets archived or deleted.I had a few specific questions:
1. How do i make sure that if i pick a record for processing and the http call fails I should be able to go on to the next record, and then come back to this record at the end of the run
2. Is there an alternative to using the database as a queue(like MSMQ etc.), which option is better
3. I want to maintain an audit trail of the record status. Is creating a trigger to log the changes before the edit the best way to do it?
View 1 Replies
Feb 12, 2010
I have done the PING part, you click a button the it ping's the server IP Address, then return's the result via a label. I want to make one so it check's the HTTP status of the server and if it's on it display's a green circle with a label next to it saying HTTP Status is OK.
[Code]...
View 7 Replies
Oct 19, 2009
Is it possible to retrieve the date/time of a request in ASP.NET (preferably VB.NET)?
I have tried HttpContext.Current.Request.Headers.Get("date"), but it returns nothing (null).
View 3 Replies
Jun 3, 2012
I'm writing a program in VB.NET, and I'm having trouble with my httpwebrequest code. I've used live HTTP headers for firefox to get the correct post data, but for some reason it won't login.The thing is, I've used identical code for another similar site (changing just the post data) and it works just fine.
Imports System.Windows.Forms
Imports System.Net
Imports System.IO
Imports System.Text
[Code]...
View 1 Replies
Jul 27, 2011
I need to know how to create an HTTP request in vb.net with these properties? No idea which parts I send in as text, and what might be built in properties.[code]...
View 6 Replies
Feb 15, 2012
is have a bot at the moment which basicly uses the browser to get around things and its really slow as the process which i need doing is repetitive. i need a really quick method. Can any1 post a sample script where it
Downloads HTTP source to text file or temp text box edits source strings as needed post to server (submit)
View 19 Replies
Sep 15, 2009
i found this code
Code:
Private Sub btnDownload_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDownload.Click
[code].....
View 1 Replies
Mar 19, 2010
I'm creating an app that edit a post in a ipforum with httpwebrequest and httpwebresponse in vb.net.I use fiddler2 to get the post forms.I successfully create the code to connect to the site the authentication works well and i don't found problems. But to edit a post i don't find how to do it this is the request of the site taken from fiddler:
[Code]...
View 1 Replies
Jan 12, 2012
I'm trying to send a HTTP request to a servers interface.But I'm really confused about how to specify the parameters I want to send to the servers interface method. What I've done so far.My server interface only accepts POST requests, that's why I'm using POST and asked if something is wrong with the way I use the parameters.
Dim parameters As String = "?text=test&type=person"
Dim buffer As Byte() = Encoding.UTF8.GetBytes(parameters)
Dim WebReq As HttpWebRequest = CType(WebRequest.Create(NameRecPage), HttpWebRequest)
'NameRecPage is the url
[code]....
Are these spellings correct in my content? What is content type about? What does it say and how do I determine which value to put in there?I don't know if thats the correct value for ContentType, actually I just want to receive some JSON fromatted data returned as string.
View 2 Replies
Oct 12, 2010
How can I send a POST HTTP request to a server (in Visual Basic 2010) and then receive the reply into a string.
View 1 Replies
May 3, 2010
I have used the WinHttp.WinHttpRequest object in VB6 to make HTTP POST requests many times. It works great: .Open the URL, then .SetRequestHeader (however many are needed) and then .Send the body. The .Send method makes the actual connection and sends everything to the server at once.How to I emulate this behavior in .NET? The examples I've tried with System.Net.HttpWebRequest open a stream with .GetRequestStream() and then write the body to the stream. Unfortunately, the server is responding immediately to the .GetRequestStream method and therefore never sees the POST body.I am obviously trying to connect up some legacy stuff here, but am having a hard time Googling the problem or finding another approach in .NET.
View 2 Replies
Apr 25, 2012
I have coded very simple asp pages to return an image when requested. But I need to do this from a vb.net application. So I assume I need to create a mini http web server. I have code for some that does not support asp or anything like that. Is there another method to return an image? Anyone have an example of this? Or again, do I need to find a web server control or app to use?
View 3 Replies
Sep 15, 2011
I have just made a program were i enter a proxy list then my software views a url over and over using the proxys . I was using a web browser in side the program but worked out slow.So i now have changed the code to htpp request. But now when i run the program it goes up by 2 the views then frezzes .Here is my code
rivate Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If ListBox1.Items.Count = 1 Then
[code].....
View 1 Replies
Mar 1, 2012
i am trying to build, or better edit, my own HTTP Post Request Source Code. The main purpose if it is working, and i receive the data successfully but when i try to put a progressbar with it, it starts getting sticky, because the ContentLength will always stay -1. [Code]
View 4 Replies
Oct 13, 2009
I'm looking for some advice on how to optimise the following process:App reads csv file.For each line in the file an XML message is created Each XML message is posted to a URL via a HTTPWebRequest This process was designed to handle low volumes of messages (up to about 200 at a time), un suprisingly thinks have changed and it is now expected to handle up to about 3000 at a time.
The code used to post the message is here: Public Function PostXml(ByVal XML As String) As HttpStatusCode
[Code]...
I am currently restricted to sending multiple messages due to restrictions elsewhere in the system. There is a noticable delay in responding to the request at the other end (the receiver) but this is outside my control. I am trying to ensure that the process of sending is as efficient as possible (external factors notwithstanding).
View 4 Replies
Jul 30, 2011
How can one pass http get or post methods to a windows application? I require a webserver to send a get method to my windows form application that will querry a database then reply back to a webserverI'm developing a windows based search engine that searches a MySQL database. It receives a keyword from an SMS gateway software as a HTTP get request and should reply to the gateway software using the same HTTP request.This is my code. It is correctly searching the database but I don't know how to receive the get methods on the application however it's sending the messages to SMS gateway.
Private Sub bSend_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bSend.Click
Dim request As HttpWebRequest
[code].....
View 1 Replies