Re: Adding V3 webparts in ONET.xml
- From: "Gary" <ggalehouse@xxxxxxxxxx>
- Date: 18 Mar 2007 07:53:45 -0700
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
.
- References:
- Adding V3 webparts in ONET.xml
- From: Gary
- Re: Adding V3 webparts in ONET.xml
- From: Gary
- Re: Adding V3 webparts in ONET.xml
- From: Gary
- Adding V3 webparts in ONET.xml
- Prev by Date: SPAuditEntry Machine IP
- Next by Date: Re: Combined full text search / field based search
- Previous by thread: Re: Adding V3 webparts in ONET.xml
- Next by thread: Re: Web service consuming got 401 error
- Index(es):
Relevant Pages
|