Web service asks for Login (unexpectedly)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Hiran

    Web service asks for Login (unexpectedly)

    I have a simple 'hello world' web service here
    http://www.askhiran2008.com/asliwebs...2/service.asmx. It should
    return data from the Northwind sample database.

    It works fine when being consumed by a simple ASP.NET application. See
    here http://www.askhiran2008.com/AsliWSClient2/default.aspx

    BUT when I try to Import it into Excel 2003 I get a login screen.

    I have tested what I'm doing my putting this into the Excel 2003
    Import XML
    http://www.webservicex.com/airport.asmx?WSDL - and I don't get asked
    for a login.

    Here is all my code in my .asmx file (ASP.NET 2.0)

    Imports System.Web
    Imports System.Web.Serv ices
    Imports System.Web.Serv ices.Protocols

    <WebService(Nam espace:="http://tempuri.org/")_
    <WebServiceBind ing(ConformsTo: =WsiProfiles.Ba sicProfile1_1)_
    <Global.Microso ft.VisualBasic. CompilerService s.DesignerGener ated()_
    Public Class Service
    Inherits System.Web.Serv ices.WebService

    <WebMethod()_
    Public Function GetProductsAll( ) As Products.Produc tsDataTable
    Dim taProducts As ProductsTableAd apters.Products TableAdapter
    taProducts = New ProductsTableAd apters.Products TableAdapter()
    Return taProducts.GetP roducts()
    End Function

    End Class


    BTW both services work without the login requirement when tested in
    The best and most comprehensive WSDL Validator available on the web


    What am I missing here?

    Thanks for any help,
    Hiran


  • John Saunders

    #2
    Re: Web service asks for Login (unexpectedly)

    "Hiran" <hiran@desilva. comwrote in message
    news:2c8ed26c-67b4-481e-89c6-3093258106ce@f3 6g2000hsa.googl egroups.com...
    I have a simple 'hello world' web service here
    http://www.askhiran2008.com/asliwebs...2/service.asmx. It should
    return data from the Northwind sample database.
    >
    It works fine when being consumed by a simple ASP.NET application. See
    here http://www.askhiran2008.com/AsliWSClient2/default.aspx
    >
    BUT when I try to Import it into Excel 2003 I get a login screen.
    Since you know for a fact that your web service isn't asking for a login,
    there is no reason for us to look at your code. Neither should you.

    How does Excel know to display a login screen? It would have to be because
    of network traffic. So you need to look at the network traffic. There is a
    list of ways to look at network traffic at
    http://johnwsaundersii i.spaces.live.c om/blog/cns!600A2BE4A82 EA0A6!224.entry .
    --
    John Saunders | MVP - Connected System Developer

    Comment

    Working...