Search results for query: *

  1. J

    Problem with tls

    I don't think you can. Microsoft recommend against using SmtpClient these days, I believe. You should look at some other email provider.
  2. J

    CS0103: The name 'InitializeComponent' does not exist in the current context

    What does that actually mean? Please be specific. Are you saying that VS displays that error message when you try to open a window in the designer? Something else?
  3. J

    error CS0234 name does not exist in the namespace?

    If the type has been renamed then obviously you should use the new name.
  4. J

    Question Loading GIF Picture From File Works But Not From Memory

    I just told you what to do, for the second time. Create the Image from a MemoryStream and don't close the stream. You obviously already know how to create an Image from a Stream because you're doing it with a FileStream in post #1. Just use a MemoryStream instead but don't dispose it until...
  5. J

    Question Loading GIF Picture From File Works But Not From Memory

    I did not tell you to use a MemoryStream and not use an Image. What I said was that you should create the Image from the MemoryStream and keep the stream open. That way, it will not fail if the system tries to go back to the stream later. I don't know for a fact that that is the issue but I have...
  6. J

    Console string input to hexdecimal

    You have this: byte[] ToSend= Array.Empty<byte>(); and then you have the line that throws the exception, with no reference to ToSend in between. If that array is empty, no index is valid, so that exception is inevitable. Presumably you want ToSend to refer to an array that is the same length as...
  7. J

    Question Loading GIF Picture From File Works But Not From Memory

    I suspect the issue is that, because the GIF is animated, an attempt is made to read data from the source stream of Image object when the frame changes. That would fail because the Stream is closed, so an exception is thrown. It may be that you have no choice but to maintain an open Stream, in...
  8. J

    Console string input to hexdecimal

    You can call Convert.ToByte, byte.Parse or byte.TryParse to convert hexadecimal text to a byte value. Pretty sure that they will not work if the "0x" prefix is included, so you'd have to trim that first if it is.
  9. J

    Console string input to hexdecimal

    What EXACTLY does the data look like? Is it just the digits or does it have the "0x" prefixes?
  10. J

    functions that start and stop in windows_task_scheduler?

    If you want to learn then you need to understand how to work out what code you need to write for yourself and ask about specific issues along the way. I've told you what method to call. I assume that you've already learned how to call a method but you really ought to read the documentation for...
  11. J

    functions that start and stop in windows_task_scheduler?

    I've told you that you can call Run and Stop on a Task. I'm not sure what exactly it is that you want to be taught.
  12. J

    functions that start and stop in windows_task_scheduler?

    The documentation says that that's where commandline arguments go so presumably so. I can't tell you more than that because I've never used this library myself. As I said, I had no idea it even existed until I read this question. It's time for you to test it for yourself and see what happens...
  13. J

    functions that start and stop in windows_task_scheduler?

    Please provide a FULL and CLEAR explanation of your problem. If I had to guess (which I do) then I'd say that you are probably using this NuGet package. I wasn't even aware that that existed until a few minutes ago but I found it with a web search, clicked the API documentation link and then...
  14. J

    Hide Console Windows

    In your screenshot, the commandline arguments are under the Action tab so you should look at the object that represents that, i.e. the ExecAction object, and see whether it has a property that corresponds to that field.
  15. J

    Hide Console Windows

    Instead of asking us to explain the basics, do some reading on commandline arguments. If the user just runs an EXE directly then there are no arguments. If you write the commandline, as you can in a shortcut or Task Scheduler or Run, then you can specify whatever commandline arguments you want...
  16. J

    Insert Null Values into a Sqlite Table

    Firstly, stop using AddWithValue. It infers the parameter data type from the value. Apart from the fact that it will sometimes infer the wrong data type, it can't infer any data type from a NULL value. Use Add instead and specify the data type explicitly. Secondly, if you want use a database...
  17. J

    Add a class to a console app?

    For future reference, if an error occurs, ALWAYS provide the error message. The issue was obvious to the experienced eye in this case but that will not always be the case. The error message is provided for a reason. If you'd like us to diagnose the issue, provide us with the diagnostic...
  18. J

    XSRF-Token

    Please don't post unformatted code snippets. They are too hard to read.
  19. J

    Service F9 BreakPoint Debuging

    Here's an example of an app that I wrote that can be debugged via the Console and then installed as a Windows service: using NSWHealth.DX.Common; using SI.Moh.Phisco_Periph.Dto.Mapping; using System.IO; using System.Linq; using System.ServiceProcess; namespace SI.Moh.Periph.Submissions.Service...
  20. J

    I want to upload a Windows local drive file to a Linux server FTP.

    Actually, looking more closely at your code, it would be better to create a FileStream and then call CopyTo to copy the data to the request stream. That way, you're not creating a byte array containing all the data needlessly. That would be especially important for large files.
Back
Top Bottom