monitor local network traffic issue - c#

I am using Networking Tab of Windows Task manager to monitor local network traffic to test how much bandwidth my application will use. My scenario is, I will use a local console client application to send data (using Http POST method) to local IIS 7.0 server.
My issue is no traffic could be monitored using Networking Tab of Windows Task manager. My environment is, VSTS 2008 + C# + .Net 3.5 + Windows Vista x86 Enterprise. Any ideas what is wrong?

Traffic in local loopback scope is not monitored as it don't really use the network. I guess you will have to collect these statistics programatically in your own program, unless you have another machine.

I imagine that as it's all local, I belive Windows will resolve localhost and not forward it to the NIC, thus not producing any network traffic.

Related

NancyFx - Find the server over a local network

Scenario: I have a small POS system running in a brick-and-mortar store. The software is running in Windows machines with SQL Server 2008 - 2012 (it varies). There are Android tablets that need to connect to the server in someway to get the data inside SQL Server.
My plan right now is to create some REST Web services using NancyFx and host them as a Windows Service inside the Windows machines. Then the Android tablets will need to connect to the server via HTTP in order to consume the REST API.
I have a problem (perhaps more than one): the network in the brick-and-mortar store is not that reliable and the Wi-Fi signal might decrease for whatever reason.
Question: Is there a way to automatically find the IP or machine name of the server (the one with the REST API) even if these properties change for some reason (unknown network issues or so)?
Yes, the server and the tablets are going to be on the same local network.
it's more of a network problem than programming issue. you must have a DHCP server installed in your LAN. use that to assign an IP to the server with a fixed lease. that way you fix the address of server. clients should preferably connect to that server using its name. since it's a Windows network, name would resolve to the ip address.
that is the simplest solution i can think of

UWP cannot connect to local Socket.IO server

I have an UWP application which is connecting to a Socket.IO server. When debugging I like it to be a local server, but I can't get it to connect it. I use the SocketIoClientDotNet library, and it works well if I have to connect to an external server, but I can't connect to the local one.
I'm aware that on default UWP apps forbids connecting to local servers, I think it's called loopback, but I'm also tried to go around that by using this tool:
http://loopback.codeplex.com/
However, It didn't helped.
Any help is much appreciated, and thanks in advance! : )
I think the problem is that you didn't enable the relevant capability in your project. Please open the manifest of your app can select the Capabilities label and check the Private Networks (Client & Server) on the left.
This capability's name is "privateNetworkClientServe", this capability provides inbound and outbound access to home and work networks through the firewall.
For more info about capabilities, you can refer to App capability declarations.
Update:
Due to loopback restrictions enforced by network isolation policy, when use TCP protocol, server and client must run on separate machines for them to be able to communicate with each other.

Accesing an IIS hosted website in Ubuntu under VMWare

So as the question goes, I have hosted a ASP.NET and C# website in IIS in my Windows 7 Ultimate OS. Not I need to be able to access the same site from ubuntu which is actually a virtualized OS running under VMWare.
I am able to access the website in my Windows 7 pc without any problems. But inside the Ununtu there seems no way to do the same.
I searched many forums for the same, no luck! Disabled the Firewall(Actually) to make sure no security issues arise but still not able to do the required thing.
This is the error :
Server not found
Firefox can't find the server at www.google.com.
Check the address for typing errors such as
ww.example.com instead of
www.example.com
If you are unable to load any pages, check your computer's network
connection.
If your computer or network is protected by a firewall or proxy, make sure
that Firefox is permitted to access the Web.
Any ideas?
the vm can access the host machine? if you use NAT connection mode seems cannot communicate with the host. Try Bridge instead?

Remote Debug with Amazon Web Services (EC2) and c# Windows Service/WCF

I have a Windows Server 2008 R2 in the Amazon EC2 cloud. I would love to be able to debug my C# Windows Service or WCF Service that is running on that server from my desktop in my office.
In the past we got around it by installing Visual Studio on the server in the cloud, but we use remote debugging for our local servers, so I was hoping there was a way to make it work in the cloud.
Has anyone out there accomplished remote debugging to the Amazon cloud without a VPC/Domain in the cloud?
Any suggestions or solutions would be most appreciated.
There isn't anything different about remote debugging against an EC2 instance than there is about remote debugging against a local server EXCEPT firewall configuration...
I would recommend setting up a VPN connection to the EC2 server instead of opening up firewall ports (PPTP is quick and easy).
If you would rather open firewall ports I "think" you will at least need the following (untested):
TCP 139, TCP 445, UDP 137, UDP 138 (all related to DCOM)
Another thing that always causes issues for me on EC2 instances is not passing the /hostname parameter to msvsmon. msvsmon likes to default to the internal hostname and will startup showing something like "listening on 'ip-1-2-3-4.us-west-2.compute.internal", which means it will ignore attempts for connections from Visual Studio clients that think they are talking to 'ec2-7-8-9-0.us-west-2.compute.amazonaws.com'. To fix this, get the full public DNS name or public IP of your EC2 instance and then launch msvsmon.exe as:
msvsmon.exe /hostname ec2-7-8-9-0.us-west-2.compute.amazonaws.com
Then in Visual Studio:
Tools-->Attach To Process
Set Transport to "Default"
Set the Qualifier to whatever you passed for a hostname when you launched msvsmon.exe

Silverlight socket

I downloaded the silverlight 4 socket application from the book "Pro silverlight 4 with c#" which is basically just a silverlight socket client and server application. The server is a console application and the client is a silverlight web applcation.
I can run the server and client fine on ONE computer, it shows that its connected and so on, but when i tried connecting to the server on a different computer (Local Network), it wont connect. Any idea??? Eventually i want to put this on the internet and go live, not local. When i run using visual studio development server, it shows localhost and port 1091, and i thoguth silverlight only uses port 5200 somthing.
Silverlight applications are only allowed to connect back to the site it was loaded from by default, much like Java and Flash does. If you need to communicate with another server, that server needs to explicitly allow it by running a policy service listening to port 943, or by serving a policy file over HTTP port 80. See http://msdn.microsoft.com/en-us/library/cc645032(VS.95).aspx for the full details on how to implement this.
Have you added policy file to you "C:\inetpub\wwwroot"?
I used example from "Pro silverlight 3 with c#" and its work from internet and local.
I added policy file to "C:\inetpub\wwwroot", where my silverlight website was published and everything works fine.
Note that website published in the same machine where server application runs.
Hope this will help you.

Categories