web.cofig

Last post 11-11-2009 3:49 AM by Thomas Sun – MSFT. 6 replies.

Sort Posts:

  • web.cofig

    11-06-2009, 1:19 PM

    My parent appliaction is made in ASP.net 2.0.

    can we run any appliaction made in asp.net 3.5 inside the parent appliaction.

    it is not running when i do this.

  • Re: web.cofig

    11-06-2009, 1:39 PM
    Answer
    • All-Star
      28,061 point All-Star
    • bmains
    • Member since 10-22-2004, 12:20 PM
    • Posts 5,654

    Hey,

    What do you mean "run any application made in asp.net 3.5 inside the parent application"?  Are you hosting it as a separate virtual directory???  What is your setup?

    Also, upgrading from 2.0 to 3.5 your parent application shouldn't force any code changes (3.5 still uses the same 2.0 System.web DLL) so you could easily upgrade the parent app if that is an option too.

    Thanks.

    Brian

    "Trust in the Lord and do what is good; dwell in the land and live securely. Take delight in the Lord, and He will give you your heart's desires" (Psalm 37: 3-4).
  • Re: web.cofig

    11-06-2009, 1:40 PM
    • Member
      344 point Member
    • codermarc
    • Member since 08-22-2002, 3:14 PM
    • Tarpon Springs, FL
    • Posts 61

    Not sure if this will work, but you may want to check on blocking the inhertiance of the parent config file, so that you sub app is only using its own web.config.

     

    Check out this article

     

    http://www.xdevsoftware.com/blog/post/Block-Inheritance-of-Root-webconfig-for-Child-Applications.aspx

     

     

  • Re: web.cofig

    11-06-2009, 4:27 PM

    actually i need to stop configSections of parent directory to being inherited. because when i commented on the configSections of the root directory. it did work.

    here is the confing sectio of my root directory :

    <!--<configSections>
        
            <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
                <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
                    <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
                    <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
                        <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere"/>
                        <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
                        <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
                    </sectionGroup>
                </sectionGroup>
            </sectionGroup>
        </configSections>-->



    and here is the confug section of my sub directory


    <configSections>   
    		<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
    			<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
    				<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
    				<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
    					<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
    					<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
    					<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
    					<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
    				</sectionGroup>
    			</sectionGroup>
    		</sectionGroup>
    	</configSections>


  • Re: web.cofig

    11-07-2009, 8:22 AM
    Answer
    • Participant
      1,811 point Participant
    • vineed_menon
    • Member since 07-06-2007, 8:37 AM
    • Mumbai, India
    • Posts 384

    Hi,

    Is the child application made in .Net 3.5 configured as a Virtual Directory in you IIS? If not can you try to set the child application as a virtual directory and try if that solves your problem

    I think if you configure your child application as a different Virtual Directory inside your main application, then you will not have the problem with web.config.

    Please try and let us know if it helps

    Hope this helps to solve your problem

    Good Luck Yes

    Regards

    Vineed

    "Kind words are short and easy to speak, but their echoes are truely endless" - Mother Teresa
  • Re: web.cofig

    11-08-2009, 11:50 AM

    no actly i cant set this bcz this i have to do in my hosting account.

    in my hosting account i m allowed only to make one application in the root and inside this directory i can make number of other application.


    so i will have to do something with web.config file only.

  • Re: web.cofig

    11-11-2009, 3:49 AM
    Answer

    Hi,

    Since there are two separate websites and they have their own web.config files, you need to create virtual directory for sub-website. Even though multiple web.config files can exist in one application, some attributes only can be in root directory of application.

    You can ask your host company to confirm whether they can create virtual directory under existed virtual directory.

    For more information, see ASP.NET Configuration File Hierarchy and Inheritance (http://msdn.microsoft.com/en-us/library/ms178685.aspx), especially in section: Conflicts Between Settings on Virtual and Physical Directories.


    I look forward to receiving your test results.

    Thomas Sun
    Microsoft Online Community Support

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question.
Page 1 of 1 (7 items)