• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 247
  • Last Modified:

Program won't run in Windows Vista

I have had several reports from users that my program doesn't run under Windows Vista unless they run in Windows Compatability Mode... what do I have to do to make my programs run under Windows Vista?

I appreciate any help on this one...
0
rmmarsh
Asked:
rmmarsh
  • 7
  • 6
  • 4
2 Solutions
 
Bob LearnedCommented:
What version of .NET are you using?

Bob
0
 
rmmarshAuthor Commented:
.NET 2.0
0
 
WilliamCommented:
Could be a security issue. Have you ran the app on a standard xp box without admin rights? Prefferably User only rights.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
rmmarshAuthor Commented:
Hmmm... haven't tried running as User yet, but will do.  Isn't there something I have to do in my program to make it Vista compatible?
0
 
Bob LearnedCommented:
What kind of application is this?

Bob
0
 
rmmarshAuthor Commented:
It's a book inventory program; goes to the internet to get book prices, uses SQL Server Express 2005 for the database...
0
 
Bob LearnedCommented:
I am sorry, I meant is this a Console app, Windows Forms app?

Bob
0
 
Bob LearnedCommented:
Also, what happens when Compability Mode isn't set?

Bob
0
 
rmmarshAuthor Commented:
Windows forms app; when running outside of compat mode, the program crashes.
0
 
WilliamCommented:
Does it throw an exception or just "go away" silently?
0
 
rmmarshAuthor Commented:
Gets the following error message:  Application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission, contact your system administrator or use the Microsoft NET Framework Configuration tool.

If you click Continue the application will ignore the error and attempt to continue.  If you click Quit, the application will close immediately.

Requested registry access is not allowed.
0
 
WilliamCommented:
Set a CAS policy for either all the assemblies you are running or for the program directory(not as secure as anythiing in the directory will have permission's) as Full Trust
0
 
Bob LearnedCommented:
Where is the app running from?  What kind of access rights does it require?  Are you trying to access files, registry, etc.?

Bob
0
 
rmmarshAuthor Commented:
Billy:  how do I set a CAS policy? (sorry, I don't even know what it is!)

TheLearnedOne: app is running from the desktop; shouldn't require any access rights, unless you have to be administrator to access the registry...  I could (thought I did) change the program so it doesn't access the registry; would that solve the problem, you think?

R
0
 
Bob LearnedCommented:
With Vista, administrator rights are not assumed, so access rights work completely differently.

What are you using the Windows registry for?

Bob
0
 
rmmarshAuthor Commented:
Basically program information, which I probably should store in Settings! (Settings is getting so large that I wonder about breaking it)...

I think you hit the problem on the head - that of rights in Vista... I'll get rid of the storage in the Registry and see if that corrects the problem...

Thanks so much, both of you, for your help...

R
0
 
WilliamCommented:
CAS = Code Access Security
Specifically for .NET
A pretty deceent article on msdn can be found at
http://msdn.microsoft.com/msdnmag/issues/05/11/CodeAccessSecurity/default.aspx
this was a written as a prerelease
the main msdn pages can be found here
http://msdn2.microsoft.com/en-us/library/930b76w0.aspx
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 7
  • 6
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now