Deploying ASP.NET MVC 3 Application Under ASP.NET 3.5 Web Site Sub Folder -



Deploying ASP.NET MVC 3 Application Under ASP.NET 3.5 Web Site Sub Folder -

i have website in iis 7, asp.net 3.5 works well. have installed .net 4.0 on website server. now, have added virtual directory(yes, converted application) asp.net 4.0 apppool in website. when access virtual directory, get

there duplicate 'system.web.extensions/scripting/scriptresourcehandler' section defined

why virtual directory application trying utilize root website's web.config?

as @bnl said quoting reply this site,

step 1 (iis 7 or iis 7.5 only)

this step necessary on operating systems run iis 7 or iis 7.5, includes windows vista, windows server 2008, windows 7, , windows server 2008 r2.

move configsections definition in web.config file of parent application (the application runs asp.net 2.0 or asp.net 3.5) root web.config file the.net framework 2.0. iis 7 , iis 7.5 native configuration scheme scans configsections element when merges hierarchy of configuration files. moving configsections definition parent web application’s web.config file root web.config file hides element configuration merge process occurs kid asp.net 4 application.

on 32-bit operating scheme or 32-bit application pools, root web.config file asp.net 2.0 , asp.net 3.5 located in next folder:

c:\windows\microsoft.net\framework\v2.0.50727\config

on 64-bit operating scheme or 64-bit application pools, root web.config file asp.net 2.0 , asp.net 3.5 located in next folder:

c:\windows\microsoft.net\framework64\v2.0.50727\config

if run both 32-bit , 64-bit web applications on 64-bit computer, must move configsections element root web.config files both 32-bit , 64-bit systems.

when set configsections element in root web.config file, paste section after configuration element. next illustration shows top portion of root web.config file should when have finished moving elements.

note in next example, lines have been wrapped readability.

<?xml version="1.0" encoding="utf-8"?> <!-- root web configuration file --> <configuration> <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>

step 2 (all versions of iis)

this step required whether asp.net 4 kid web application running on iis 6 or on iis 7 (or iis 7.5).

in web.config file of parent web application running asp.net 2 or asp.net 3.5, add together location tag explicitly specifies (for both iis , asp.net configuration systems) configuration entries apply parent web application. next illustration shows syntax of location element add:

<location path="" inheritinchildapplications="false" >

the next illustration shows how location tag used wrap configuration sections starting appsettings section , ending system.webserver section.

<location path="" inheritinchildapplications="false" >

when have completed steps 1 , 2, kid asp.net 4 web applications start without errors.

asp.net asp.net-mvc asp.net-mvc-3 iis iis-7

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -