Sys(0) returns machine name and the user name.
As to your "proper solution", it is too complicated for my needs and my technical level. Don't take it personally though.
Thank you.
>>More bad news.
>>
>>I implemented a call from the ASP.NET page to a small VFP program (GetUserName.exe). And the VFP GetUserName, when calling GETENV("UserName") returns the damn computer name (with a dollar sign at the end). Just like the C# call to Environment.UserName. Even though when I call this function (GETENV("UserName")) in my main VFP 9 application it returns the real user name.
>
>SYS(0) is the machine name I believe.
>
>>Therefore, somehow, when the call is made from the ASP.NET page, the username is the computer name. That is, it does not work.
>>
>>3 hour of work wasted. But 3 hours of code that would not work, saved.
>>
>>UPDATE: What setting (in web.config) could be affecting the above? I use Windows Authentication in web.config.
>
>The proper solution if you need data from a remote process would be to create a DLL and access its functions at startup, or to launch a parallel process and establish a named pipe between the two processes so you could write data back and forth, or use a window-based messaging system passing in the handle of an HGLOBAL memory block that allows you to transfer data back and forth.
>
>You're accessing things that are available in the Win32 API. You should be using those functions to augment whatever .NET doesn't provide.
>
>People under-estimate the power of Win32. Even going back to Win98 / Win2K, the power of that core OS functionality was / is amazing.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham