Wrox Programmer Forums
|
ASP.NET 4 General Discussion For ASP.NET 4 discussions not relating to a specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 4 General Discussion 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 August 24th, 2012, 01:56 PM
Authorized User
 
Join Date: Sep 2011
Posts: 41
Thanks: 3
Thanked 4 Times in 3 Posts
Default AspNetXmlSiteMapProvider error

Hi,

This is a bit convoluted to explain ... I'll try my best.

PROBLEM: On the design page, when I wrap some code in AJAX (e.g., Update Panel), the entire section that the Update Panel covers gets cloaked under an Error Box:

http://koreaville.info/debug/aspNetXmlError.jpg

If I comment out the AJAX code, the error box disappears and my stuff reappears on the design page.

BACKGROUND: I'm working on a site originally built by an outside vendor. They built parts of it separately, compiled it, and the DLLs are referenced in this website. The DLLs exist and everything works/runs fine. It's just that in development, I can't see inside the error box and thus, I have to comment out the AJAX code, so that the error box goes away, and then I can see and edit in the design GUI. (*note: even with the AJAX enabled, I can still edit the mark-up directly, but it helps to see things rendered on the design page right away). Then when I'm ready to put it live, I uncomment the AJAX stuff and it runs fine in production. So the problem is mainly an issue of the error box hindering development because it covers up stuff on the design page.

Here is the web.config:
Code:
<siteMap defaultProvider="WebBlocksSiteMapProvider">
			<providers>
	<add name="AdminXmlSiteMapProvider" type="WebBlocks.Admin.AdminXmlSiteMapProvider" siteMapFile="~/Admin/Admin.sitemap" securityTrimmingEnabled="true"/>
	<add name="WebBlocksSiteMapProvider" type="WebBlocks.WebBlocksSiteMapProvider"/>
			</providers>
		</siteMap>
Here is what I tried (new stuff is italicized) but I don't understand enough about this siteMap element, combined with the website referencing compiled DLLs, etc. to really know what/why I'm doing ... this is based on diligence on the web:

Code:
<siteMap defaultProvider="AspNetXmlSiteMapProvider">
			<providers>
        <clear/>
        <add name="AspNetXmlSiteMapProvider" type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" siteMapFile="~/Admin/Admin.sitemap" securityTrimmingEnabled="true"/>
				
           <add name="AdminXmlSiteMapProvider" type="WebBlocks.Admin.AdminXmlSiteMapProvider" siteMapFile="~/Admin/Admin.sitemap" securityTrimmingEnabled="true" />
	   <add name="WebBlocksSiteMapProvider" type="WebBlocks.WebBlocksSiteMapProvider" />        
			</providers>
		</siteMap>

I've spent a lot of time doing DD on this ... but am still stuck so I thought I'd ask the experts ...
 
Old August 24th, 2012, 02:13 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Wild guess: have you tried adding a reference to the assembly (.dll file) that contains the AdminXmlSiteMapProvider class in your Visual Studio project?

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old August 24th, 2012, 05:01 PM
Authorized User
 
Join Date: Sep 2011
Posts: 41
Thanks: 3
Thanked 4 Times in 3 Posts
Default

As far as I can tell, the DLLs are all in the /Bin folder of the main website (which I'm working on). This means that they are referenced, otherwise, they would not be listed here, right?

Is it because it references the DLL, rather than the original source code, that causes a problem in development mode? Just guessing myself ...

MORE INFO: There's already a bunch of custom controls built in the existing website. All of these are covered up by the AspNetXMLSiteMapProvider Error message box as well. But the website runs fine when you I run it either in dev or production. As for my stuff, this happened when I added an Update Panel (ajax) and then it occurred again when I used the RoundedCornersExtender from the AJAX Toolkit (ajax) ... both times, I have to comment out the AJAX code to see the stuff in GUI/design mode ... it's just a pain having to comment stuff out on the dev side and then remove comments when moving to a live server ...

Sorry, I guess this kind of prob gets more complex (although the solution is probably not complex) and is not a basic/routine type of issue ...

- nano
 
Old August 24th, 2012, 05:38 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Is this a web site project or a web application project?

In the latter case, just putting them in the bin is not enough. They'll be found at run time but you may also need to reference them explicitly for design tme support.

Also, your pages (or web.config) may need an @control reference pointing to the the assembly and namespaces of your controls for design time support to work properly.

It's all a bit of a guess as it's hard to see what's going on without knowing your project....

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING ngchpg BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 July 16th, 2012 03:28 AM
SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified soufya BOOK: Beginning ASP.NET 4 : in C# and VB 7 September 14th, 2011 08:08 AM
HTTP error 500: Internal Server Error in Load Testing sherin Visual Studio 2008 0 May 19th, 2010 09:02 AM
Getting error XML Parsing Error: junk after document element anarleti XSLT 10 March 17th, 2010 08:43 AM
Insert Query Error & Run-Time Error 3022 DavidWE Access 1 July 31st, 2008 11:17 AM





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