How does a DLL change namespaces?

B

Bruce W...1

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.
 
R

Ryan LaNeve

Bruce W...1 said:
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
 
B

Bruce W...1

Ryan said:
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.
 
B

Bruce W..1

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

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?!
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top