Blocking An Ip From Connecting To Computer?

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


ADVERTISEMENT

Connecting To SQL Server On Another Computer?

Jun 5, 2011

I always get error to connect my project in vb.net to sql server on remote computer?

View 7 Replies

Connecting To Remote Computer And UnauthorizedAccessException

Oct 21, 2011

I am making a client/server project where the server can send a String variable to client but for now i'm starting with a simpler code. I was able to code a bit but now i'm having a problem with this UnauthorizedAccessException. It seems that I am not authenticated but i was able to put the admin username and its password. This is my problem.. Here's my code...

[Code]...

View 7 Replies

Installing Application On Another Computer / Not Connecting To SQL Database?

Apr 22, 2012

When I try to install the application from the files it produces when I follow the prompts from Build - > Publish (Visual Studio 2010) onto another computer, and then run the application on the other computer, it wont connect to the SQL database on the original computer. I've been receiving a timeout error or one which says it can't find the server.I have no idea where to start looking to fix this, both computers are running XP and 4.0 .NET Framework. The computers are linked on the same network.I think my connection string is the culprit, but I don't know how it should be set up to run on multiple computers. Here's my connection string:[code]The connection string works on the application I've installed on the original computer, but not the second computer I've tried installing the application on.My second thought was that it could be the server which is wrong, I've just used the name of my computer for that, is this correct? I thought it may be because all the computers are connected on the network.

View 3 Replies

Tools For LAN Connecting To Access Database To The Other Computer?

Sep 3, 2011

Can you give me some tools for LAN. I have a Program and im using SQL database and i wll access to other Computer. Im Using Visual Basic 2010.

View 16 Replies

RFCOMM Protocol - Connecting Bluetooth Headset To Computer

Jul 6, 2009

How I can connect my bluetooth headset to my computer(programmatically of course) and read/send audio and button data? I heard that it's something to do with the RFCOMM protocol but it might have been that it's not the RFCOMM protocol.

View 7 Replies

Asp.net - Connecting To Remote Computer Using WinNT:// Provider And Directory Services Ignores Username/password

Jun 10, 2010

Here is the final code that worked for me. This uses WNetAddConnection2 to establish a connection first, before using DirectoryEntry.

Imports System.Runtime.InteropServices
Imports System.Net
Imports System.DirectoryServices
Imports System.IO

[Code]...

So I moved the code to an ASP.Net web app, which is impersonating a service account through the Impersonate section of web.config. The account I am impersonating does not have admin rights on any of the workstations so I put in a username/password into the constructor for the computer entry like so:

Dim deComputer As New DirectoryEntry("WinNT://" + Computername + ",computer", username, password).The username is that of a domain account which has local admin rights on every workstation. If I look at the Username property of the resulting deComputer object I can see that the username matches what I entered.Also if I enter in an invalid password it throws an error, so it is authenticating in some fashion.

However if I now try and add or remove a user from a remote workstation I get a general access denied error. If I add the service account that ASP.Net is using as a local admin on that workstation it will add and remove no problem.So next I tried using the LogonAPI (advapi32.dll ->LogonUser call) to login as the user account that is a local admin on all workstations, impersonated the resulting WindowsIdentitiy and tried running just the original deComputer instantiation. When I do this every property, excepty Path, returns an OLE exception..

View 1 Replies

Using WMI "Connecting To A 3rd Computer-Delegation" To Access A Target Server WMI Cimv2 Namespace In Trusted Domain?

Apr 2, 2009

Attempting to pull WMI Win32 properties information from a server in a trusted domain using the delegate string listed at bottom and receive the error listed below. The account has fullpermisions on the target server's root and subs WMI namespace and wbemtest connects fine. And all servers are in 2003 Native AD forests and trusted for delgation?

