Click here to Skip to main content
15,896,269 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Database permissions Pin
leckey17-Jul-07 11:20
leckey17-Jul-07 11:20 
GeneralRe: Database permissions Pin
Cory Kimble18-Jul-07 3:13
Cory Kimble18-Jul-07 3:13 
GeneralRe: Database permissions Pin
Dave Kreskowiak18-Jul-07 11:42
mveDave Kreskowiak18-Jul-07 11:42 
QuestionByRef in class property setters Pin
Ahmad Zaidi17-Jul-07 9:16
Ahmad Zaidi17-Jul-07 9:16 
AnswerRe: ByRef in class property setters Pin
Dave Kreskowiak17-Jul-07 10:15
mveDave Kreskowiak17-Jul-07 10:15 
AnswerRe: ByRef in class property setters Pin
Guffa17-Jul-07 11:45
Guffa17-Jul-07 11:45 
AnswerRe: ByRef in class property setters Pin
Ahmad Zaidi17-Jul-07 22:26
Ahmad Zaidi17-Jul-07 22:26 
QuestionWindows service using webclient and Javascript Pin
Manuel F. Hernandez17-Jul-07 9:10
Manuel F. Hernandez17-Jul-07 9:10 
I want to write a windows service application that reads a web page. That web page requires that the client can process javascript.

Has anyone successfully implemented Javascript with System.Net.WebClient?
I tried the code from the article "A simple .NET based WebClient with JavaScript support" but that code crashes with an inner JScriptException. Its acknowledged by the author and it looks like the trail ends there.

According to microsoft the Microsoft.JScript.Vsa.VsaEngine used in that project is deprecated.

What is the current working solution for processing webpages in code?

This is what my code looks like. The web page at the URL I am calling uses javascript to set a cookie in order to prove that Javascript is running. It doesn't look like this code can do it. I can set cookies in advance but I can't seem to duplicate the javascipt setting a cookie. Help!


Dim webClient As Net.WebClient = New System.Net.WebClient
webClient.Credentials = System.Net.CredentialCache.DefaultCredentials
webClient.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)")
webClient.Headers.Add(Net.HttpRequestHeader.Cookie, "aCookie:aCokievalue")
Try
Dim data As Stream = webClient.OpenRead(sURL)
Dim reader As New StreamReader(data)
Dim s As String = reader.ReadToEnd()
'response = webClient.DownloadData(sURL)
'Return Encoding.ASCII.GetString(response)
Return s
Catch ex As Exception
Return ""
End Try
QuestionHelp with populating data sets Pin
iain659417-Jul-07 6:22
iain659417-Jul-07 6:22 
AnswerRe: Help with populating data sets Pin
originSH17-Jul-07 6:26
originSH17-Jul-07 6:26 
QuestionRe: Help with populating data sets Pin
iain659417-Jul-07 23:11
iain659417-Jul-07 23:11 
AnswerRe: Help with populating data sets Pin
Dave Kreskowiak18-Jul-07 2:08
mveDave Kreskowiak18-Jul-07 2:08 
QuestionRemoving the Service icon from Control Panel Pin
Aisha Ikram17-Jul-07 6:22
Aisha Ikram17-Jul-07 6:22 
AnswerRe: Removing the Service icon from Control Panel Pin
Dave Kreskowiak17-Jul-07 6:32
mveDave Kreskowiak17-Jul-07 6:32 
QuestionCoordinate System Pin
Reza1217-Jul-07 5:44
Reza1217-Jul-07 5:44 
AnswerRe: Coordinate System Pin
originSH17-Jul-07 5:51
originSH17-Jul-07 5:51 
AnswerRe: Coordinate System Pin
Dave Kreskowiak17-Jul-07 6:10
mveDave Kreskowiak17-Jul-07 6:10 
GeneralRe: Coordinate System Pin
Reza1218-Jul-07 8:20
Reza1218-Jul-07 8:20 
GeneralRe: Coordinate System Pin
Dave Kreskowiak18-Jul-07 11:37
mveDave Kreskowiak18-Jul-07 11:37 
AnswerTHE RULES Pin
leckey17-Jul-07 11:22
leckey17-Jul-07 11:22 
AnswerRe: Coordinate System Pin
Paul Conrad17-Jul-07 13:06
professionalPaul Conrad17-Jul-07 13:06 
Questionparadox files Pin
jds120717-Jul-07 4:33
jds120717-Jul-07 4:33 
AnswerRe: paradox files Pin
_Damian S_17-Jul-07 13:46
professional_Damian S_17-Jul-07 13:46 
GeneralRe: paradox files Pin
jds120718-Jul-07 3:26
jds120718-Jul-07 3:26 
GeneralRe: paradox files Pin
_Damian S_18-Jul-07 14:16
professional_Damian S_18-Jul-07 14:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.