Re: Word 2003 with VSTO 2003 stops working when .Net Framework Beta 2 is installed



Misha,

I had the same problem as Laurent. I tried to migrate all of the security
policies using caspol of version 2, but it still did not work. The real
issues seem to relate to the reason for the upcoming patch in Office 2003
SP2.

My workaround is much too brute force for my taste as well, but it was the
only way I could get it to work. I have since removed the workaround as I
finally have all of my solutions working on VSTO 2005 Beta 1 (now TRYING to
move to Beta 2!).

Chuck

"Laurent Kempé" <laurent.kempe@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:72b6183783b6b8c714aeb24b80d0@xxxxxxxxxxxxxxxxxxxxx
> Hello,
>
> Thanks a lot to everybody for the answer. I used as a quick fix the
> workaround suggested by Chuck.
> But I have to say that I agree with you Misha.
> I tried just before seeing your answer to add fulltrust to my different
> assemblies using caspol of version 2.
> But it doesn't work even if caspol said that I was successfully
> configuring it.
> As I don't see the equivalent of mscorcfg.msc in the Beta 2, I will have
> to dig more in caspol I guess.
>
> Good to know about the patch in SP2 because it is really boring. I hope we
> will get it fast.
>
> Best Regards,
> ---
> Laurent Kempé - laurent.kempe@xxxxxxxxxxxxxxxxxxxx
> Tech Head Brothers - http://www.TechHeadBrothers.com
> Blog - http://weblogs.asp.net/lkempe
> [Microsoft ASP.NET MVP]
>
>> The workaround suggested by Chuck is too brute force to my taste. I
>> would rather do something else. So bear with me for an explanation of
>> what is really happening.
>>
>> VSTO loader (aka OTKLoader) that shipped with Office 2003 RTM would
>> always load the latest runtime installed on the machine. Once you
>> install .NET Fx 2.0 this runtime will be loaded. Each version of CLR
>> runtime has its own CAS policy settings. Note also that installinng
>> .NET Fx 2.0 would not migrate security policies from .NET Fx 1.1. So,
>> the real problem is that your code simply does not have permission to
>> load once .NET Fx 2.0 is installed.
>>
>> The brute force solution is of course to force loading v1.1 version of
>> CLR through the config file.
>> But this will rule out the usage of VSTO 2005 since VSTO 2005 runtime
>> requires CLR 2.0 to run and you can not have both versions of CLR
>> running at the same process. Unfortunately, I should add.
>> So, I would suggest to manually migrate Fx 1.1 security policies to Fx
>> 2.2.
>> I know this is painful, but this is the least bad solution for now.
>> I am not sure I can disclose the full details but before VS 2005 ships
>> we will see an Office 2003 SP2 coming out. The SP will contain a patch
>> for OTKLoader that would not require migrating security policies from
>> 1.1 to 2.0 even though the 2.0 version of CLR will be loaded on the
>> machine.
>>
>
>


.



Relevant Pages

  • RE: Hi Richard Blewett, regarding the CAS post earlier on!
    ... Are you sure caspol can switch off this: ... Or it removes off the security policy set on the ... "Chua Wen Ching" wrote: ... > Oh i didn't know you can set off the security in CAS. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Word 2003 with VSTO 2003 stops working when .Net Framework Beta 2 is installed
    ... I tried just before seeing your answer to add fulltrust to my different assemblies using caspol of version 2. ... Once you install .NET Fx 2.0 this runtime will be loaded. ... Each version of CLR runtime has its own CAS policy settings. ... I would suggest to manually migrate Fx 1.1 security policies to Fx ...
    (microsoft.public.vsnet.vstools.office)
  • Re: network share security - mscorlib
    ... My opinion has been that CASPOL takes effect on the machine it is executed ... the resulting .exe's from the network. ... when I did try I found I had security problems in both areas. ... In Internet Explorer, ...
    (microsoft.public.dotnet.security)
  • RE: deploying app with existing COM
    ... use a SCRUN.DLL(a common com dll) to do some job, ... get exception. ... To isolate if the problem is caused by the CLR security check or underlying ... we can try to use the caspol tool to shut down the clr ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Role-based-Security... just switch it off
    ... Users with administrative privileges can do everything to your system or your application. ... generic user, define roles and a generic principal during startup of ... But if I open a command line and type "caspol -security off" everybody ... What is an elegant way to make sure, that my security policies cannot ...
    (microsoft.public.dotnet.security)