473,387 Members | 1,611 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

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
1 1994
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Peter Speybrouck | last post by:
I have a little problem with a webservice. I reproduced the problem in the following simplified example. I just create a new C# ASP.NET webservice and a c# console application. I added a new...
0
by: jim | last post by:
Hi Everyone, When I converted one visual .net project from 2002 to 2003, there is an error occursing during compiling under visual studio .net 2003 as followoing: Command Lines Creating...
29
by: Natan | last post by:
When you create and aspx page, this is generated by default: using System; using System.Collections; using System.Collections.Specialized; using System.Configuration; using System.Text; using...
0
by: Charles Leonard | last post by:
I need opinions regarding Web Service Namespace usage and/or suggestions regarding how to handle deployment. Our web service application will exist in two different domains and is likely to...
4
by: Ruslan | last post by:
Hi, I have 3 projects: 1. Common 2. Desktop
3
by: Pierre | last post by:
Hi everybody, I'm trying to clean my code a bit and I couldn't manage to centralise the location of my services' namespace. I tried that: )] Here is the error I get in VS 2005:...
7
by: Techno_Dex | last post by:
Is there a way to configure a WebService Namespace in a config file that can be set (i.e. to )? I have a webservice that I might need to configure/move on multiple different servers but from...
0
by: UT-BadBoy | last post by:
Hi, I've been working with ASP.NET for about a year so I'm still considering myself to be somewhat of a novice in this field. I am receiving this particualr error when trying to hit a...
11
by: =?Utf-8?B?SmVycnkgQw==?= | last post by:
I have a machine Windows Server 2003 using IIS 6.0 and I am getting the error BC30560 prjob_ascx is ambiguous in the namespace ASP I found a fix. Deleting all the files in the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.