Web.Config Parser Errors on Multiple Application Starting Points

Discussion in 'General troubleshooting' started by wlarimore, Nov 13, 2009.

  1. Hey guys,

    I want to thank you for this great hosting service to the community. It is an incredible and flexible offering at a low price point and monthly payment plan. Well done.

    I am having a problem after migrating my files from wh4l. I believe it is related to sharing multiple web.config files across my Web Application Starting Points.

    At my previous hosting service I had a seperate blog (subtext), a DNN portal and an ASP.NET web application at the root (redirecting to multiple domains).

    My folder structure on the previous hosting service was like this:

    / for main asp.net web site with a /bin folder for code-behind dll's
    /blog for my blog
    /portal for the DNN install

    My problem is when all web.config files are implemented I am getting errors. When my root web.config file is disabled (renamed to web1.config) my blog will work fine. If it is disabled my blog throws this error:

    HTTP Error 500.19 - Internal Server Error
    The requested page cannot be accessed because the related configuration data for the page is invalid.

    Config Source [line 21 is highlighed]
    20: <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
    21: <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
    22: <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">

    Any way to work around this issue when one has multiple standalone web applications wanting to use their own web.config files?

    Wayne Larimore
  2. Ray


    Have you set the subfolders where you other applications are uploaded to as application folders? You can do this within your control panel/Site Info Manager/Application Starting Point.
  3. I have created a Path for /blog inside the Application Starting Point section.
    Is that all that is needed?
    Or do I need to also place a Response.Redirect in my root asp.net application?
  4. Ray


    That should be it. I just pulled up 'waynester.net/blog' and it seems to be publishing correctly.
  5. Yes, it does work currently because it is my most important site. I renamed the root web.config to be web1.config in order for it to work. My main site http://www.waynester.net [pointed to my root] does not work if I rename the web1.config file to web.config.
  6. Ray


    The error...

    Object reference not set to an instance of an object.

    Means that you are not instantiating what ever object you are calling to. Make sure that the variables are defined correct and that they are being called correctly.

    If this application requires a database make sure that the database is created and that the objects and tables within that database are created and populated properly.
  7. The 'object referrence' is occuring due to the web.config file not being available, I renamed it.
    I have just renamed it back to web.config and waynester.net now works, HOWEVER, my blog http://www.waynester.net/blog is now throwing an error.
    Please look at the error and see if you can shed some light on it.

    Thanks for troubleshooting.
  8. Ray


    Check your web.config file under blog and make sure you do not have 'scriptResourceHandler' defined twice.

    Config Error There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined
  9. ***[Update]***
    I figured out how to resolve the web.config inheritance issue with IIS 7.

    This is how I did it:

    • Recompiled subText 212 solution as an ASP.NET 3.5 build
      • It was previously an 2.0 build, makes a big difference

    • ftp'd the files inside my /blog folder with it being the starting point

    • Made sure that Full Trust was set inside the web.config file

    • Inside the Main host web.config I wrapped the following tag outside the <system.web> node

      • <location inheritInChildApplications="false">

    Hope this helps others experiencing this frustrating issue

    Wayne Larimore
  10. Thanks for posting the follow-up!
  11. I also had the message "There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined." I was compiling with ASP.NET 3.5 and hosting with 4.0. I changed to compile with 4.0, and all is well.
  12. Good info to have out there, thanks.

Share This Page