Calling a webservice from a page

Discussion in 'ASP .Net Web Services' started by Shane Bush, Oct 17, 2005.

  1. Shane Bush

    Shane Bush Guest

    All

    I'm desperately looking for a way to call a webservice that do not give me
    401: Permission denied error. Here's my issue. I created a webpage on my
    local hard drive to call a webservice on SOMEDOMAIN.COM, calls succeeded.
    Now, I published the same webpage to my host, MYHOST.COM and the calls gave
    me a permission denied error. The calls to the webservice is an anonymous
    call and does not need any password. Why does it fail?

    I tried to look this up in numerous books and ALL books so far show samples
    of ASP.NET page calling webservice from http://localhost. Of course there
    isn't going to be a problem. Is there a more real world reference that I can
    look up that simply show/explain how to call a webservice from a page on one
    domain to another. Any help is greatly appreciated. Thanks.
     
    Shane Bush, Oct 17, 2005
    #1
    1. Advertising

  2. You shouldn’t have any problem to do it from a remote machine. It looks like
    a security configuration problem.
    Just take a look to IIS Virtual directory configuration, try with anonymous
    access first. Also, take a look to NTFS permissions from within the directory
    properties (where you have your .asmx files) and make sure that the
    'anonymous account' (like ASPNET account) has read permissions.
    --
    CESAR DE LA TORRE
    Software Architect
    [Microsoft MVP - XML Web Services]
    [MCSE] [MCT]

    Renacimiento
    [Microsoft GOLD Certified Partner]


    "Shane Bush" wrote:

    > All
    >
    > I'm desperately looking for a way to call a webservice that do not give me
    > 401: Permission denied error. Here's my issue. I created a webpage on my
    > local hard drive to call a webservice on SOMEDOMAIN.COM, calls succeeded.
    > Now, I published the same webpage to my host, MYHOST.COM and the calls gave
    > me a permission denied error. The calls to the webservice is an anonymous
    > call and does not need any password. Why does it fail?
    >
    > I tried to look this up in numerous books and ALL books so far show samples
    > of ASP.NET page calling webservice from http://localhost. Of course there
    > isn't going to be a problem. Is there a more real world reference that I can
    > look up that simply show/explain how to call a webservice from a page on one
    > domain to another. Any help is greatly appreciated. Thanks.
    >
    >
    >
     
    CESAR DE LA TORRE [MVP], Oct 17, 2005
    #2
    1. Advertising

  3. Thanks for Renacimiento's input.

    Hi Shane,

    As for the "Access denied" error, I think Renacimiento is suggestion on
    checking the IIS security setting is reasonable. Generally if your
    webservice is about to be accessed by external users through INternet , we
    should allow anomymous accessing in IIS virtual dir's directory setting.
    Also, you can check the IIS log on that webservice's server machine to see
    whether there're any such authentication log entries. In addition, would
    you provide us the clientside webservice calling code? Since you mentienod
    that you can also run it from local hard disk, are you using client script
    to invoke the webservice?

    Thanks,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)


    --------------------
    | Thread-Topic: Calling a webservice from a page
    | thread-index: AcXTRz/0wUs4ZQfGR5O718/OnBrF7w==
    | X-WBNR-Posting-Host: 80.58.4.42
    | From: "=?Utf-8?B?Q0VTQVIgREUgTEEgVE9SUkUgW01WUF0=?=" <>
    | References: <#>
    | Subject: RE: Calling a webservice from a page
    | Date: Mon, 17 Oct 2005 11:19:01 -0700
    | Lines: 35
    | Message-ID: <>
    | MIME-Version: 1.0
    | Content-Type: text/plain;
    | charset="Utf-8"
    | Content-Transfer-Encoding: 8bit
    | X-Newsreader: Microsoft CDO for Windows 2000
    | Content-Class: urn:content-classes:message
    | Importance: normal
    | Priority: normal
    | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
    | Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
    | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
    | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
    | Xref: TK2MSFTNGXA01.phx.gbl
    microsoft.public.dotnet.framework.aspnet.webservices:8070
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
    |
    | You shouldn’t have any problem to do it from a remote machine. It looks
    like
    | a security configuration problem.
    | Just take a look to IIS Virtual directory configuration, try with
    anonymous
    | access first. Also, take a look to NTFS permissions from within the
    directory
    | properties (where you have your .asmx files) and make sure that the
    | 'anonymous account' (like ASPNET account) has read permissions.
    | --
    | CESAR DE LA TORRE
    | Software Architect
    | [Microsoft MVP - XML Web Services]
    | [MCSE] [MCT]
    |
    | Renacimiento
    | [Microsoft GOLD Certified Partner]
    |
    |
    | "Shane Bush" wrote:
    |
    | > All
    | >
    | > I'm desperately looking for a way to call a webservice that do not give
    me
    | > 401: Permission denied error. Here's my issue. I created a webpage on my
    | > local hard drive to call a webservice on SOMEDOMAIN.COM, calls
    succeeded.
    | > Now, I published the same webpage to my host, MYHOST.COM and the calls
    gave
    | > me a permission denied error. The calls to the webservice is an
    anonymous
    | > call and does not need any password. Why does it fail?
    | >
    | > I tried to look this up in numerous books and ALL books so far show
    samples
    | > of ASP.NET page calling webservice from http://localhost. Of course
    there
    | > isn't going to be a problem. Is there a more real world reference that
    I can
    | > look up that simply show/explain how to call a webservice from a page
    on one
    | > domain to another. Any help is greatly appreciated. Thanks.
    | >
    | >
    | >
    |
     
    Steven Cheng[MSFT], Oct 18, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. batista
    Replies:
    1
    Views:
    965
    Laurent Bugnion
    Jan 26, 2006
  2. batista
    Replies:
    0
    Views:
    587
    batista
    Jan 26, 2006
  3. Peter Nordström

    Webservice calling a webservice.....Error

    Peter Nordström, Oct 21, 2003, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    191
    Peter Nordström
    Oct 21, 2003
  4. Calling a webservice from a webservice

    , Apr 19, 2005, in forum: ASP .Net Web Services
    Replies:
    2
    Views:
    173
  5. batista
    Replies:
    0
    Views:
    276
    batista
    Jan 26, 2006
Loading...

Share This Page