Blocking Websites And Add The Text To HOST File
Sep 23, 2011
I want to make a program where it would read the text from textbox1(Ip Address) and textbox2(website) and add the text to my HOST file. I found this, and modified it a bit. I guess what I'm asking is if this would work, the only reason I'm not debugging it is because I don't wanna f/// up my HOST file.
[Code]...
View 5 Replies
ADVERTISEMENT
Jan 6, 2012
I read some posts in the vb.net forum for how to modify your host file on your computer adding the domain website to block. this worked great. Then i went to a website such as vtunnel.com and was able to view the blocked website through it. So to still block it I need to add [url]... to the host site as well as any others?
View 4 Replies
Sep 9, 2010
I wish to block websites in a browser, where the blocked websites are stored in my.settings.blockedwebs (which is a collections. specialized. stringcollection). I let the user input the blocked website into a textbox in form1, and the add website to the stringcollection button has the following code:[code]
View 15 Replies
Aug 15, 2010
What would be the most quickest way to edit a text file on a remote host?
View 3 Replies
Jul 23, 2009
How can I copy text from web sites... lets say you're looking for a line of text...
You type the text you want in tb...and it searches on the link you provided?
Dim GainText as new system.net.webclient()
Dim TheLink as string = textbox1.text
gaintext.link ' and then show all the txt in richtextbox...or if none found then msgbox
View 3 Replies
Dec 4, 2011
I want to write a list of websites in a Rich Text Box (one website on one line), so that the websites listed to be blocked from the web browser. I tried this code:
Private Sub RichTextBox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RichTextBox1.TextChanged
If WebBrowser1.Url = RichTextBox1.Text Then
Label5.Text = "You don't have permission to access this website."[code].....
View 2 Replies
Oct 12, 2009
I created this program to automatically post reviews I have written to this website. All the code works fine until the last line. It throws this error "Object variable or With block variable not set." I can't figure it out, because it works fine before this point when i call it on other pages.
Dim email, password As String
email = "email"
password = "password"
[Code].....
View 1 Replies
Jun 8, 2011
I am posting this on behalf of a mate so repose from me might be delayed.
question:
Quote:
Never had to really touch a .NET website before and come accross a little problem and sifting through the massives of crap on google is proving tricky.
Got a masterpage file that contains this:
CODE:
View 4 Replies
Nov 6, 2009
I have an application that I've set default language to c#, is it possible to run a .vb class inside of this IIS application?
View 3 Replies
Jan 15, 2012
What I want to do is replace the host file in windows so basically I want to make a button that says change host file so when click I have a host file in resources so when I click the button I want to to overwrite the old one with the new one but the C:/windows/system32/drivers/etc then hosts is there a way I can change it tho my program.
View 4 Replies
Oct 1, 2011
I want to create a program that verify if a file on my host exist.Example: I have a button and if i click on, it verify if exist http://myhost.ro/test/test.txtAnd then if exist, textbox1.text = "The file exist " else textbox1.text ="the file don't exist ".. Can I create this program ?
View 17 Replies
Mar 27, 2012
i am trying to get access to the host file with this
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim path As String = "C:WindowsSystem32driversetchosts"
[Code].....
View 6 Replies
Apr 24, 2011
I am working on an app that searches my network and retrieves ips and host names, but when using this.[code]
View 2 Replies
May 4, 2010
I was wondering if it would be possible to block a website, such as "www.proxy.com"
Through Internet Explorer, not one of my custom ones of my form.
View 8 Replies
May 25, 2012
The subject sucks, but the problem is straightforward. I have an existing WCF service. There are a small series of functions, currently. One or two of the functions will need to be performed with a bit of security, for which I need a username and password. The username and password will be checked on the server side against a webservice running on localhost. One alternative is to not use the localhost webservice for the validation, but then I wouldn't have a question, so ignore that.
The way the webservice will work, I was thinking that I would use an invisible web browser, navigate to the REST-style URL, and wait for the response. It's the bit about waiting for the response that is causing me trouble. Normally, I'd wait for the document comleted event raised by the browser control, but since this is initiated by the call of a WCF service function, that won't really work. The WCF function call can't 'wait' for anything, nor will it receive the event. Once the WCF function reaches the End Function statement, it is over and done with, and returns. The response from the webservice won't have arrived by then, so that won't work. There are two typical solutions to this, one of which is horrible to the point of being unworkable.
1) A busy wait, or spin wait, where the WCF function goes into a tight loop waiting for the browser event to be raised. This is never a good idea, and is particularly terrible in this case, because the WCF service is running on a web server, so the negative impacts of a busy wait are FAR worse than normal.
2) Use something like a Mutex in the WCF function such that the function launches a thread, the thread immediately grabs the Mutex, then begins the navigation. The WCF function waits on the Mutex, which would mean blocking without spinning, and the document completed event pulses the Mutex to release the WCF function so that it can return the proper response. This seems technically improbable, as it stands.
The problem is only a slight variation on a very typical problem, yet it presents some interesting problems. Windows is event driven, but a WCF service function is not. A callback across a WCF (at least across this one), isn't an option, events aren't an option, so it all comes down to the function starting a process, then blocking without spinning, until the process comes up with an answer.
View 11 Replies
Aug 13, 2010
I have a class that has purely static Methods and properties. I am calling an async method on the class "Load" that asks a web service for a chunk of data, which then fires an event that executes the return method, "LoadCompleted". I have no idea how long the call is going to take (the difference between calling the "Load" method, then the "LoadCompleted" getting called).
I would like to block the application from proceeding any further until the callback method has been raised (as the app will try and get stuff from this class, which isn't populated until the "LoadComplete" method sets the data).
View 3 Replies
Sep 20, 2009
I am trying to make an app in VB.NET that pings ip's on a specfic port that are connected to my computer and if it is greater then 500 the person would be blocked from connecting to my computer. How can I do this in VB.NET?
View 1 Replies
Oct 10, 2009
I am creating a security program. One of its features is that it blocks inappropriate web sites. I might need help determining which sites are bad and which ones are good. If I could 'read' every work that is displayed in the browser then I could tell, but that may come later.
So, I'm looking for some kind of hook that will allow me to cancel the site if needed. It should be able to still be hooked in Safe Mode, as well... I'm sure that this is going to be an easy one!
View 7 Replies
Jul 27, 2009
I am unable to get on to internet explorer or IM on my laptop . I am using Windows XP.Each time I log-in it says my firewall is blocking.
View 4 Replies
Apr 30, 2012
I'm trying to wait for a Task result in .NET 4, much like you can by using the await keyword in .NET 4.5. I just can't figure out how to do it though...My code (to prove that I'm atleast trying):
Private Function GetXDocumentFromWebLocationAsync(ByVal request As WebRequest) As XDocument
Dim queryTask As Task(Of WebResponse)
queryTask = task(Of WebResponse).Factory.FromAsync(AddressOf request.BeginGetResponse, AddressOf request.EndGetResponse, Nothing, Nothing)
[code]....
As you would expect, the GetResponse calls are executed on a different thread, but the function has to wait for the result before it can return. Unfortunately this blocks my main thread until the task has completed and I don't have the slightest clue on how to make it wait without blocking. I don't want to use the Async CTP either because that's just running away from the problem.
View 1 Replies
May 24, 2011
Is there a synchronous wait function that won't tie up the UI-thread in .NET WPF? Something like:
Sub OnClick(sender As Object, e As MouseEventArgs) Handles button1.Click
Wait(2000)
'Ui still processes other events here
MessageBox.Show("Is has been 2 seconds since you clicked the button!")
End Sub
View 1 Replies
Aug 27, 2010
Is there a way to include an ActiveX to VB .NET project without adding it to a form?
If I add it to the form and call a function on it that blocks, the UI is unresponsive until the function returns. Even if I am making the call in a different thread.
I was able to compile the code when I did not include it via the form, but got this error once I called a function on it.
Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
How could I make the UI responsive when the ActiveX functions are blocking?
View 7 Replies
Jul 31, 2011
I create a .net dll on the fly with codedom then I load it with Assembly.LoadFrom like this:
Private Sub Test()
Dim ASM As Assembly = Assembly.LoadFrom("test.dll")
'Do some stuff with the loaded assembly...
[code]....
View 1 Replies
Jan 19, 2009
I have been reading the async design patterns on MSDN and the general idea makes sense to me but in practice it is proving to be more difficult. I am working on a project utilizing VMWARE VIX.
HTML Code: [url]. Each function such as connecting to a host server, retrieving properties, etc. can be executed in two different ways.
Connecting to a host using a blocking Wait:
Code:
Dim m_lib As New VixLib
Dim m_hostJob As VixCOM.IJob
[CODE]...
Code:
Dim m_lib As New VixLib
Dim m_hostJob As VixCOM.IJob
dim m_callback as VixCOM.ICallback
[CODE]...
The problem with the VIX SDK is that sometimes the functions never return, hanging the application. dblock.
HTML Code:[URL] came up with a library that specifies a timeout value. When the timeout runs out the method aborts and returns regardless whether it finished or not.
The callback method is an active wait where the code continues to execute. What I want to implement is a blocking wait with a timeout. The ICallback interface has one sub OnVixEvent(IJob,Integer,IVixHandle). This method is fired at least twice, first when some progress is posted and second when it is complete. The first call to this method can be one second after registering the callback or 30 seconds, so I can not rely on this method to block the main thread. how to create some kind of async result class that would block the main thread from executing until either a timer runs out or the OnVixEvent method returns an Operation Complete signal that also implements ICallback.
View 10 Replies
Apr 11, 2012
I am trying to block a list of processes from Txt file/ Listbox System.Diagnostic.Process using Timer. Here's the timer codes
[Code]...
I can block processes from the list using SelectedItem, but it doesn't block all the process in the list.Using while loop causes a deadlock error here. I'm now using aBlock.ReadLine to read from txt file and block the available process. However it is only able to block the first process. Need some guidance to get this code to block all the processes in the list.
View 5 Replies
Jun 29, 2011
I am a novice in Threads, but I want to know how to order thread execution in my scenario, and is the following :
UI Thread : Windows Form Background
Thread : Kind of print daemon
implemented with recursive methods
IO Operation : a StreamWriter that do
the job of File.AppendText()
When I execute my main app.exe, sometimes it launches the Windows Forms and the execution process in the task manager (app.exe), in some opportunities its just launches the execution process in background. How can I determine the behavior of launching UI, I have to establish a priority or somewhat else? Code: I'm using framework 2.0 and any answers could be writted in C# or Vb.Net.
View 1 Replies
May 24, 2009
how to or have a tutorial about programaticly blocking a webpage from webbrowsers? or is this not possible because it would need to be done on a router level?
View 2 Replies
May 26, 2011
I am developing a hotel software product, and one of the features required is to be able to display the room numbers in the hotel, and then the status of them for each day of the month.
I am trying to create something similar to a DataGridView control where at the top the column names are the dates of the month, and to the left is the room numbers as rows. Please see the below screenshot of the function I wish to have. However I do not know what control or function they use to create this grid below (it is from an existing product). I need to not just be able to join multiple cells together when it is the same person in the room for multiple days, but also allow drag and drop ability.
Currently I have a DataGridView control and am able to simulate the below screenshot, however with a datagridview control I am unable to join cells across multiple columns nor allow drag and drop ability between rows.
View 6 Replies
Jun 26, 2009
I have an app that gets all the network computers on a local network. Is there any way to block the connection of a computer by the IP/host name? I want to manage my wireless connection at home so that no one can steal my signal.I would use this app on the computer connected to the wireless router.Anyhow, is this possible? Isn't it? Many online games ban the players by IP, so I thought it could be done.
View 4 Replies
Jun 11, 2010
Me and my friend both wrote an app to send emails, same code. When I run my app, I can let it send an email. When I run my friends app, the firewall blocks the outgoing emails. Is there any way to let the emails send from my friends app, by changing code or so? I don't want to add it to the whitelist of the firewall.
View 5 Replies