Lately i have stumbled upon a Library called mXparser which i think can be useful for your cause.It gives you a lot of flexibility, such as variables, functions, constants, operators.You can check it out.
I'm using the 2015 version of visual studio C#.
I was told that the 2017 version was not stable in places but there are some nice features I'd like to use in the 2017 version.
Does anyone know of a any recent releases of visual studio. Hopefully the next release is more stable.
This What's new in Visual Studio 2019 - Visual Studio[^] shows the difference between the 15, 17 and 19. I didn't like 15 as it was wacky, 17 was a better one, as it is more integrated with Azure and added Angular stuff. If you have access to the 2019 version, then yeah 19 for sure.
I have been using VS 2017 for the past two years. Never experienced any issues. The updates were frequent and things were dine nicely. Just a week ago, I installed VS 2019. Certain things like cloud development are easier in VS 2019. As backup, I keep pervious version. So, I uninstalled VS 2015.
I am using a laptop that I purchased in 2012 with intel core i5 16 GB Ram and have not experienced any issues with VS 2019 with respect to memory or disk. I think what you are building within the Visual Studio could cause issues, but not necessarily by IDE.
I have 3 Network adapaters. I neeed the IP address of the primary, so I'm using this:
foreach (NetworkInterface ni in NetworkInterface.GetAllNetworkInterfaces())
if (ni.NetworkInterfaceType == NetworkInterfaceType.Ethernet)
foreach (UnicastIPAddressInformation ip in ni.GetIPProperties().UnicastAddresses)
if (ip.Address.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork)
The question is, does NetworkInterface.GetAllNetworkInterfaces() return them in the correct order? How do you know which is the primary?
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
That doesn't make sense as there's no such thing as a "primary" network adapter.
You can have a machine connected to multiple networks on multiple adapters. Which one is "primary" depends on which network subnet you arbitrarily consider "primary", and which adapater handles that subnet in the routing table.
The routing table also changes when network status changes, such as when you connect a VPN, or pop a laptop in/out of a dock and switch between wireless and wired networks.
That doesn't make sense either as the only thing that gets and holds the IP address would be the adapter itself, not the device or code running on it.
The application on the device just says "send this data to this host". It's up to the network stack running on the device to figure out how to do that and which network adapter to use, based on the routing table. Once that is determined, it tells the adapter driver to send the data to the target host.
A single machine (or device) can have multiple IP addresses. The assignment of IP addresses stops at the network adapter. The device the adapters are "plugged into" never gets an address.
I am not a C# programer but the "primary" network interface in the Microsoft Windows operating system is determined by the route metric.
If your question is: What is the primary adapter in Microsoft Windows?
Then the answer is: It's the network card that contains the route with the lowest metric. This applies to both ipv4 and ipv6.
Note: This does not mean the network interface is able to route traffic for all subnets... that would depend on the routing table which may be dynamic. The primary adapter is probably meaningless for your needs.
I used various code combinations for web page reading, but i have this error:
[The remote server returned an error: (403) Forbidden]
- I use VS2010. It's because my version of VS is so old, i keep getting this error?
- Is the same problem for newer versions of VS?
- If newer versions have no problem, what can i add to my version?
- Or if it's the code problem, what is the correct code?
This problem appear for SOME websites. But not on all.
i want to read a page and on this line :
request = (HttpWebRequest)WebRequest.Create(urlAddress);
the compiler stops and gives me this error:
[The remote server returned an error: (403) Forbidden]
but i just remember that i have .NET 4 and
in .NET 4.0, TLS 1.2 is not supported, but if you have .NET 4.5 (or above) installed on the system
then you still can opt in for TLS 1.2 even if your application framework doesn’t support it.
so i have to find a workaround.
(this is a comment from an old code i had and i just find it now)
- Is there a way to install a newer .NET in my VS2010 ? (the latest .NET that works for VS2019)
the problem is like this:
Sometimes, the content of webpage is read!!! But after a couple of readings on the same website, it gets stuck on this error. It's like some cookie is activated or something, and remembers that i was there before and not alowing me to enter anymore. And it's true for any page from that website after this thing happen. The problem is i don't know how to find and set that cookie from c#. I strongly believe is a cookie.
I also suspect its a cookie problem, as you mention. The page is loading for awhile, like 5 times for example, but after the first occurrence of the error, it never loads anymore. I have to wait like more than 1 day/or a couple of hours, until i try again and the same story repeats.
You mention about "examining the details of the request and any response" - give me a tutorial from which i can learn by myself how to do it, please. This web problem is not my strong point but i start to learn it through these errors i get, which sucks since it impedes my normal routine.
...Or summarize here yourself like a quick and dirty.
Dave Kreskowiak, my friend. Is not in my routine to do clever checks ! Especially for web problems.
But you suggested me to do a check just now. And i did it. And it seems the code is ok !!!
I tested it with another website and it loads fine...hopefully not getting the error after a couple of accessing like i described it already, though i repeated the request a couple of times and it seems ok so far.
Yah, shame on me not figuring this out so far.
But other than the code working, i still remain with the problem unsolved on the original link (that i cant mention).
- How to (generally speaking) check what a web page wants and implement it in c# after that? (avoiding this error i keep receiving?)
Last Visit: 26-Feb-20 10:53 Last Update: 26-Feb-20 10:53