VS 2010 UPNP Port Forwarding (Error Appeared Out Of Nowhere)?
Nov 4, 2011
I'm working on a type of p2p program, and I found the need to forward ports. That can get complicated for the average user, so I'm including the option to use UPNP to forward the ports for them. I'm using code I found HERE, and it worked too! then randomly it stopped working. I don't remember changing anything in the codeThis is the entire code. I have the Exception Highlighted in Red. The project includes a Listview (6 columns), three buttons (4, 5, 6), a progress bar, and a background worker.
Imports System.Net.Sockets
Public Class Form1
Dim upnpnat As New NATUPNPLib.UPnPNATClass()
I am testing out packet sending with some friends and I've made a chat program which seems good and all...(not really, its really bad actually), But anyway... The users cant receive incoming messages unless they portforward port 1337 to their computer... How can I get users to receive messages without portforwarding?
I am looking to write a VB.NET windows app or service to do simple HTTP port forwarding. This is normally done within my router, but I have more forwards to do than the router can support (10) so I would like to do it programatically.
Quite simply, an HTTP request would come in on a port where the application/service is running, and it would automatically forward the conversation to another IP address and port. That way, my router could forward a range of ports to one machine (where the application/service would be running) and the application/service would dole the requests out to the various IP/Port combinations it was listening for.
I am trying to write a program that launches a game server, the only problem is that I do not know how to port forward with vb.net or if it is even possible? It is for a game
I have setup a MS SQL server in my computer and enable the sql server to listen to the TCP/IP port 1500. I can use my vb.net program to access to the sql server from another pc within the same LAN by using the following connection string "Data Source=192.168.1.101,1500;Database=ABC;UID=SA;PWD=123;
But if I changed the "192.168.1.101" in the connection string to the IP address that provided by the ISP (i.e.: "Data Source=<IP from ISP>,1500;Database=ABC;UID=SA;PWD=123 the connection string do not work. I have set the port forwarding function in the router as forward all TCP from 1500 port to IP 192.168.1.101. But it don't work neither......
Then I checked the port 1500 with the webpage below: [URL] It show that the port 1500 is closed! But if I use DMZ function on the router to explose my computer the internet.... the above webpage can checked the port 1500 is opened! And I can successfully connect the sql server with this connection string "Data Source=<IP from ISP>,1500;Database=ABC;UID=SA;PWD=123;" Is that the mssql cannot pass the port forwarding function on the router? I have set the port 8080, 21 forward to another IP on the router and it work fine......
I am trying to consume the webservice from the .Net environment which was build in Java environment. Currently am trying to forward the ArrayList of type object array as parameter to the WSDL file.Am experiencing the following error message : "There was an error generating the XML document"let me know the whether I need to manually convert the ArrayList to XML . May I know the best procedure to forward the ArrayList to webservice in Java ?
I'm trying to make a rs232 serial data logging program, that accepts a 12 bit hex RFID tagID from an RFID module. My end objective is to save this RFID tagID into a database and assigned to a person for a personnel management system.I had to use button3 to add the value of the variable 'msg' into textbox1 because I was getting the following error "Cross-thread operation not valid: Control 'TextBox1' accessed from a thread other than the thread it was created on". It is a temporary workaround.When I do press button3, I get the incomplete hex number, instead of "4C00A2C82A0C", I get "A2C82A0C", and sometimes I get random digits like 1,A,C etc etc.
Public Sub OpenPort() Try If SerialPort1.IsOpen Then SerialPort1.Close()
I'm try to use NATUPNPLib to use UPnP to do and automatic port forward in my router but I keep getting and error that I'm not sure how to handle.Here's the part of the code with the error.
Imports NATUPNPLib Imports UPNPLib Public Class Form1
[code].....
I've tried making sure Windows 7 has Network Discovery on and that UPnP in enabled in my router, could it just be my router and how it handles UPnP?
I was unable to register the related upnp.dll provided by the intel open source upnp tools package (as provided here:[URL] from the VB6 references dialog, it said something to the effect of "can't register .dll", but since it is written in (i think) C or C++ I figured there would be a way to make it useable somehow.I am mainly thinking of moving to intel's upnp because microsofts upnp.dll is not letting me progress further due to the following issue (works in .NET but not in VB6):[URL]how I would go about getting intel's upnp.dll (registers correctly in C# and VB.NET) to work in VB6?
In the past I have written applications that communicate over the network. These have always made use of the System.Net and System.Net.Sockets classes and communicated over TCP connections. The connections have always required an IP address and a port. As these applications have been used by myself and colleages, setting up port forwarding and various other network settings has never been a problem. However, when developing an application for use by the general public, it obviously not a good idea to assume the user is capable of managing these settings.
How would I find all instances of a letter if it appeared multiple times in a word? For example if I had the word 'mississippi', how would I find every 's' or every 'i' or every 'p'?
I know how to use the string.IndexOfMethod() so I was thinking I could find the first letter, mark that position, and search again from there. Then I would keep looping until the end of the letter. But I'm not sure how to signal the end of the loop.
i use ar-SA culture in my app and the date appeared correctly then i save this date to db and i look at the db i found it in English format how to save in the format like it was appeared in my form ?
I have developed a program in exe format & sell it on WWW.?Is there a way to ensure that the buyer does not e-mail the exe file to a third person?In other words, Is there a way to prevent the recipient of your exe file from forwarding it to a third person?EXE file is installer of VB2008-created exe & other compiled files.
I have this problem says that "the portName cannot be set while the port is open". When this errors occurred, my application on sending sms could not work. Before I edit the application can work but after making some changes and ask help in this forum, the application does not work and gives errors and it says "the portName cannot be set while the port is open".
I am currently working on a program that gets data from an external device (microcontroller) and saves the data into a database. I got everything to work except for one simple part. Everytime I disconnect from the serial port, the program stops working and highlights this part of my program:
x = SerialPort.ReadTo("a")
This part just gets the data from the serial port and saves it to variable [COLOR="rgb(72, 209, 204)"]x[/color]This is the complete subclass of my program:
[code]...
It is supposed to read data from the serial port and execute a command that tells VB store the data collected. Whenever I use the function
[COLOR="rgb(72, 209, 204)"]SerialPort.Close()[/color] , the program stops working. What could I be doing wrong? Could the program be stuck in the serialPort.ReadTo() function? Although it does execute the lines in the subclass.
I did a search for "How do I implement Serial COM Port communications? and found a response by Xiaoyun Li which was last posted on April 10, 2009. Xiaoyun's response included sample code. My intent has been to get a clean compile on the sample code, then test it, then expand the code into a real application. I am down to a single error message, which I can't figure out how to resolve: "Method 'Public Sub DoUpdate()' does not have a signature compatible with delegate 'Delegate Sub EventHandler(sender As Object, e As System.EventArgs)'." [code]I marked where the error occurs in the code with *** to the right of the error line.The code is attached to a simple form, Form1 which contains a single text box, TextBox1.It appears to me that the code needs a Delegate statement, but I can't figure out how to code it or where to put it.d.
trying to get my hands wet on vs 2010 and i downloaded samples from ms site but when i tried to run some of the DB samples i received this sql error: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) any ideas how to get around on this?
I am trying to buld a DLL in VB.NET 2010 that will be use to control a vending machine.Whin a call into the DLL to a function to open and setup the comport the first time its opens it just fine, but if a call into the DLL again it does not know that the port is open even if it is still open. I can check with another program and is shows the port is open and if I try to call into the DLL again to open the port I get an error that the port is already open. Any idea how to set this up so it will work.
I need to open and config the com port in one call that leaves it open and then in other call use the com port to talk the equipment in the machine without closing the com port untill it is required to close it.
I am doing a little project before I get onto some more complicated stuff and I am trying to become more fimilar with ports. Basically the issue at hand is that I am not too sure how to listen for on a certian UDP port.
I'm using VB.Net in VS2010, I'm attempting to self-host a WCF service. (It's actually in a windows service, but I'm trying to do this via a simple console app. Below is the code in question, the TCP/IP addresses are injected directly here. The WCF service itself is simply a renamed DEFAULT new WCF service project.
Dim host As New ServiceHost(GetType(TestService)) Dim tcpb As New NetTcpBinding() tcpb.PortSharingEnabled = True host.AddServiceEndpoint( _ GetType(ITestService), _ tcpb, _ "net.tcp://localhost:62020/TestWcfService/" _ ) host.Open() Console.ReadKey(True) host.Close()
Is there something special I need to do to get the port to actually bind? when I run netstat -a it doesn't show a listening port on 62020 I am really at my whits end on this. I have another WCF service I'm trying to migrate out of IIS, and into a separate server running in a Windows Service. The WCF service will only be accessed internally. I've been having numerous issues in getting that migrated, so trying to get a simple service to bind, and have a client (website) access it. The other WCF is binding (different port) fine, but having communications errors.
Lets assume that I have a game server in my computer.
I download a compiled game, server/client side.
The player starts the game and it keep sending and receiving data from the server. Lets assume now, that I think that the player is using some bug and winning all the rounds. How can i disconnect his IP from the server port? I have seen some people using some kind of DLL to do the job. Its something like iphlpapi.dll ... i dont remember well.
Apologies for the long post, but I would be very greatful for any advice given. I have developed a visual basic application to communicate with a device through a COM port. This application works fine. The device connected to the COM port sends information relating to the status of the device, this information is read in using VB and inturn written to an SQL database. Using the visual basic application the user can also send commands through the COM port to the device. The application scans the users computer and detects all available COM prots, these are presented to the user and they can select which one to connect to. The COM port is held open for the entire period that the program is in use (this is to allow for the incomming information to be read)
I was wondering if its possible for VB to display all available COM ports that are open. he reason that I ask this is because this program will be run on various computers where the COM port will not always be the same. I have a text box now that the user can choose which com number he/she wants but if the wrong one is entered, the program crashes rather than displaying an error message. It would also be nice for the system to show which available com numbers there are
I've been trying to this application in Visual Studio 2010 to only write to the parallel port, so supposedly it would be a very easy task, and by all the tutorials in the internet i've seen before it really is! Although it throws me always the same error which is too generic and don't give enough information for me to solve it. I'm doing this using the "Inpout32.dll" library to make the communication between VB.NET and the port..
looking for a way to detect all available AT Command ports on connected USB Mobile Modems.
I've tried messing with WMI a bit, but was only able to detect the HSBC ports, not the AT Command Ports which is nessassary to issue AT commands to the modems.