Error:
Scriptname.vbs(20, 1) (null): A security package specific error occurred.
Connection Moniker:
Set objWMIService = GetObject("winmgmts:" _

[code]....

View 1 Replies

Blocking A Website Through I.E?

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

Blocking In A Service?

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

C# - Blocking A Thread In .Net?

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

Blocking Web Sites In Browser?

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

Blocking Websites With Browser

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

IDE :: Make Firewall Blocking?

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

Non-blocking Task.wait In .NET 4?

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

.net - Synchronous Wait Without Blocking The UI-Thread

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

ActiveX Blocking Functions Freezing The UI

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

Avoid Assembly.LoadFrom Blocking?

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

Blocking A Thread To Wait For Callback

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

Blocking List Of Process With Timer?

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

C# - IO Operation Is Blocking UI And Background Thread

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

Programmatically Webpage Blocking / Filtering

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

Room Availability Calendar Blocking

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

VS 2008 Blocking Internet Connection By IP

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

VS 2008 Firewall Blocking Emails

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

VS 2010 - Windows Key Blocking At Runtime

Jan 16, 2011

I am trying to create an application that can block Windows keys at runtime in VB .net. Basically, if 'Disable Left Win Key' check box is checked, then the application will disable the left windows key and the same for the right one. I also want to be able to show a message box depending on whether 'Show Message Box' is checked when either win key is blocked.

View 2 Replies

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

COM Control Call From .Net Frequently Blocking For 15ms?

Nov 19, 2009

I have an ActiveX/COM control written in C++/MFC which processes video (ie. 30 frames per second => about 33ms per frame processing budget) Various rendering aspects of the control can be modified using Set calls on the control, which clients can issue at any time.It turns out that someone (Windows scheduler, .Net interop wrappers, MFC call dispatcher, memory allocator, garbage disposal ?) is quite frequently eating an incredibly long 15.625ms to make or return from the call into the control. Thats half my per-frame budget eaten by some gremlins in the runtime !

The control itself is - for historical reasons - written in C++/MFC. The problem happens when the control is called from C# as well as VB.Net. It happens on very different hardware (an HP Pavilion 2.8Ghz Pentium D, a Macbook Pro with 2.5 Ghz Intel Core 2 Duo running Parallels VM). Just how often this mystery hiccup of 15.625ms occurs differs between machines, but when it does, it is always 15.625ms exactly. Strange.

I have made a rather minimal test case that strips out all the video processing etc.First, I created an MFC/COM Control project in the Project Wizard of Visual Studio 2003 and left things at their default settings (Apartment threading etc.). Then I added a single user defined call TestCall() to the control which does nothing (manually since there is no more classwizard)

Then I created a VB Client program which instantiates the control. It endlessly calls the TestTiming() sub which times how long a single call into the control takes and prints out that time.The TestTiming call basically just does this:

Code: startTime = DateTime.Now Dim h = AxTestControl1.TestCall() endTime = DateTime.Now Dim ms As integer = endTime.Subtract(startTime).TotalMilliseconds

I print out calls that take 0 ms (well something less than 1ms anyway) as "." and for calls > 0ms I print out the actual ms. The output looks something like this:.15.625 ms.........15.625 ms.........15.625 ms.........15.625 ms..........15.625 ms..........15.625 ms...........15.625 ms..........15.625 ms..........15.625 ms

So some variable nr of calls that execute quickly, as desired, and then a "hiccup" call that always takes the exact same amount of time (15.625ms), then some more quick calls.If instead of the user defined control function .TestCall() inside the timing I use a standard control property, like

Code:Dim h = AxTestControl1.Heightor a built in control method like
Code:Dim h = AxTestControl1.ToString()Then I never, ever get a hiccup call.

On different machines you will get a different average number of "." before a hiccup but even then the hiccup is 15.625ms I should mention that the sample code spins off a background thread and calls the TimingTest from its ThreadTask(). This is the way the bug was originally reported to me. However, I can put the

Code:Do TimingTest()Loop

right in the main UI thread - as the first thing in Form1_Load() for example. And it will exhibit the same behaviour, except there will be substantially more good=0ms="." calls on average between the inevitable hiccups.

[code]....

View 1 Replies

Create Non-blocking Custom Events In Class?

Jan 11, 2012

Declare Custom Events To Avoid Blocking, with more than one custom event. If I duplicate the Public Custom Event section and just change the event's name, then both events are called even if my code only calls one of them.

Public Class TestClass
Private EventHandlerList As New ArrayList
Private EventHandlerIndex As New ArrayList

[code]....

View 5 Replies

Find The Thread Witch Is Blocking The Execution?

Nov 18, 2011

I'm in the Progress of changing a big Application from Singlethread logic to Multithread logic. I'm currently move Dataloading Logic into a sperate thread, and work with callbacks after they are finished. I have Synclocks in place in order to ensure threadsafty. But sonetimes the Synclocks wait even if there is no other thread with the same synclock active. Is there any way to find out what witch thread they are waiting for, and why? BTW, I have FW45 installed, may that be the reason, since it'S a inplace upgrade for FW40?

View 19 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved