Solved

Application identity is not set. Application.restart

Posted on 2013-02-07
4
1,311 Views
Last Modified: 2013-02-28
hello all ,
i am getting this exception when
 Application.Restart()
           

Open in new window

any help ?

exception appear when call Application.restart
0
Comment
Question by:AhmedHindy
  • 2
4 Comments
 
LVL 42

Expert Comment

by:sedgwick
ID: 38863121
is it while debugging?
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 38863130
indeed ... during debugging (looking at screenshot).

so, you can check out these suggestions I found:
I found that this problem exists only if you untick "Just My Code" under debug options.
in my case I just disabled the InvalidDeploymentException from Debug->Exceptions

you might look into this page for more explanation:
http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/397c38e4-4306-4791-bed6-f319384c1086
0
 
LVL 42

Expert Comment

by:sedgwick
ID: 38863141
try this approach:

Application.Exit();

Process.Start(Application.ExecutablePath, "/restart" + Process.GetCurrentProcess().Id);

Open in new window


how-do-i-restart-my-c-sharp-winform-application
0
 
LVL 10

Accepted Solution

by:
Monica P earned 500 total points
ID: 38863616
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Flash (http://en.wikipedia.org/wiki/Adobe_Flash) has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.

822 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question