Click here to Skip to main content
15,888,283 members
Home / Discussions / C#
   

C#

 
QuestionHow exactly is locking performed with IIS and a web.config? Pin
Xarzu2-Apr-19 16:46
Xarzu2-Apr-19 16:46 
AnswerRe: How exactly is locking performed with IIS and a web.config? Pin
Richard Deeming3-Apr-19 0:11
mveRichard Deeming3-Apr-19 0:11 
QuestionWhat are the settings I need to have in order to run debug in Visual Studio for a program set up in the IIS? Pin
Xarzu2-Apr-19 9:51
Xarzu2-Apr-19 9:51 
AnswerRe: What are the settings I need to have in order to run debug in Visual Studio for a program set up in the IIS? Pin
Ron Nicholson2-Apr-19 11:02
professionalRon Nicholson2-Apr-19 11:02 
QuestionRDLC Report with nested row groups Pin
Member 140571372-Apr-19 8:28
Member 140571372-Apr-19 8:28 
QuestionUpdate User Environment Variable Pin
DavPCode2-Apr-19 4:50
DavPCode2-Apr-19 4:50 
AnswerRe: Update User Environment Variable Pin
OriginalGriff2-Apr-19 5:50
mveOriginalGriff2-Apr-19 5:50 
GeneralRe: Update User Environment Variable Pin
DavPCode2-Apr-19 7:12
DavPCode2-Apr-19 7:12 
Hi Griff,

To better explain my question
The variable I set by C# is used later by separated process (java)
Script is running at logon time an update (or should) update variable based on %clientname% one (RDP session)

I set the var using:
Environment.SetEnvironmentVariable(name, value, EnvironmentVariableTarget.User)


I'm checking if var is set using
Environment.GetEnvironmentVariable("MYID", EnvironmentVariableTarget.User)


but only reads its value from registry

From here:
[http://www.dowdandassociates.com/blog/content/howto-set-an-environment-variable-in-windows-command-line-and-registry/]

When setting environment variables through the registry, they will not recognized immediately. One option is to log out and back in again. However, we can avoid logging out if we send a WM_SETTINGCHANGE message, which is just another line when doing this programatically, however if doing this on the command line it is not as straightforward.

if I set/update the variable in "System Properties -> Environment Variables" and then open a new CMD prompt, its value is updated
Same in C# is not working. The WM_SETTINGCHANGE call I suppose

Thanks,
David

There should be a missing piece
GeneralRe: Update User Environment Variable Pin
Richard Deeming2-Apr-19 8:06
mveRichard Deeming2-Apr-19 8:06 
GeneralRe: Update User Environment Variable Pin
DavPCode2-Apr-19 12:07
DavPCode2-Apr-19 12:07 
QuestionValues Sum in a file Pin
Member 1420343029-Mar-19 10:46
Member 1420343029-Mar-19 10:46 
AnswerRe: Values Sum in a file Pin
OriginalGriff29-Mar-19 21:21
mveOriginalGriff29-Mar-19 21:21 
AnswerRe: Values Sum in a file Pin
Member 1420343030-Mar-19 3:29
Member 1420343030-Mar-19 3:29 
AnswerRe: Values Sum in a file Pin
BillWoodruff31-Mar-19 19:25
professionalBillWoodruff31-Mar-19 19:25 
QuestionSplit lines in a file Pin
Member 1420343029-Mar-19 8:34
Member 1420343029-Mar-19 8:34 
AnswerRe: Split lines in a file Pin
OriginalGriff29-Mar-19 9:11
mveOriginalGriff29-Mar-19 9:11 
QuestionException while trying reading a local file using online compiler Pin
Member 1420343029-Mar-19 6:28
Member 1420343029-Mar-19 6:28 
AnswerRe: Exception while trying reading a local file using online compiler Pin
OriginalGriff29-Mar-19 6:42
mveOriginalGriff29-Mar-19 6:42 
GeneralRe: Exception while trying reading a local file using online compiler Pin
Member 1420343029-Mar-19 7:19
Member 1420343029-Mar-19 7:19 
GeneralRe: Exception while trying reading a local file using online compiler Pin
OriginalGriff29-Mar-19 7:23
mveOriginalGriff29-Mar-19 7:23 
GeneralRe: Exception while trying reading a local file using online compiler Pin
Dave Kreskowiak29-Mar-19 9:44
mveDave Kreskowiak29-Mar-19 9:44 
GeneralRe: Exception while trying reading a local file using online compiler Pin
Member 1420343029-Mar-19 10:48
Member 1420343029-Mar-19 10:48 
QuestionGetting exception message "Incorrect syntax near '(' " in C# web app Pin
Member 1420265628-Mar-19 20:10
Member 1420265628-Mar-19 20:10 
AnswerRe: Getting exception message "Incorrect syntax near '(' " in C# web app Pin
GenJerDan28-Mar-19 20:58
GenJerDan28-Mar-19 20:58 
AnswerRe: Getting exception message "Incorrect syntax near '(' " in C# web app Pin
OriginalGriff28-Mar-19 21:04
mveOriginalGriff28-Mar-19 21:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.