|
|
 |
BOOK: Real World SharePoint 2007 (SharePoint MVP) ISBN 978-0-470-16835-6
 | This is the forum to discuss the Wrox book Real World SharePoint 2007: Indispensable Experiences From 16 MOSS and WSS MVPs by Scot Hillier, Robert Bogue, Adam Buenz, Andrew Connell, Stacy Draper, Luis Du Solier Grinda, Todd Klindt, Jason Medero, Dustin Miller, Shane Perran, Joris Poelmans, Heather Solomon, Nick Swan, Jan Tielens, Mike Walsh, Shane Young; ISBN: 9780470168356 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Real World SharePoint 2007 (SharePoint MVP) ISBN 978-0-470-16835-6 section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |

February 16th, 2008, 06:37 PM
|
|
Registered User
|
|
Join Date: Feb 2008
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
CalculatorWrapper Revisited
I am not moving on to another book! hehehe
I have added the files SimpleCalculator.aspx and SimpleCalculator.aspx.cs to the usercontrols folder. All functions as I would expect until I actually add the webpart.
Then Sharepoint gets REALLY mad and gives me a screen that allows me to delete the webpart. It is really quite surprising how well it deals with this error.
Did anyone else get this error?
RJ
|

September 4th, 2008, 01:57 PM
|
|
Registered User
|
|
Join Date: Sep 2008
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I haven't given up either....yet.
Obviously we have to make the Simple calculator dll available to the site to make the user control work. Would adding it to the GAC make it happen? My hope is yes. Still trying to figure out how to do that.
When I use the web part sharepoint extension it deploys the wrapper dll to the GAC and modifies the web config all for me so for the user control I've got to figure out how to strongly sign a dll and add it to the GAC and then maybe it will work?
|

September 4th, 2008, 02:21 PM
|
|
Registered User
|
|
Join Date: Sep 2008
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Alright a tad frustrated now.
Got my SimpleCalculator.ascx in my usercontrols folder and went back and added strong signing to the control, rebuilt, copied the dll to the GAC in c:\windows\assemblies got the public key from that dll's properties went to the web.config and added a line to the 'safecontrol' with the appropriate namespace, public key, etc. - and lo and behold still a parser error that says "could not load type 'SimpleCalculator.SimpleCalculator'", alas this is discouraging.
|

September 4th, 2008, 04:06 PM
|
|
Registered User
|
|
Join Date: Sep 2008
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Alright good news.
It appears all you need to do is copy the SimpleCalculator dll from your project folder to the bin directory in you site directory. I don't even think you need an additional line in the web.config which is confusing to me bc I thought IIS would execute any code it didn't deem as safe in the web.config. I don't even know if signing is necessary.
As far as the GAC is concerned, my guess is that the server reference at the top of the ascx file would need to point to somewhere else that tells it the DLL is in the GAC, it doesn't appear to automatically look there by default. Hope that helps.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |