Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...WebConfig Problem: Does Spacing Matter?WebConfig Problem: Does Spacing Matter?
Previous
 
Next
New Post
7/1/2007 1:50 AM
 

This may just be the dumbest question I have asked, but I must ask it:  Does the spacing scheme within the web.config file matter?

I thought there is perhaps a 'best practices' to organize sections of the file, so the tabbing/spacing scheme is just stylistic programmer practice. But every time I go in there, I break it.  :) Here's what I am trying to do:

I'm trying to get a site map installed the will index the blog, too. I tried the BiteTheBullet one (and posted about my problems here), but couldn't get it to list a single page, though no other errors.  I came across THIS solution that sounds exactly what I am looking for.  I downloaded the dlls, put them in the bin, followed the 3-4 web.config changes.  Site down.

I tried again.  Didn't work.  I then tried to isolate where I went wrong.  1.) Dropped in the dlls and tried it..site still works. 2.) Dropped in the first section under the configsections..site worked. 3.) Dropped in the htmlhandler section..site worked. 4.) Dropped int he last section googlesitemap section...broken. I tried to simply remove exactly what I dropped in...broken.  I uploaded the web.config again and closed my browser and deleted my cache and all...site still broken. I cut and past the last 3-4 lines from my web.config backup into the web.config I was playing with and it worked.  Before doing so, however, the last 3 lines were EXACTLY the same, save the spacing/tab scheme, as when I use backspace/delete, it changes the appearance.

I only ask, as I have this problem every single time I try to modify my web.config...

Perhaps the core team would consider a better, more google friendly sitemap in future releases?  My 'newbieness' caused me to lose another night of production struggling to get a damn site map built.  :) 

 {Edit} PS...was using notepad, too, which might not be a best practice: for easy cutting-and-pasting, I find it easier to open and drop the text in, rather than wait for VS to load, etc...perhaps this is my problem? It must be something I am doing...even simple changing the remoteonly customerror tag to Off won't generate the error anymore...never can get them to display.

 

 
New Post
7/1/2007 2:05 AM
 

Okay, try again...same deal.  Here's the rub:

 

I remove the last google lines I dropped in, so the last two lines of the web.config are:

  </dotnetnuke>
</configuration>

 

After removing the google lines and uploading to the server, the site is still down.  So I cut-and-paste ONLY the same two closing lines from my backup file, voila...site's up. It's almost as if some junk is being encoded with the text, but that's not the case with notepad.  Could someone explain this to a rookie, please?  :) 

 

 
New Post
7/1/2007 3:50 AM
 

.NET ignores spaces and tabs so it does NOT matter. It looks like you're putting the new entry in the wrong spot in your web.config. Also, modifying your web.config for a DNN module to work is not best practice. However, upgrading DNN to new versions requires a complete replacement of the web.config which I think is wrong also, go figure.


Jason Honingford - Web & Software Developer
www.PortVista.com
 
New Post
7/1/2007 9:05 AM
 

Actually, adding a provider to DNN is done in exactly this way, by adding it to the web.cofig.

I didn't follow the whole article, but wasn't there a section definition entry, a section entry AND a provider entry for the setup?

"This entry tells ASP.NET that there is a configuration section called 'googlesitemaps' when the in-built Google Sitemap HttpHandler is called, which brings us to the next entry required, the HttpHandler. "

Did you remove all of them? Just out of curiosity because I haven't tried it. If you remove the section and not the section name definition, you'll get behaviour like that I image. The application would be looking for a section that doesn't exist, no?

But I can tell you only from experience that using Notepad to modify your web.config (as I routinely do) shouldn't be causing your issue.

 
New Post
7/3/2007 8:36 AM
 
Kinda off topic: I'm probably the odd ball who thinks relying on the web.config is wrong. The problem is when you upgrade you have to keep track of what changes you made to the web.config and redo all those changes. Now if you run a server with 20 DNN installs, you're in for a long weekend. One DNN website you're ok. If DNN would find a way to use the same web.config for upgrades it would solve the problem.

Jason Honingford - Web & Software Developer
www.PortVista.com
 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...WebConfig Problem: Does Spacing Matter?WebConfig Problem: Does Spacing Matter?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out