Forgot the error:
System.Security.SecurityException
Request for the permission of type System.Security.Permissions.FileIOPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
at System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet grantedSet, PermissionSet deniedSet, CodeAccessPermission demand, PermissionToken permToken)
at System.Security.CodeAccessSecurityEngine.Check(PermissionToken permToken, CodeAccessPermission demand, StackCrawlMark& stackMark, Int32 checkFrames, Int32 unrestrictedOverride)
at System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, StackCrawlMark& stackMark)
at System.Security.CodeAccessPermission.Demand()
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at System.Xml.XmlDocument.Save(String filename)
at addresssort.addresssort.GetHDData(ArrayList xArrHD) in c:\documents and settings\alex\my documents\visual studio projects\addresssort\formcode.cs:line 108
at addresssort.addresssort.GetSortedHD(Int32 xlngSortOrder) in c:\documents and settings\alex\my documents\visual studio projects\addresssort\formcode.cs:line 89
at addresssort.addresssort.btnSort_OnClick(DocActionEvent e) in c:\documents and settings\alex\my documents\visual studio projects\addresssort\formcode.cs:line 46
at Microsoft.Office.Interop.InfoPath.SemiTrust._ButtonEventSink_SinkHelper.OnClick(DocActionEvent pEvent)
> I have done the following:
> Use the .NET Framework 1.1 Configuration to give all "Infopath Form Templates" Full Trust.
> 2) Installed my certificate in the "Trusted Root Certification Authorities (Certificates Folder)" for the certificate used in the form
>
> I STILL can't run my managed code under debug! What's wrong???
Check out this old newsgroup posting:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=%23ZwK0AUKEHA.2660%40
TK2MSFTNGP09.phx.gbl&rnum=1&prev=/groups%3Fq%3DDebugging%2Bfull%2Btrust%2BInfoPa
th%2Bcode%2Bin%2BVS%2B.NET%26hl%3Den%26lr%3D%26ie%3DUTF-8%26selm%3D%2523ZwK0AUKE
HA.2660%2540TK2MSFTNGP09.phx.gbl%26rnum%3D1
--josh bertsch
> I have done the following:
> Use the .NET Framework 1.1 Configuration to give all "Infopath Form Templates" Full Trust.
> 2) Installed my certificate in the "Trusted Root Certification Authorities (Certificates Folder)" for the certificate used in the form
>
> I STILL can't run my managed code under debug! What's wrong???
Alex Irazabal - 22 Jul 2004 04:26 GMT
AWESOME! Thanks alot.
> Check out this old newsgroup posting:
>
[quoted text clipped - 9 lines]
> >
> > I STILL can't run my managed code under debug! What's wrong???
Debugging Fully Trusted InfoPath Forms with Managed Code Business Logic
http://blogs.msdn.com/davfries/archive/2004/07/13/182648.aspx
Thanks,
Dave

Signature
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Sample code subject to http://www.microsoft.com/info/cpyright.htm
--
> I have done the following:
> Use the .NET Framework 1.1 Configuration to give all "Infopath Form Templates" Full Trust.
> 2) Installed my certificate in the "Trusted Root Certification Authorities (Certificates Folder)" for the certificate used in the form
>
> I STILL can't run my managed code under debug! What's wrong???