none
There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined...

    Question

  • Hello, Warm regards...

    I have a REST web service which was working fine in almost all windows OS. Now I have to migrate it to a Windows server 2012 (IIS 8.0). I have done the basic configurations and I have got the following exception.

    HTTP Error 500.19 - Internal Server Error
    ___________________________________________
    Config Error
       There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined  

    Based on the following two posts I have made some changes to my web.config

    codeproject

    websitepanel

    But I have got the following exception

    Server Error in '/MyService' Application.
    ----------------------------------------------------------
    The resource cannot be found. 
    Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been 
    removed, had its name changed, or is temporarily unavailable. Please review the following URL and
    make sure that it is spelled correctly.

    Can someone shed some light to solve this issue.

    Thanks & Regards
    Sebastian


    Friday, November 01, 2013 1:07 PM

All replies

  • Server Error in '/MyService' Application.
    ----------------------------------------------------------
    The resource cannot be found. 
    Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been 
    removed, had its name changed, or is temporarily unavailable. Please review the following URL and
    make sure that it is spelled correctly.

    Hi,

    It seems the endpoint address is incorrect, for example your address is: http://localhost:162/WcfTestWebSite/MyService.svc

    Then you can open IIS Manager, click your site, switch to Content View, then right-click MyService.svc file, click browser. It should pop up a Internet Explorer windows with correct address in address bar. You can use this address to update the endpoint address.

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, November 04, 2013 2:02 AM
  • Hello Amy Peng,

    Thanks for your reply. I had removed the following from web.config file of my rest service, based on the post referenced in my question.

    <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection,
    System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
    requirePermission="false" allowDefinition="MachineToApplication"/> <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"/>

    Now I am accessing my service using following url ; http://localhost/myrestservice/RestService.svc . As you suggested, I have right clicked the .svc file from the content view (http://localhost/myrestservice/RestService.svc), but the result is same.

    It would be great, if you could help me further.

    Thanks & regards
    Sebastian

    Wednesday, November 06, 2013 6:22 AM
  • Hi,

    Did you try rebuilding your application with .net framework 4.0/4.5 and deploy?

    And also you can get some helpful information on problem solving on iis 8 in the following link.

    http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-using-aspnet-35-and-aspnet-45

    Wednesday, November 06, 2013 7:18 AM
  • Hi Ravi Kumar,

    Thanks for your kind reply. I have tried to migrate it to .net framework 4.0 and successfully created the setup project. But when I installed it and browsed from IIS, It gave me another error. Please find the screenshot below...

    If would be nice, if you could help me further.

    Thanks & Regards
    Sebastian

    Friday, November 08, 2013 12:08 PM
  • Hi,

    When host wcf service in the IIS 8, please try to check the following:
        •First make sure you have enabled IIS function and .net 3.5 in Features.
          For the IIS features, please remember to enable ASP.NET3.5 and ASP.NET 4.5
        •Second, check the IIS Hostable WebCore
        •Finally, I think the most important is this:
          Check Application Sever->Web Server (IIS) Support

    Also check the HTTP Activation in Windows Process Activation Service Support:

    For the freatures:

    1.Check all items in .NET 3.5

    2.Check WCF Service in .NET 4.5

    Last but not least, we should have registered the WCF Service from

    C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe –i

    Run the above in command line.

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Monday, November 11, 2013 9:33 AM
  • Hi Amy Peng,

    Thanks for your reply. But my last reply was about hosting my rest service in my development machine(IIS 7.5) itself. After upgrading my project to .net framework 4.0, i got the above exception. It was (& it is) working fine with the project built with .net framework 3.5.

    Am I doing anything wrong?

    Regards
    Sebastian

    Tuesday, November 12, 2013 9:01 AM