Re: Adding V3 webparts in ONET.xml



Okay, I figured this out at 1am this morning. What I did was start
over from scratch with a new test V2 web part. I didn't sign it, and
so just used the assembly name in the safe controls web.config entry.
I then placed the dll in the bin directory of the port 80 site. I
went to the newdwp.aspx page, and the web part was there! I then was
able to import and use it successfully.

Next, I signed the assembly, updated the safe controls entry to
include the public key, but did NOT install it into the Gac. I put
the dll in the bin directory again. This time the web part still
showed up in newdwp.aspx. BUT, when I tried to import it I got a
message that said that the assembly needed to be in a trusted location
like the bin directory or set the *AllowPartiallyTrustedCallers*
property to import the web part. Ah-hah! Now we're getting
somewhere. After doing some research, I found the property, and
updated the AssemblyInfo.cs file to include this entry:

[assembly: System.Security.AllowPartiallyTrustedCallers()]

After this, it worked! I then installed it into the Gac, and that
worked as well!

Hopefully this will help someone else.

Gary

.



Relevant Pages

  • Re: Moving object creation from COM to .NET
    ... As far as i know the assembly should be in the bin directory (or other ... or installed in the GAC ... >> I didn't really want to install the PublicWorksPlugin assembly into the ... How do I tell Load where the assemblies resides? ...
    (microsoft.public.dotnet.languages.vb)
  • Private Assemblies & Strong Names??
    ... I've signed a private assembly with a strong name and have deployed it in a web app's bin directory. ... There are various reasons why I prefer not to install these assemblies in the GAC. ... Is installing them in the GAC really my only option if I want the assembly to have a strong name? ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: wuauclt.exe stealing CPU constantly. No access to Windows Upda
    ... The "no name entry" has the location ... If the system can not access Windows Update *AFTER* checking the ... regsvr32 wuapi.dll ... Now try to install WindowsUpdateAgent30-x86.exe ...
    (microsoft.public.windowsupdate)
  • Re: ActiveSync error 85010014 yet again! Any suggestions?
    ... Uninstall ActiveSync ... an install of another application. ... Norton AntiVirus puts in an entry like this: ... disable Script blocking in that software ...
    (microsoft.public.pocketpc.activesync)
  • Invalid Cast exception on COM interop in Windows Service
    ... throws an "invalid cast" exception when it is run in a Windows Service. ... If this was an app/service difference it would seem more ... I'm copying everything from the bin directory when I grab the files to ... install the it on the other machine. ...
    (microsoft.public.dotnet.framework.interop)

Quantcast