Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 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
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 19th, 2007, 06:14 AM
Registered User
 
Join Date: Oct 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Global Settings problem

Hi,

I was hoping that I would not need to post here, but I'm unable to see the problem. The side is mostly built on this book and the problem is the following:

If I run the following command:

Article objArticle = Article.GetArticleByID(nArticleID);

I get the following error:

Unable to cast object of type 'CSO.UI.SectionName' to type 'CSO.UI.SectionName'.

from some unknown reason the Settings variable is empty
public readonly static SectionName Settings = (SectionName)WebConfigurationManager.GetSection("c ustomSection");

Break point on ArticleProvider Instance,
 m_frpInstance = (ArticleProvider)Activator.CreateInstance(
                      Type.GetType(Globals.Settings.Article.ProviderType ));

Globals.Settings The type 'CSO.UI.Globals' exists in both '{7A3711C9-C948-4DF0-A2FC-47D933E5F87C}' and '{A7A93000-C512-49F8-8EDD-16749DB05919}'



Any ideas would be great ? Thanks.

  #2 (permalink)  
Old October 25th, 2007, 12:27 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Atlanta, Georgia, USA.
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You've went far enough to see the issue - it sounds like you may have an old .cs file laying around in app_code, or an old assembly in bin?

Eric

 


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
How to declare the global variable in global.asax? calyn_gately ASP.NET 3.5 Basics 0 August 6th, 2008 08:06 PM
problem with image settings..... kethireddy435 ASP.NET 1.x and 2.0 Application Design 1 October 13th, 2007 09:35 AM
Changing Settings.settings when assembly is in GAC evandro.paula .NET Framework 2.0 0 September 25th, 2007 09:54 AM
Problem coming while declaring global variables deeptisingh20 ASP.NET 1.0 and 1.1 Basics 2 November 18th, 2005 06:38 PM
Ch 10 Problem with global.asax Kris BOOK: Beginning ASP.NET 1.0 6 May 11th, 2005 09:37 AM



All times are GMT -4. The time now is 08:45 AM.


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