Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Galina 44 posts 258 karma points
    Mar 31, 2015 @ 11:12
    Galina
    0

    third-part asmx-service

    Hello 

    I have a third-party ascx with reference on js-file, which call .asmx from /json directory. And dll, in which code of asmx-service

    There is an error in console

    1. Remote Address:
      [::1]:29000
    2. Request URL:
    3. Request Method:
      POST
    4. Status Code:
      401 Unauthorized
    5. with response: {"Message":"Authentication failed.","StackTrace":null,"ExceptionType":"System.InvalidOperationException"}
    I wrote in web.config
        <location path="json">
        <system.web>
          <authorization>
            <allow users="*"/>
          </authorization>
        </system.web>
      </location>
    But it doesn't help. Any ideas?
  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 31, 2015 @ 12:22
    Jan Skovgaard
    0

    Hi Galina

    What does your code look like? And have you checked permissions?

    /Jan

  • Galina 44 posts 258 karma points
    Mar 31, 2015 @ 12:57
    Galina
    0

    Hello Jan.

     

    I have no code. I've created a page with wysiwyg, insert there third-party ascx (as macro) and view preview page. In this menu.ascx there an included js-file which call asmx-service. But the service should be json/menuextended.asmx/loadmenu . And I have menu.dll 

    asmx:

    <%@ WebService Language="C#" CodeBehind="~/AppCode/JSON/MenuExtended.cs" Class="Another.JSON.MenuExtended" %>

    and dll with Another.JSON.MenuExtended

    When I view a preview page, see the error:

    1. Remote Address:
       
      [::1]:29000
    2. Request URL:
       
    3. Request Method:
       
      POST
    4. Status Code:
       
      401 Unauthorized
    5. with response: {"Message":"Authentication failed.","StackTrace":null,"ExceptionType":"System.InvalidOperationException"}
Please Sign in or register to post replies

Write your reply to:

Draft