If it's a COM Exception read my last post, I'm 99.9% certain one of
those three is right.  If it's related to k2 then i'm 100% sure :p

On Tue, Jul 28, 2009 at 5:07 PM, Chris
Milne<[email protected]> wrote:
> I had, however like I mentioned in my earlier post I was unsure about having
> the assembly name and namespace the same. Have changed these to be different
> in the external library project and I’ve got a bit further, it’s now giving
> me a COMException error specific to the external library functionality.
> Off-topic for here so I’ll take further investigation offline. J
>
>
>
> Simple in the end, thanks for everyone’s help!
>
>
>
> Kind regards,
>
>
>
> Chris Milne
>
>
>
>
>
>
>
>
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On Behalf Of Specker,
> Caroline
> Sent: Tuesday, 28 July 2009 4:36 PM
> To: [email protected]
> Subject: RE: Web part with dll reference [SEC=UNCLASSIFIED]
>
>
>
> Have you double checked the safe control entry to make sure it matches the
> dll exactly - in particular the public key token?
>
>
>
> -----Original Message-----
>
> From: [email protected] [mailto:[email protected]] On Behalf Of Chris Milne
>
> Sent: Tuesday, 28 July 2009 4:25 PM
>
> To: [email protected]
>
> Subject: RE: Web part with dll reference
>
>
>
> Hey Chris(tian) :)
>
>
>
> Nope, the externally-referenced assembly doesn't reference any other
>
> external assemblies, it only uses standard System namespace stuff.
>
>
>
> A tempting approach to install the external one separately, but I think
>
> in my case it'd be ideal to deploy them together. The external one is
>
> just a library that would never be used as a feature on its own, it
>
> would only be used when packaged with something else, a web
>
> part/workflow/something. I see where you're coming from though, I'll
>
> keep it in mind as an alternative. Cheers.
>
>
>
> Kind regards,
>
>
>
> Chris
>
>
>
>
>
>
>
> -----Original Message-----
>
> From: [email protected] [mailto:[email protected]] On Behalf Of
>
> [email protected]
>
> Sent: Tuesday, 28 July 2009 4:03 PM
>
> To: [email protected]
>
> Cc: [email protected]
>
> Subject: RE: Web part with dll reference
>
>
>
> chris, i think he meant your external reference assembly probably
>
> reference
>
> to another external reference assembly. I wouldnt deploy the external
>
> reference assembly with your solution but instead install them
>
> separately
>
> (if there is installation for it) but as jeremy suggested you can add
>
> the
>
> safe control entry from your deployment, but that's just me.
>
>
>
> BTW there are 4 chris' here LOL
>
>
>
> regards
>
>
>
> christian
>
>
>
>
>
>
>
>
>
> "Chris Milne"
>
> <chris.mi...@data
>
> aspects.com.au> To
>
> Sent by: <[email protected]>
>
> [email protected] cc
>
>
>
> Subject
>
> 07/28/2009 01:56 RE: Web part with dll reference
>
> PM
>
>
>
> Please respond to
>
> [email protected]
>
> Hey Chris,
>
>
>
> Worth a shot, but no, all references in that project are System.*.
>
> Cheers.
>
>
>
>
>
> Kind regards,
>
>
>
> Chris
>
>
>
> From: [email protected] [mailto:[email protected]] On Behalf Of Chris
>
> Tomich
>
> Sent: Tuesday, 28 July 2009 3:51 PM
>
> To: [email protected]
>
> Subject: Re: Web part with dll reference
>
>
>
> Hi Chris,
>
>
>
> Shot in the dark here but does your externally referenced assembly have
>
> references to other assemblies that you aren't deploying?
>
>
>
> Kind Regards,
>
> Chris Tomich
>
> On Tue, Jul 28, 2009 at 1:44 PM, Chris Milne <
>
> [email protected]> wrote:
>
>
>
>
>
> Thanks Jeremy [update: and Sezai].
>
>
>
>
>
>
>
>
>
>
>
> Yep, sorry, ‘tis VSeWSS 1.3 CTP using WSP.
>
>
>
>
>
>
>
>
>
>
>
> Copy Local is set to true on my reference and it does indeed deploy both
>
> my
>
> web part and referenced assembly to c:\windows\assembly\.
>
>
>
>
>
>
>
>
>
>
>
> I tried manually adding a <SafeControl> entry to the web.config for my
>
> referenced assembly to no avail, same result.
>
>
>
>
>
>
>
>
>
>
>
> Also found in SP log:
>
>
>
>
>
> http://server/chris/default.aspx - An unexpected error has been
>
> encountered
>
> in this Web Part. Error: This page has encountered a critical error.
>
> Contact your system administrator if this problem persists.
>
>
>
>
>
>
>
>
>
>
>
> which unfortunately is no more exciting than what I’m seeing on the
>
> page.
>
> Have followed this post to turn on extra debug info, am now seeing this
>
> on
>
> page:
>
>
>
>
>
>
>
>
>
>
>
> Web Part Error: A Web Part or Web Form Control on this Page cannot be
>
> displayed or imported. The type could not be found or it is not
>
> registered
>
> as safe.
>
>
>
>
>
> Show Error Details
>
>
>
>
>
> Hide Error Details
>
>
>
>
>
>
>
> [UnsafeControlException: A Web Part or Web Form Control on this Page
>
> cannot
>
> be displayed or imported. The type could not be found or it is not
>
> registered as safe.]
>
> at
>
> Microsoft.SharePoint.ApplicationRuntime.SafeControlsGetTypeFromGuid
>
> (Guid guid)
>
> at
>
> Microsoft.SharePoint.WebPartPages.SPWebPartManager.CreateWebPartsFromRow
>
> SetData
>
> (Boolean onlyInitializeClosedWebParts)
>
>
>
>
>
>
>
>
>
>
>
> So not found or not safe.. hmm. Both assemblies now have <SafeControl>
>
> entries and are in c:\windows\assembly\.
>
>
>
>
>
>
>
>
>
>
>
> In my external library, my assembly name is the same as my default
>
> namespace, is this allowed/problematic?
>
>
>
>
>
>
>
>
>
>
>
> Kind regards,
>
>
>
>
>
>
>
>
>
>
>
> Chris
>
>
>
>
>
>
>
>
>
>
>
> From: [email protected] [mailto:[email protected]] On Behalf Of Jeremy
>
> Thake
>
> Sent: Tuesday, 28 July 2009 3:01 PM
>
> To: [email protected]
>
> Subject: RE: Web part with dll reference
>
>
>
>
>
>
>
>
>
>
>
> So are you using the VSeWSS 1.3 CTP when you say Visual Studio projects?
>
>
>
>
>
>
>
>
>
>
>
> I’m assuming you must be using a WSP if its automatically adding the
>
> SafeControl entry.
>
>
>
>
>
>
>
>
>
>
>
> The reason you’re probably getting this error is because you need to
>
> ensure
>
> you deploy the external library with the package. To do this, ensure you
>
> have Copy Local set to true in the properties. If it’s VSeWSS you’re
>
> using,
>
> you can check the manifest.xml file and see whether an Assembly element
>
> has
>
> been added for it. Also you can check it’s deployed by going to
>
> c:\windows
>
> \assembly and ensuring the dll is in there ;-)
>
>
>
>
>
>
>
>
>
>
>
> Jeremy Thake
>
>
>
>
>
> Readify | Senior Consultant
>
>
>
>
>
> M: +61 400 767 022 | E: [email protected] | W: www.readify.net
>
>
>
>
>
>
>
>
>
>
>
> From: [email protected] [mailto:[email protected]] On Behalf Of Chris
>
> Milne
>
> Sent: Tuesday, 28 July 2009 12:41 PM
>
> To: [email protected]
>
> Subject: Web part with dll reference
>
> ________________________________
> Support procedure: https://www.codify.com/lists/support
> List address: [email protected]
> Subscribe: [email protected]
> Unsubscribe: [email protected]
> List FAQ: http://www.codify.com/lists/ozmoss
> Other lists you might want to join: http://www.codify.com/lists
>
>
>
>
>
>
>
>
>
>
>
> Afternoon all,
>
>
>
>
>
>
>
>
>
>
>
> I’m developing a web part in which I would like to reference
>
> functionality
>
> that exists in one of our other company Visual Studio projects (.net
>
> assembly/dll). I’m having trouble doing this and hoping someone can
>
> point
>
> me in the right direction J I’ve created a simple VS web part project
>
> which works if I deploy it just by itself (not using the library
>
> functionality). I then added a reference to my dll, added a ‘using’
>
> to
>
> import the namespace into my code (if I deploy again at this point it
>
> still
>
> works), but if I add one line of code that uses the external library
>
> into
>
> CreateChildControls() and deploy, I get a generic ‘Error An Unexpected
>
> error has occurred’ message on a page the webpart exists on.
>
>
>
>
>
>
>
>
>
>
>
> Visual Studio is automatically adding a <SafeControl Assembly=..> to my
>
> web.config for my web part assembly but not the external library
>
> assembly,
>
> do I need to add that? Both assemblies are automatically being added to
>
> the GAC. Any help is appreciated!
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Kind regards,
>
>
>
>
>
>
>
>
>
>
>
> Chris
>
>
>
>
>
>
>
> Support procedure: https://www.codify.com/lists/support
>
> List address: [email protected]
>
>
>
>
>
> Subscribe: [email protected]
>
>
>
>
>
> Unsubscribe: [email protected]
>
>
>
>
>
> List FAQ: http://www.codify.com/lists/ozmoss
>
>
>
>
>
> Other lists you might want to join: http://www.codify.com/lists
>
>
>
>
>
>
>
> Support procedure: https://www.codify.com/lists/support
>
> List address: [email protected]
>
>
>
>
>
> Subscribe: [email protected]
>
>
>
>
>
> Unsubscribe: [email protected]
>
>
>
>
>
> List FAQ: http://www.codify.com/lists/ozmoss
>
>
>
>
>
> Other lists you might want to join: http://www.codify.com/lists
>
>
>
> Support procedure: https://www.codify.com/lists/support
>
> List address: [email protected]
>
> Subscribe: [email protected]
>
> Unsubscribe: [email protected]
>
> List FAQ: http://www.codify.com/lists/ozmoss
>
> Other lists you might want to join: http://www.codify.com/lists
>
>
>
>
>
> Support procedure: https://www.codify.com/lists/support
>
> List address: [email protected]
>
> Subscribe: [email protected]
>
> Unsubscribe: [email protected]
>
> List FAQ: http://www.codify.com/lists/ozmoss
>
> Other lists you might want to join: http://www.codify.com/lists
>
>
>
>
>
> Support procedure: https://www.codify.com/lists/support
>
> List address: [email protected]
>
> Subscribe: [email protected]
>
> Unsubscribe: [email protected]
>
> List FAQ: http://www.codify.com/lists/ozmoss
>
> Other lists you might want to join: http://www.codify.com/lists
>
>
>
>
>
> =====================================================================
>
>
>
> Disclaimer:
>
>
>
> This message is intended only for the use of the person to whom it is
>
> expressly addressed and may contain information that is confidential and
>
> legally privileged. If you are not the intended recipient, you are
>
> hereby
>
> notified that any use, reliance on, reference to, review, disclosure or
>
> copying of the message and the information it contains for any purpose
>
> is
>
> prohibited. If you have received this message in error, please notify
>
> the
>
> sender by reply e-mail of the misdelivery and delete all its contents.
>
>
>
> Opinions, conclusions and other information in this message that do not
>
> relate to the official business of the Company shall be understood as
>
> neither given nor endorsed by
>
> it.---------------------------------------------------------------------
>
> -----------
>
> Support procedure: http://www.codify.com/lists/support
>
> List address: [email protected]
>
> Subscribe: [email protected]
>
> Unsubscribe: [email protected]
>
> List FAQ: http://www.codify.com/lists/ozmoss
>
> Other lists you might want to join: http://www.codify.com/lists
>
>
>
>
>
>
>
> --------------------------------------------------------------------------
>
> ------
>
> Support procedure: http://www.codify.com/lists/support
>
> List address: [email protected]
>
> Subscribe: [email protected]
>
> Unsubscribe: [email protected]
>
> List FAQ: http://www.codify.com/lists/ozmoss
>
> Other lists you might want to join: http://www.codify.com/lists
>
>
>
>
>
>
>
>
>
> *************************************************************************
>
> The information contained in this e-mail, and any attachments to it,
>
> is intended for the use of the addressee and is confidential. If you
>
> are not the intended recipient you must not use, disclose, read,
>
> forward, copy or retain any of the information. If you received this
>
> e-mail in error, please delete it and notify the sender by return
>
> e-mail or telephone.
>
>
>
> The Commonwealth does not warrant that any attachments are free
>
> from viruses or any other defects. You assume all liability for any
>
> loss, damage or other consequences which may arise from opening
>
> or using the attachments.
>
>
>
> The security of emails transmitted in an unencrypted environment
>
> cannot be guaranteed. By forwarding or replying to this email, you
>
> acknowledge and accept these risks.
>
> *************************************************************************
>
>
>
> --------------------------------------------------------------------------------
>
> Support procedure: http://www.codify.com/lists/support
>
> List address: [email protected]
>
> Subscribe: [email protected]
>
> Unsubscribe: [email protected]
>
> List FAQ: http://www.codify.com/lists/ozmoss
>
> Other lists you might want to join: http://www.codify.com/lists
>
>
--------------------------------------------------------------------------------
Support procedure: http://www.codify.com/lists/support
List address: [email protected]
Subscribe: [email protected]
Unsubscribe: [email protected]
List FAQ: http://www.codify.com/lists/ozmoss
Other lists you might want to join: http://www.codify.com/lists

Reply via email to