Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 16th, 2008, 06:37 PM
Registered User
 
Join Date: Feb 2008
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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

Reply With Quote
  #2 (permalink)  
Old September 4th, 2008, 12:57 PM
Registered User
 
Join Date: Sep 2008
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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?


Reply With Quote
  #3 (permalink)  
Old September 4th, 2008, 01:21 PM
Registered User
 
Join Date: Sep 2008
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.

Reply With Quote
  #4 (permalink)  
Old September 4th, 2008, 03:06 PM
Registered User
 
Join Date: Sep 2008
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Best Picks Revisited - Example not working shalesh BOOK: Professional Ajax ISBN: 978-0-471-77778-6 6 November 3rd, 2006 10:40 AM
Insert Issue revisited cedwards Dreamweaver (all versions) 13 June 21st, 2005 03:02 PM
Excel Text Imports Revisited bph Access 5 April 1st, 2004 07:35 AM



All times are GMT -4. The time now is 06:15 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.