VS 2008 - HTTPrequest Error: Cookie Functions Seem To Be Disabled
Sep 28, 2009
I use visual basic .net express edition 2008. I figured out how to do httprequests and how to login using them. [Code] But I get this error on the site: "Cookie functions seem to be disabled. Please change your browser settings!" How can I set a cookie container so I can login onto the site? I tried a lot of things, such as cookiecontainer.
I've got a vb (desktop) app (not a web app) that needs to connect to my website, I've been told that embedding my MySQL database credentials is a big mistake for several reasons.So, I've built a web script in PHP that runs on my server called web-service.php, it's located at www.example.com/web-service.php.Now, I'm trying to connect with this code:
Code: Dim hwrRequest As HttpWebRequest = HttpWebRequest.Create("http://www.example.com/web-service.php") hwrRequest.Method = "POST" Using swWriter As New StreamWriter(hwrRequest.GetRequestStream) 'POST the info
[code]....
And when I do, I get the error "The remote server returned an error: {401} Unauthorised.", but I shouldn't need any credentials to access this. I'm just trying to POST a username and password to that page and have it query the database and then get the returned content, I'd prefer to use POST than GET so you can't see the user/pass in the URL (if possible).
EDIT: I used CPanel to password protect my website so it can't be accessed, after supplying my user & pass to access it, everything works.
Can I get info from stored cookie on the local machine. I have a Webbrowser control in a winform, and I would like to output data from a cookie to a label or so.
have looped through the cookies in the cookiejar and they appear to hold the correect values i need, the thing is i need to be able to use the cookie value outside the for each i did:
Dim cookie1 As String Dim cookie2 As String For Each tempCookie As Cookie In GETResponse.Cookies
Well for who is willing to give this ago, all you need is 1 webbrowser and 1 button. Set the webbrowser to navigate to [URL] and the button goes the code to expire the cookie JSESSIONID which is generated by the website.
Ok the problem is that i can not delete the cookie before it expires so the only way is to set the cookie to expire e.g. webbrowser1.document.cookie.expire -1d Expires can only be used if you dim something as cookie i think.
Things i tried:
Dim cookie = WebBrowser1.Document.Cookie If Not cookie = "" Then cookie.Split(";")
[Code]....
This script is the only thing that works but i know nothing about this language but it does work it expires the cookie and the page lets me get another email address BUT it takes many many tries, restarting the debugging ect... because the cookie JSESSIONID is somehow not always in the same possition so when it is not first on the list i think it doesnt work (if you are going to test this you need to wait 2 secs untill the browser realises the cookie expired if more than that then u know u need to re start debugging and try again)
This should be easy but i have no idea where to start:
Do a lop through all cookies in webbrowser.document.cookie and find "JSESSIONID" cookie, expire it by -1d and then add it back to the browser.
or do a lop where the cookie is in the computer, open expire it and reupload.
I have a app with two functions. The first function use http post to log into a website. The site gives a cookie once I login, and the function have CookieContainer() to catch the cookie and then it proceeds to update my profile. I then use a second function to visit a different specific page on the website so I can grab/scrap the specific page's source code, but it appears that the script is no longer logged into the site. I see source code for a login form instead of the target page's source code. So the cookie must not being kept for the second function to be able to grab the target page source.
its possible to set the webbrowser cookies as same than httprequest cookies.
Private Sub lol() Dim request As HttpWebRequest = DirectCast(WebRequest.Create("http://login.ijji.com/postLogin.nhn"), HttpWebRequest) request.CookieContainer = cokie
I'm trying to disabled the textbox when the player does not want to play again i'm a total beginner and yes struggling over something silly. ive done this but does not work, ive tried so many different ways
I've been working on learning VB.Net from VB6 and for some reason when I use On Error Goto handlers, or On Error Resume Next the program still procs an exception and ask to continue or close.I don't really understand what I am missing, everything I've read said it's the same as VB6 with a few extra options.
I am making a configuration screen so that an administrator can easily determine what controls on a form are enabled according to a combo selection.
I have created a table (SQL2008 DB) to store the settings and need ideas how I can best implement.
The session form will start up normal with only a few controls enabled to start, but then when the user selects a "session type" from a drop down combo then the form will be configured for that type. Because there may be several different combinations, and I do want to offer the user the ability to add and configure more types as needed I feel like this may be the best method instead of hard coding.
Table Structure
SessionType varchar(25) not null PK ControlSwitch varchar(50) Not Null
(Edit: I may add an additional DB field so that I can specify the default value of a control also)
Now what I thought I would do on the config form is have a series of combo boxes and the label represent each control with a value of True or False, then when saved it builds a string like example 1,1,0,1,0,1,1,1 or True, True, False etc.
The string would represent ctrl1=on, ctrl2=on,ctrl3=off,ctrl4=on,ctrl5=off,ctrl6=on,ctrl7=on,ctrl8=on and so on.
Is it possible to make a multi-line text box still scrollable while it's disabled? The closest I can achieve this is to set the text box's ReadOnly property to false, which will gray out the text box, and still scrollable, but the text in the box remains black instead of being gray. Changing the forecolor of the text box does not have any effect. The color of the text changes back to black when I set ReadOnly to true. I want to be able to mimic the disabled text box visually.
(VB.NET 2008 )How can I make taskbar's group menu item to be disabled?For some reson ,I have to make taskbar's group menu item to be disabled.(ex. close group item)
I know that this was an advanced compiler option in previous versions of Visual Studio, is there a way to disable array bounds checking in Visual Studio 2008? There's no option for it that I can see.
Just wondering how i can enable visual styles with the application framework option disabled - it would be nice to have the ability to use the xp+ theming while having a bit more flexibility
I am trying to make a calculator program. I would like the display(text box) to have a white background, with black font. So I set the "enabled" property of the textbox to "false"(because I want it to display, not receive input) and then choose the background colour to be white. In the form designer, the text colour is black, which is what I want.But when I start debugging, the text becomes the colour of the form. How can I make the font black?
can i use an inverse notation in the databindings to enabled or disabled one checkbox?I have a form that has several controls binded, and if i have true in one field in the database i need to check checkbox and disabled it.Something like:
I am working on httprequest that I can extact some information to input them in the listview and I have got the listview that I have got two columns, the one that it goes for the images and the other one goes for the text data. I can extact the text data, but not for the images.
Do you know how I can extact the images from php to input them in the first column and extact the text data to input them in the second column?[code]..
To convert a url with tiny url you would send [code]But how did this person find url... as the correct http? i want to learn how to send a request to url...so it would automatically use the request to "get tempory email" then message me back the temp email.
friends i am able to get xml file by sing bytes, perhaps which is getting some problem, alternate method to do the same thing to save xml file.
Try Dim strUrl As String = "http://xyz.com" Dim wr As HttpWebRequest = CType(WebRequest.Create(strUrl), HttpWebRequest) Dim ws As HttpWebResponse = CType(wr.GetResponse(), HttpWebResponse)
Background information: I am simply using Fiddler2 to monitor my HTTP connections.
When I am posting data, there is no actual post data. The data I enter into the web page is only in the hex view or the raw data. How can I send a request using raw data or whatever method with a webrequest?
I am working on the httprequest after I have extracted the field id from the webpage. Now I would like to visit the site by using with same httprequest via the address1 strings, but I have no idea how to do that. I have created the second httprequest method but it doesn't work.
Here's the Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Try 'Address of URL Dim URL As String = "[URL]" Dim Address As String = "myscript.php?user=" & TextBox1.Text & "&pass=" & TextBox2.Text Dim request As HttpWebRequest = CType(WebRequest.Create(URL & Address), HttpWebRequest) [Code] .....
I figured out my more recent issue, which took me 2 days all because my string functions are giving errors in VBScript using MSScriptControl, but any function that returns another datatype value is returning correctly.
I want to have my own web browser. instructions and code for this project. i try to make but there's some error in my project. codes and other functions?
I have a dgv with a column type = DataGridViewAutoFilterCheckBoxColumn. I want to know if there's a way to I can get that entire column to become disabled (or Enabled = False) so it won't let the user click on the checkboxes. I tried looking in the "Bound Column Properties" but there isn't an option to disable the entire column.
I have tryied a lot of methods and it seems doesn't work,i don't konw how to handle this,this is my code here,any http protocol is all right,but not https.
Dim URL As String = "https://mail.qq.com/cgi-bin/loginpage" Dim Request As HttpWebRequest = HttpWebRequest.Create(URL) Request.UserAgent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14)