Corrupt Code Access Security (CAS) Registry Setting - InfoPath Dev
in

InfoPath Dev

Corrupt Code Access Security (CAS) Registry Setting

Last post 09-19-2006 05:57 PM by Shiraz Cupala. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 09-16-2006 12:05 AM

    Corrupt Code Access Security (CAS) Registry Setting

    If the InfoPath AppDomain control assembly does not have full trust permissions – which it will on a normal machine, InfoPath may fail to open. This may be due to a corrupted CAS. It only happen with InfoPath solutions that contain managed code. Resetting CAS settings (caspol –rs) on the machine with the problem is the easiest way to fix the problem so that the form opens correctly. Although it's a bad idea, some applications may modify CAS settings and that is the likely cause for corruption. Here are the steps to diagnose / fix the problem: 1. Click Start->Run and enter "cmd". This opens a command prompt. 2. In the command prompt, enter "cd %windir%\microsoft.net\framework\v2.0.50727" (without double quotes) to navigate to the directory containing the CAS tools 3. Enter "caspol –l > %SystemDrive%\cas.txt" to dump the CAS settings 4. Enter "notepad cas.txt" to view the output in notepad. By default, the top of the Code Groups section should read, “1. All code: Nothing”. Corrupted CAS settings might read something like, “1. All code: ATP code group”. 5. If you want to reset the user’s CAS settings, enter "caspol –rs" in the command prompt. Note: Resetting user’s CAS settings may not be the proper fix for this because it may break other applications (especially the one that broke InfoPath! :). Please use at your own risk.
    Patrick Halstead
    Project Manager at Qdabra
  • 09-19-2006 05:57 PM In reply to

    Re: Corrupt Code Access Security (CAS) Registry Setting

    Note the InfoPath Error Message that users get that likely indicates this issue is as follows: ========== InfoPath cannot open the following file... Form template: http://yourserver/folder/filename.xsn === InfoPath cannot open the selected form because of an error in the form's code. The form code could not be loaded because of a security restriction. That assembly does not allow partially trusted callers. === It is the last line which is the teltale sign of this CAS setting issue.
    Shiraz Cupala / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.