By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,897 Members | 1,969 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,897 IT Pros & Developers. It's quick & easy.

VC++ Release problem

friendjin
P: 19
I got a problem about Release. I really appericiate if anyone could give me a help.

The problem is when I ran it in another computer. an exception will be displayed "application has generated an exception that could not be handled". Do you know what caused this.

Another strange thing is when I paste it to another PC, then I run it, it worked. But when I share it from the network, it did not work..

any ideas.

Thanks
Feb 20 '07 #1
Share this Question
Share on Google+
11 Replies


sicarie
Expert Mod 2.5K+
P: 4,677
I got a problem about Release. I really appericiate if anyone could give me a help.

The problem is when I ran it in another computer. an exception will be displayed "application has generated an exception that could not be handled". Do you know what caused this.

Another strange thing is when I paste it to another PC, then I run it, it worked. But when I share it from the network, it did not work..

any ideas.

Thanks
Check file and resource names - my guess is you've coded something for the local machine and not used a network or absolute pathname.

You are compiling and distributing the executable, correct? Or are you compiling per machine?
Feb 20 '07 #2

friendjin
P: 19
Check file and resource names - my guess is you've coded something for the local machine and not used a network or absolute pathname.

You are compiling and distributing the executable, correct? Or are you compiling per machine?
Hi sicarie ;
Thanks for help.
I copied the whole release file to the network(P: ), once I ran the progrmming on my computer,sorry. I ran it from P:, the following exception came up.
"An exception ' System.Security. Policy.PolicyException' has occurred in SolarPanelTest(my little programme's name)
And, there were followinng three Possible debuggers letting me choose:
"GSM-Microsoft VC++[design0]- Form.h:Visual Studio.NET 2003
New instance of Microsoft CLR Debugger 2003
New instance of Visual Studio.NET 2003"
Then, asked me to select one of the debugger.
I am sure it is not the first one, as it is another programing called GSM. But whatever I selected the second or the third, it did not work.
when I chose the second, the following error occured:
Unverifiable assembly"P:\...\SolarCharger\SolarPanelTest.exe"fa iled policy check
when I chose the third, a new windows came out, and let me choose the progrma types that I want to debug(CLR, Native, Script) default is the first two.
but when I click ok, the same error with the first one occured.

additionally, When I copy to other machines, I do not need to compilling again.
I ran directly.
Feb 21 '07 #3

sicarie
Expert Mod 2.5K+
P: 4,677
Hi sicarie ;
Thanks for help.
I copied the whole release file to the network(P: ), once I ran the progrmming on my computer,sorry. I ran it from P:, the following exception came up.
"An exception ' System.Security. Policy.PolicyException' has occurred in SolarPanelTest(my little programme's name)
And, there were followinng three Possible debuggers letting me choose:
"GSM-Microsoft VC++[design0]- Form.h:Visual Studio.NET 2003
New instance of Microsoft CLR Debugger 2003
New instance of Visual Studio.NET 2003"
Then, asked me to select one of the debugger.
I am sure it is not the first one, as it is another programing called GSM. But whatever I selected the second or the third, it did not work.
when I chose the second, the following error occured:
Unverifiable assembly"P:\...\SolarCharger\SolarPanelTest.exe"fa iled policy check
when I chose the third, a new windows came out, and let me choose the progrma types that I want to debug(CLR, Native, Script) default is the first two.
but when I click ok, the same error with the first one occured.

additionally, When I copy to other machines, I do not need to compilling again.
I ran directly.
Does that user have access to everything it needs - is it a user permitted to run that program, or access whatever it needs to access, on the local machines?
Feb 21 '07 #4

friendjin
P: 19
Does that user have access to everything it needs - is it a user permitted to run that program, or access whatever it needs to access, on the local machines?
Sorry, I actually have no idea how I could check those things,only thing I have done is I changed all securities stuff to allow for every user in SolarCharger file property.
I have no idea what else I have to change.
Feb 21 '07 #5

sicarie
Expert Mod 2.5K+
P: 4,677
Sorry, I actually have no idea how I could check those things,only thing I have done is I changed all securities stuff to allow for every user in SolarCharger file property.
I have no idea what else I have to change.
Well, now that I look at it, that may have been one of those questions I should have stuck with not asking...

Does the program access a file or anything on the local machine, or is everything it needs in a repository on the P drive?
Feb 21 '07 #6

friendjin
P: 19
Well, now that I look at it, that may have been one of those questions I should have stuck with not asking...

Does the program access a file or anything on the local machine, or is everything it needs in a repository on the P drive?
My programming actually has to access some text and exe file which all locate on P path.
by the way, my programming have to connect a DAQ, I do not know whether you are familiar with it. anyway, to talk to the DAQ, the UL has to be used which the lib file is cbw.h. I have copied this file to the released file.
Feb 22 '07 #7

sicarie
Expert Mod 2.5K+
P: 4,677
My programming actually has to access some text and exe file which all locate on P path.
by the way, my programming have to connect a DAQ, I do not know whether you are familiar with it. anyway, to talk to the DAQ, the UL has to be used which the lib file is cbw.h. I have copied this file to the released file.
I'm not familiar with DAQ (I don't think). What is it?
Feb 22 '07 #8

friendjin
P: 19
I'm not familiar with DAQ (I don't think). What is it?
which is electronic device.
Feb 22 '07 #9

P: 3
Are you a using Login as a local administrator having enough privileges to run the .exe and do you have all dependent files in the new machine?
Feb 22 '07 #10

friendjin
P: 19
Are you a using Login as a local administrator having enough privileges to run the .exe and do you have all dependent files in the new machine?
I have to run it on the whole network, all PCs in the company. So I have to copy all files into the net Path, P, for this reason, I could not to copy all releated files to every machine.
The problem is I copied whole file to another machine, it worked.But when I copy it to the net Path, it did not,So I thought the problem should be come from the network security part, but I am not quite familiar with it. if you could give some idea to check all sercurity things, that would be great.As you mentioned about privileges.
I am not sure what the local admin is, but I do have to log in to access to the PC, and Admin can abselutely log in to every machine. Is that what you asked.


thanks
Feb 22 '07 #11

sicarie
Expert Mod 2.5K+
P: 4,677
I have to run it on the whole network, all PCs in the company. So I have to copy all files into the net Path, P, for this reason, I could not to copy all releated files to every machine.
The problem is I copied whole file to another machine, it worked.But when I copy it to the net Path, it did not,So I thought the problem should be come from the network security part, but I am not quite familiar with it. if you could give some idea to check all sercurity things, that would be great.As you mentioned about privileges.
I am not sure what the local admin is, but I do have to log in to access to the PC, and Admin can abselutely log in to every machine. Is that what you asked.


thanks
For sanity's sake, I would recommend running this program as the same user (NOT admin) on every machine (hopefully this is on a domain and only involves one user going into AD instead of one user going on to every computer....), and then making sure that user has security priviledges (whatever you need - read, read/write, execute, etc...) to the folders on the drives that the program accesses.

It's best (and by best I mean most secure) to start out with as few privledges as possible, and then gradually add more (though you might want to start by allowing all - seeing if it works, and then if it does, denying all and granding individual and limited priveledges from there).

Your local sysadmin/network person should be able to help you with this.
Feb 22 '07 #12

Post your reply

Sign in to post your reply or Sign up for a free account.