Office Dev help pls pls

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...
 
D

Derrick

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
 
Z

Zamolxe Zamolxes

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
 
D

Derrick

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).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top