The namespace, , is a duplicate error when compiling .NET Webservice

U

UT-BadBoy

Hi,

I've been receving this error "System.InvalidOperationException: The
namespace, , is a duplicate." and have been unable to locate the exact
cause of the exception.

I've written a webservice with the new AJAX extensions for .NET. The
webservice is marked up with
a ScriptService attribute tag along with each method being marked up
as a ScriptMethod.
Calls from the my client to the webservice still works correctly but I
get an error if I try to hit the webservice page directly. So during
compile time, there is something going on that's preventing IIS from
displaying the webservice page.

Any help will be much appreciated.

Thanks in Advance.

Here's some code sample of the webservice:

[WebService( Namespace="mynamespace" )]
[WebServiceBinding( ConformsTo=WsiProfiles.BasicProfile1_1 )]
[GenerateScriptType( typeof( CustomItem ) ) ]
[ScriptService]
public class MyWebService : System.Web.Services.WebService
{
[WebMethod]
[ScriptMethod( ResponseFormat = ResponseFormat.Xml)]
public CustomItem CreateNewItem(string name)
{
// do stuff here
return new CustomItem();
}
}


Thanks again.
 

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

No members online now.

Forum statistics

Threads
473,968
Messages
2,570,150
Members
46,697
Latest member
AugustNabo

Latest Threads

Top