Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
5.00/5 (2 votes)
i have developed an application and it is running fine. But when i uploded the software to one of my client machine it gives the following error.system.security.permissions.hostprotectionattribute from assembly mscorlib.I Am using c# windows application and database is access.

Note: On getting records in transaction there is no problem just on getting record in report it is giving the above error and this only happens in one of my client pc and works fine with my pc and other pc's.

Thank you in advance.
Posted

Are they running the .EXE from a network share?
 
Share this answer
 
Comments
agent_kruger 19-Dec-13 11:46am    
no on local computer and the database exists in debug folder too.
Dave Kreskowiak 19-Dec-13 12:46pm    
I'm talking about the client copy, not yours on your DEV box.
agent_kruger 20-Dec-13 8:15am    
no they are not
Dave Kreskowiak 20-Dec-13 9:48am    
About the only time I've ever seen this happen is when code was running in a restricted sandbox, like if run from a non-local drive.

The message alone won't tell you what happened or why. There is no one single cause for this problem to occur so, with the information you've given, it's impossible for anyone to tell you what's wrong. The HostProtection attribute is used on thousands of methods in the .NET Framework. It's impossible to tell you which one threw the error.

You need to atach the debugger to the code running on that machine or at least get a crash dump. You absolutely need a stack trace to find out what happened.
agent_kruger 21-Dec-13 8:12am    
i cannot debug on that computer as i dont own that pc and cannot install programming tools there. Still any possible reason how to solve it.
Solved it :- as anti-virus software and firewall were not granting me permission.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900