By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,763 Members | 1,641 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,763 IT Pros & Developers. It's quick & easy.

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

P: n/a
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.

Sep 26 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"UT-BadBoy" <ut*********@gmail.comwrote in message
news:11**********************@y42g2000hsy.googlegr oups.com...
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();
}
}
Please post the entire exception, complete with stack trace and inner
exceptions. If necessary, write out ex.ToString().
--
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer

Sep 26 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.