I'm developing an InfoPath solution in Visual Studio.NET 2003. I need to
access the file system and registry, but whenever I do that, I get an
annoying error, telling me that I'm not allowed to. Why is this
happening when I *develop* my form? It makes it extremely cumbersome to
debug full-trust forms. So far, I had to go through all the steps to
publish the form using formreg.exe to see what happens. Is there some
way to over-ride security exceptions while developing?
Gustaf
Hi Gustaf,
Dev time and publishing are 2 different things, right?
If you changed the security level of your form to Full Trust, that you
removed the publishedurl from your manifest, then all you need is a small js
file in your Managed Code project folder with the following:
oApp = WScript.CreateObject("InfoPath.ExternalApplication");
strAbsolutePath = "C:\\your project path here\\manifest.xsf"
oApp.RegisterSolution(strAbsolutePath,"overwrite");
Just double click on the js once you created it.
Now, your FT form should be correctly registered on your dev machine.
If you need to test deployment, do it on a separate test machine.
Hope that it helps.
Regards,
Franck Dauché
> I'm developing an InfoPath solution in Visual Studio.NET 2003. I need to
> access the file system and registry, but whenever I do that, I get an
[quoted text clipped - 5 lines]
>
> Gustaf
Gustaf - 15 Nov 2005 11:49 GMT
Many thanks Franck,
This makes perfect sense. Got it working now. :-) I noticed that the
RegisterSolution() method makes the form appear in:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\11.0\InfoPath\SolutionsCatalog\
Do you happen to know if this is the *only* place that is affected? I
hope so, because I need to write a custom setup program to install these
forms on target computers.
Gustaf
Franck Dauché - 15 Nov 2005 14:38 GMT
Hi Gustaf,
Glad I could help.
Yes, the key that you mentioned is the place where urn for a fully trusted
form is stored. You can manually register or unregister templates locally by
adding / deleting entries at that location.
Regards,
Franck Dauché
> Many thanks Franck,
>
[quoted text clipped - 8 lines]
>
> Gustaf