Wrox Programmer Forums
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
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.

 
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





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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.