How does a DLL change namespaces?

Discussion in 'ASP .Net Web Services' started by Bruce W...1, Nov 29, 2003.

  1. Bruce W...1

    Bruce W...1 Guest

    My ASP.NET web service runs fine on my local PC, and it has the
    namespace that I gave it. But when I upload it to my hosting company I
    get this error:

    This web service is using http://tempuri.org/ as its default namespace.
    Recommendation: Change the default namespace before the XML Web service
    is made public.

    Here's the URL:
    http://qotd.keystandard.com/QService.asmx

    This is the very same DLL and asmx file. And no the host server is not
    caching an older file, I ran tests to confirm this.

    No I have not made a WSDL file.

    The DLL is acting differently when at the hosting company. How can this
    be?

    Thanks for your help.
    Bruce W...1, Nov 29, 2003
    #1
    1. Advertising

  2. Bruce W...1

    Ryan LaNeve Guest

    "Bruce W...1" <> wrote in message
    news:...
    > My ASP.NET web service runs fine on my local PC, and it has the
    > namespace that I gave it. But when I upload it to my hosting company I
    > get this error:
    >
    > This web service is using http://tempuri.org/ as its default namespace.
    > Recommendation: Change the default namespace before the XML Web service
    > is made public.
    >


    http://tempuri.org is the default namespace assigned to a web service, and
    so long as the service is being accessed via http://localhost (i.e., during
    testing on your machine) you don't see the error you're getting now. Look at
    the definition of your web service and, just above the "public class
    <whatever>" line you'll see an attribute being applied which assigns the
    namespace. Change this to something other than the default and you'll be
    fine.

    Good luck,
    Ryan LaNeve
    Ryan LaNeve, Nov 30, 2003
    #2
    1. Advertising

  3. Bruce W...1

    Bruce W...1 Guest

    Ryan LaNeve wrote:
    >
    >
    > http://tempuri.org is the default namespace assigned to a web service, and
    > so long as the service is being accessed via http://localhost (i.e., during
    > testing on your machine) you don't see the error you're getting now. Look at
    > the definition of your web service and, just above the "public class
    > <whatever>" line you'll see an attribute being applied which assigns the
    > namespace. Change this to something other than the default and you'll be
    > fine.
    >
    > Good luck,
    > Ryan LaNeve

    =====================================================

    Thanks for pointing out that this error isn't shown on my local development
    machine.

    However I already did what you suggested. I've got this in my code:
    [System.Web.Services.WebService(Namespace="http://whatever.com/")]
    public class Service1 : System.Web.Services.WebService
    { ...
    It just doesn't seem to work, and I can't figure out why. I even changed the
    default namespace in the project properties.

    My original web service was more complex but I created a new Hello World web
    service, and it gives the same error.
    Bruce W...1, Nov 30, 2003
    #3
  4. Bruce W...1

    Bruce W..1 Guest

    "Bruce W...1" wrote:
    >
    > Ryan LaNeve wrote:
    > >
    > >
    > > http://tempuri.org is the default namespace assigned to a web service, and
    > > so long as the service is being accessed via http://localhost (i.e., during
    > > testing on your machine) you don't see the error you're getting now. Look at
    > > the definition of your web service and, just above the "public class
    > > <whatever>" line you'll see an attribute being applied which assigns the
    > > namespace. Change this to something other than the default and you'll be
    > > fine.
    > >
    > > Good luck,
    > > Ryan LaNeve

    =====================================================

    Just accessed the web service from another PC on my LAN and it worked
    fine, with the right namespace and everything.

    So something in IIS at the hosting company is causing it to say
    tempuri.org. But I can't imagine what?!
    Bruce W..1, Dec 1, 2003
    #4
    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. Anushi
    Replies:
    5
    Views:
    8,637
  2. tshad

    Namespaces in a dll file

    tshad, Dec 16, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    689
    tshad
    Dec 20, 2004
  3. akush

    Namespaces in MSVC Dll.

    akush, Dec 3, 2003, in forum: C++
    Replies:
    1
    Views:
    384
    Victor Bazarov
    Dec 3, 2003
  4. Chris Cormie
    Replies:
    11
    Views:
    12,215
    Chris Cormie
    Feb 24, 2009
  5. H. Simpson
    Replies:
    4
    Views:
    247
    H. Simpson
    Aug 3, 2004
Loading...

Share This Page