|
Hello all who have made comments. I am replying to my own comment so that I can address all of your comments in one reply.
All of you except for OriginalGriff are asking questions that I have already implied or explicitly written answers too:
Perhaps some of you don't speak English so I will clarify. This statement implies that the code I provided above is in a class derived from System.Windows.Forms:
"Other than than the fact that I am using a regular System.Windows.Forms form"
As for why I commented code out, I answered that question with the statement:
"Here is the content but its all commented out because except for the call to the base method because it wasn't working."
If you don't understand any of the above statements, then ask about that. Otherwise please don't ask questions that I have already answered. It wastes everyone's time. For my part, I probably could have written that second statement better as:
"Here is the content but it's all commented out because, except for the call to the base method, because it wasn't working."
OriginalGriff:
1. Yes
2. Yes
3. No. I did not want the form drawn normally under certain conditions.
EVERYONE:
I wrote a test program to both figure this issue out and move forward with my purpose since that test program is working correctly. I have learned that overriding OnPaint will not accomplish what I am currently trying to do (which is to make the application into a desktop widget when the user decides... that means drawing it as part of the desktop). However, I would still like to troubleshoot this in case I need to override OnPaint for another reason... chances are good I may need to since this is a very customized form.
|
|
|
|
|
I just tried something similar (using the code you posted) and it works every time. There must be something else in your form/project that is preventing it calling your OnPaint override.
|
|
|
|
|
Yeah. I know. I tried it again in the newer "test" app (as I mention in my most recent post above). It works fine. I still can't find anything wrong with the project app. I am hoping someone will have an idea of what could possibly get in the way of the override being called.
|
|
|
|
|
Impossible to guess since we do not have enough information.
|
|
|
|
|
That is exactly when a guess is required...
When all information is available, you can rationally deduce what causes the problem.
|
|
|
|
|
Luc Pattyn wrote: When all information is available Exactly so; but until then ...
|
|
|
|
|
Until then...
For now I can live without an answer.
|
|
|
|
|
And without providing more information that's how it will remain, I am afraid.
|
|
|
|
|
Wild guess: your project got corrupted. Try "rebuild all".
|
|
|
|
|
LOL. Already tried that. Didn't work.
|
|
|
|
|
Hi all, I'm following a basic dotnet core tutorial ASP.NET Tutorial | Hello World in 10 minutes | .NET using a SBC Nanopim4 running Armbian. I've reached the dotnet run stage Of the asp sample ) and it reports it's listening on ports 5000 and 5001. However I can't browse to the site and if I run nmap from my laptop it returns both ports closed. Another thing is, if I run nmap localhost on the Pi it returns ports open but using it's actual ip address it returns ports closed - any ideas folks ?
We can’t stop here, this is bat country - Hunter S Thompson RIP
|
|
|
|
|
By default, Kestrel only listens for connections on localhost ; you normally use another web server as a "reverse proxy" to your application.
You should be able to add a UseUrls call to your WebHostBuilder to make it listen on the actual IP address:
c# - Remotely connect to .net core self hosted web api - Stack Overflow[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks Richard, through that link I found that you can modify Properties\launchSettings.json as I show below - and all is good - probably not the way to do it in a production app but good enough for my learning at this early stage, The 10.10.1.143 parts were set to localhost. Thanks again.
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:6371",
"sslPort": 44318
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"WebApp": {
"commandName": "Project",
"launchBrowser": true,
"applicationUrl": "https://10.10.1.143:5001;http://10.10.1.143:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
We can’t stop here, this is bat country - Hunter S Thompson RIP
|
|
|
|
|
|
Basic way to test net connectivity in windows (but same exists in linux.) Open a console window and type the following command.
telnet <host> <port>
Substitute in the above for the values you want to test for <host> and <port>. For example
telnet localhost 5000
There are several possible outcomes.
1- It reports immediately that it cannot find the host. This indicates a "Domain Name Server"(DNS) error. Outside the scope of what you are currently doing but generally because you typed the wrong value or you do not know the correct DNS name
2- It reports a no connection error immediately. That means it got to the computer (DNS) but that the port on that computer was not 'open'. So the app that you expected there was not in fact there.
3- It sits for a while and then reports an connection failure. That indicates that it is trying to get to the DNS but something is dropping the connection attempt between it and the computer. This is often a firewall or network issue.
4- It returns a blank screen. That indicates it successfully connected and thus the connectivity test is done.
What might one expect from such a test based on your description. I would suspect 1 or 2. You are using the wrong DNS or even though it 'reports' that it is waiting on that port either it isn't doing that at all or it opens it and immediately closes it.
Should note that these days this works for everything: http, https, soap, rest, TCP.
|
|
|
|
|
Hi All,
I need to connect to an old VMS server, that's not supported, via FTP, and change directory multiple times within the same session, to count the files in each directory.
I believe I can do this within Wininet.dll api in C/C++.
https://msdn.microsoft.com/en-us/library/ms909399.aspx?f=255&MSPPError=-2147217396
But when I look at the .NET Framework, I don't see a change directory function within FTP.
.NET FrameWork
https:
Any idea what is the best way to change directory (multiple times) within the same FTP session, and count a total number of files within each directory?
NOTE: I would also like to count the files in read-only if that's possible, just in case one of the files may be getting processed.
Thanks.
|
|
|
|
|
|
As Griff said, the FtpWebRequest is extremely limited. You'd probably do better to use a proper FTP library instead. For example, FluentFTP[^].
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
|
Please don't post the same thing in multiple places - you already had it in QA: How can get windows.security.credentials.dll lib C#[^] so posting it in other places as well just duplicates work and that tends to annoy people.
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
|
My colleague advised me to use obfuscator in my startup. But I do not know anyone who uses code obfuscation. Do you use obfuscators in your projects?
|
|
|
|
|
It's one level of protection for source code.
It makes it harder for the "average" person to understand the de-compiled code because the variable names are meaningless. I don't know how that impacts reflection if you use that.
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
Obfuscator-selling companies recommend obfuscating.
How many times have you been asked to reverse-engineer a project? Happened a few times to me, and even without obfuscation, it is usually not worth the effort.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Never did it. I did not have to decompile the project.
|
|
|
|