Office Dev help pls pls

  • Thread starter Thread starter Zamolxe
  • Start date Start date
Z

Zamolxe

fter creating a Office prj in C# this error appears is the wordDoc is
oppened, if the prj is compiled and runed from the IDE the WORD is
opening and after a nanosec it closes.
How can I fix this. I have installed them in the folowing order:
1.VS Arhitect 2003
2.Office2003PRO(FULL, and I mean FULL with .NET support)
3.SQL Server200
4.Officetools from the .NET dvd


The current .NET security policy does not permit testWordProject to run
from the folder .\testWordProject_bin\. Do not change the security
policy in your computer. The .Net security policy is controlled by
your administartor or the developer who wrote the custom macros.
........bla bla...
 
Zamolxe said:
fter creating a Office prj in C# this error appears is the wordDoc is
oppened, if the prj is compiled and runed from the IDE the WORD is
opening and after a nanosec it closes.
How can I fix this. I have installed them in the folowing order:
1.VS Arhitect 2003
2.Office2003PRO(FULL, and I mean FULL with .NET support)
3.SQL Server200
4.Officetools from the .NET dvd


The current .NET security policy does not permit testWordProject to run
from the folder .\testWordProject_bin\. Do not change the security
policy in your computer. The .Net security policy is controlled by
your administartor or the developer who wrote the custom macros.
.......bla bla...

Did you move the assembly from the development location? When you create a
new office project, VS.NET automatically sets up the appropriate security
policy, which is tied to a specific folder (in your case, Execution
privilage is given to the testWordProject_bin, and Full Trust is given to
your testWordProject.dll inside that folder). If you move your assemblies,
you need to set up the security policy again manually.

You say you're running it from the IDE, so maybe you haven't moved anything.
Do you have any other assemblies (references) in the folder? If so, they
may need to be given Full Trust by the security policy as well.

Derrick
 
No i havent moved it and the policy is set ok because I checked and
still doesnt work

I havent eaven write a single line of code.I have created the project
and compiled, then opened the excel file, and boom the error.
PLS HELP I REALLY NEED THIS
 
Well, according to the error you gave, the problem lies with the security
policy somewhere. Is your project located somewhere that may have further
security restrictions? IIRC, if a directory is subject to multiple security
policy entries, I believe Windows uses the most restrictive. So just
because VS.NET sets the appropriate policy on your directory, there may be
another entry that is more restrictive and preventing you from running your
program.

Another thing you could try is modifying the policy generated by VS.NET to
give the directory Full Trust (instead of just execution).
 
Back
Top