How to get my vb.net program to use one network over another - vb.net

vb.net programmer and I am curious to know if there is a method to use so any program i am developing can select a specific network. I am asking this because i recently noticed that while on the wifi, i was still able to access a mapped drive from the lan connection. if there are any resources out there to enlighten me, im all ears because its annoying to constantly switch to my lan connection every time i have to test or deal with a db issue. Additional information: my programs connect to microsoft sql servers on the lan network.

Well I think I found an answer to my question, though it does not have anything to do with vb code. Since I am only dealing with two connections: my departments wifi and may workplace's main network(lan) , I decided to change the metric value of the lan connection to 9999 and left the wifi as automatic. somehow Im able to keep both connections open and my program connects normally to the mssql sever on the lan while im able to use my department's wifi for testing and browsing. interesting stuff there. thanks for the interesting links though.

Related

Teaking FreeRDP for a developper workstation accross seas?

I need to use FreeRDP to connect overseas to a windows desktop located in Canada (I live in Belgium). Now, I also need to connect through an OpenVPN connection first before using RDP.
Issue I'm having is that I have a lag when moving around on the remote desktop. As a developper, it makes it quite frustrating to do my work.
Here's a video link demo'ing this lag:
https://www.youtube.com/watch?v=cpO26YUF2qg
This is the command I use to connect :
xfreerdp /u:username /v:192.168.x.x /bpp:8 -grab-keyboard -wallpaper```
I tried various bpp settings and it doesn't seem to change much.
Is there a way I could tweak the RDP connection even more ? I need this just to code in IDEs, manage databases, etc. I do not need super high-quality graphics or anything (I won't be playing videos from here ;)). I think 256 colors should be fine, but wondering if they are other compression settings I could use?
While I'll have done everything I can with the RDP, my lan admin is also looking into tweaking the VPN connection...
Thanks a million for your time.
Pat
You may try using h264 mode of freerdp (version 2.0 recommended/required). In general, the h264 will use fewer data to transfer the image, but it highly depends on what you are doing, YMMV. It is worth trying, the option is:
/gfx-h264[:[[AVC420|AVC444],mask:<value>]
/gfx-h264:AVC444 works best for me. There are also several additional gfx-* configuration options, you may test with them.

CGIDEV2 & Public Webpage (IBM Iseries / AS400)

Good Afternoon,
Perhaps this is a silly question, but I'm wondering if someone could help to point me in the right direction as I'm not even sure where to start.
I am starting to become adept at using CGIDEV2 tool to create a webpage using RPGLE. Currently all of my applications are internal, if a user wants to access them they need to be on the company network or VPN (outside of office).
How feasible is it to create an application that is public? My biggest fear is opening up our AS400 to potential hacker attacks, viruses, etc by making an application available publicly (no need to be on our network). I also can't even wrap my mind around how that would work while still being able to communicate back to the server from the client.
If anyone has done anything like this and can offer some feedback and perhaps point me to an article, guide, or video it would be much appreciated.
Thanks again

Opening up a Sequence of RDP Connections. For updating multiple Remote Desktop Connections

I Have to update the Servers here at work close to monthly. This includes windows updates and a few other software updates. We have close to 50 or so servers, and I would say 10 are physical and 40 are virtual. I have to open up an RDP connection for each of these servers and update them manually. (At least that is what I have been instructed to do, and haven't heard of a better alternative.) I would give a picture to describe what it looks like that I do when I have to open each of these up. However I need 10 reputation to do so from what its telling me.
So I guess I'll just have to hopefully explain this process clearly without the picture.
So the main issue that I would like to save time on, is I have to manually type out the name of the server, and then the username and password like normal. I would like to create an automated way to do this. I'm willing to have to put in the password each time, but it would save a ton of time not having to manually start another connection each time. Here is the code I've tried to piece together from resources on the internet and on stack overflow to create a batch file that would open all these Remote Desktop Sessions:
cmdkey /generic:"servername" /user:"username" /pass:"password"
start mstsc /v:"servername"
cmdkey /generic:"servername" /user:"username" /pass:"password"
start mstsc /v:"servername"
cmdkey /generic:"servername" /user:"username" /pass:"password"
start mstsc /v:"servername"
.......etc for the other 47 RDP connections
*DISCLAIMER I'm NOT an expert coder. I don't have a lot of expertise with coding, but I do my best to research as much as possible to understand what someone else's code is accomplishing. Obviously if I would have been able to think this through on my own, I wouldn't be posting, but since I'm a bit stuck, I'm interested to see what others can offer to help correct my thinking.
So from what I understand I'm doing here, is that I'm using cmdkey to "store" my username and password for each of these server connections. And with the /generic: classification I believe is where I put the individual different names of each of the servers, so it stores my user name and password based on each server. The "start mstsc /v:"servername" is just simply telling RDP to open up the connection to that server immediately to the prompt where "username and password" are normally required unless you try to add the cmdkey step that I added above.
I have noticed that this has caused a couple "glitches" which are a bit odd. One is that it can't keep open more than 3 or 4 of the connections open, because whenever I go to the next server to login, it "replaces" one of them. This does not happen though if I open each of them up individually(which takes a lot of time to do).
Another issue, is I've gotten this to work on a small scale with only 2 servers as an example. Our domain controller, it accepts the cmdkey line, and puts me right to the desktop of that server, but when it tries to open up the second RDP connection, it comes up with the "Windows Security" window and asks me to "Enter your credentials". which is not a step that I have to do only with that one other server. So if someone could clarify why some servers don't require this step in the RDP connection, and others just go straight to the server and ask for the username and password there, that would be nice to know.
Thanks guys. I hope that this question isn't to "basic" or vague. I am sorry I am a noob, but I'm always excited to learn more about coding and new ways to do things to make life simpler and help others. Let me know if you need any clarification, I'll be glad to offer it.
An extremely helpful and powerful tool that I have found for this problem, is called Remote Desktop Connection Manager 2.7, or RDCMan for short. I've been using this on my Windows 7 64bit desktop, and I've been working with servers ranging from Windows server 2000 to Windows server 2008 and I believe I've read somewhere it also works with Windows server 2012.
It's offered through the microsoft website linked here: (without the quotes) " https://www.microsoft.com/en-us/download/details.aspx?id=44989 ".
To give props for this great tool, here is the About info: Remote Desktop Connection Manager by Julian Burger
RDCMan v2.7 build 1406.0
Microsoft Windows NT 6.1.7601 Service Pack 1
.NET v4.0.30319.34209
mstscax.dll v6.3.9600

Reading from database file over network in visual basic, with no shared drives

The machine I'm trying to access is an industrial PC that serves as the interface for some PLC-automated equipment. The computer creates a data record (an .mdb database) of the various machine settings so that they can be reviewed later if desired. I've created an application in Visual Basic 2010 to display and sort that information once it's been copied from the machine to someone's laptop.
What I'd like to do, though, is allow the user to access the database from their laptop over the network; each PC has a static IP address on the customer's LAN. Currently, we can use Teamviewer to transfer files, but I'd like to include that ability in my data viewing application. Without changing any settings on the industrial PC (i.e. leaving the network file sharing alone, and avoiding installing any sort of SQL server software), how can I access this information? The database files can get pretty large (40+ mb) so I'm trying to avoid any sort of FTP transfer, which would undoubtedly take forever.
The database is already set up on an ODBC connection (which is how the pc stores the PLC information in the database), and I suspect that this may be the key, but between my lack of any thorough understanding regarding networking and the internet's general distrust of ODBC (well earned, from what I've seen so far), I'm having a hard time finding any useful information.
If anyone could point me towards some useful tutorials, or give me a good place to start, I'd appreciate it.
I think you are out of luck. Think about it, if you could access the file, without sharing it, wouldn't that be a serious security problem?
What you can do: Use the always existing share \host\c$ to access the file. For that you'll need administrative privileges for the host.
But be aware: Even if this "works", it introduces problems:
It will be slow, because you are essentially copying 40MB over the wire over and over again
If you are not carefull, you might lock the *.mdb file while accessing it. Access Databases are not really meant to be accessed by multiple users/processes. That didn't prevented Microsoft to try to fake it. Todo so, a *.ldb (L as in Lock) file will be created, to signal other processes the file is locked.
Tldr: Don't do it.

Developing an API for a USB connected Glucometer

I have a ReliOn Glucometer that can be connected to a Windows PC via USB. Glucometer Details Here. I have never tried this, but can someone point me in the right direction to go about connecting to a USB device (C# or Delphi) and pulling data from it? I want to download the current test result and save off to a database to build log of test history. I am a diabetic and I hate doing the tests everyday, but I realized if I can leverage this necessary evil with learning how to work with USB connected device, I at least can get some pleasure in knowing I made some good out of this.
Has anyone done this or something similar? I know there is a website I can join and they have an OCX to do this.. but I don't want to put my info/data on a site, plus it misses the point - I want the challenge of doing this.
Any advice - directions where to start would be greatly appreciated.
I would begin by looking at the USB device driver that comes with the software, especially the inf file. Is it HID or is it for a specific USB chipset, etc? Then look for a relevant development kit/info to take it from there.