473,383 Members | 1,742 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,383 software developers and data experts.

Importing System.Data.SqlClient into my web service blows up the Web Reference

I created a Web Service: I imported System.Data.SqlClient so I could
access SQL server tables programmatically. The web service builds and
deploys with no problems. When I try to add the corresponding Web
Reference to the Web Site project I get the error listed below.

I am able to create other Web Services on the same server and I am able
to add Web Referneces to them. I have narrowed it down to the "Imports
System.Data.SqlClient" statement, I think. What's up with this?

I changed tempuri.org to something I have control over and it had no
effect.

Thanks,

Bill
Cincinnati, OH USA

--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Server Error in '/foo' Application.
--------------------------------------------------------------------------------

The XML element 'EnableTheming' from namespace 'http://tempuri.org/' is
already present in the current scope. Use XML attributes to specify
another XML name or namespace for the element.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: The XML element
'EnableTheming' from namespace 'http://tempuri.org/' is already present
in the current scope. Use XML attributes to specify another XML name or
namespace for the element.

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
Stack Trace:
[InvalidOperationException: The XML element 'EnableTheming' from
namespace 'http://tempuri.org/' is already present in the current
scope. Use XML attributes to specify another XML name or namespace for
the element.]

System.Xml.Serialization.XmlReflectionImporter.Add UniqueAccessor(INameScope
scope, Accessor accessor) +771933

System.Xml.Serialization.XmlReflectionImporter.Add UniqueAccessor(MemberMapping
member, INameScope elements, INameScope attributes, Boolean isSequence)
+88

System.Xml.Serialization.XmlReflectionImporter.Imp ortStructLikeMapping(StructModel
model, String ns, Boolean openModel, XmlAttributes a) +2097

[InvalidOperationException: There was an error reflecting property
'EnableTheming'.]

System.Xml.Serialization.XmlReflectionImporter.Imp ortStructLikeMapping(StructModel
model, String ns, Boolean openModel, XmlAttributes a) +2693

System.Xml.Serialization.XmlReflectionImporter.Imp ortStructLikeMapping(StructModel
model, String ns, Boolean openModel, XmlAttributes a) +791

System.Xml.Serialization.XmlReflectionImporter.Imp ortTypeMapping(TypeModel
model, String ns, ImportContext context, String dataType, XmlAttributes
a, Boolean repeats, Boolean openModel) +638

[InvalidOperationException: There was an error reflecting type
'System.Web.UI.Page'.]

System.Xml.Serialization.XmlReflectionImporter.Imp ortTypeMapping(TypeModel
model, String ns, ImportContext context, String dataType, XmlAttributes
a, Boolean repeats, Boolean openModel) +1533

System.Xml.Serialization.XmlReflectionImporter.Imp ortAccessorMapping(MemberMapping
accessor, FieldModel model, XmlAttributes a, String ns, Type
choiceIdentifierType, Boolean rpc, Boolean openModel) +11213

System.Xml.Serialization.XmlReflectionImporter.Imp ortFieldMapping(StructModel
parent, FieldModel model, XmlAttributes a, String ns) +136

System.Xml.Serialization.XmlReflectionImporter.Imp ortStructLikeMapping(StructModel
model, String ns, Boolean openModel, XmlAttributes a) +1824

[InvalidOperationException: There was an error reflecting property
'Page'.]

System.Xml.Serialization.XmlReflectionImporter.Imp ortStructLikeMapping(StructModel
model, String ns, Boolean openModel, XmlAttributes a) +2693

System.Xml.Serialization.XmlReflectionImporter.Imp ortStructLikeMapping(StructModel
model, String ns, Boolean openModel, XmlAttributes a) +791

System.Xml.Serialization.XmlReflectionImporter.Imp ortStructLikeMapping(StructModel
model, String ns, Boolean openModel, XmlAttributes a) +791

System.Xml.Serialization.XmlReflectionImporter.Imp ortStructLikeMapping(StructModel
model, String ns, Boolean openModel, XmlAttributes a) +791

System.Xml.Serialization.XmlReflectionImporter.Imp ortStructLikeMapping(StructModel
model, String ns, Boolean openModel, XmlAttributes a) +791

System.Xml.Serialization.XmlReflectionImporter.Imp ortStructLikeMapping(StructModel
model, String ns, Boolean openModel, XmlAttributes a) +791

System.Xml.Serialization.XmlReflectionImporter.Imp ortTypeMapping(TypeModel
model, String ns, ImportContext context, String dataType, XmlAttributes
a, Boolean repeats, Boolean openModel) +638

[InvalidOperationException: There was an error reflecting type
'System.Web.UI.WebControls.ListBox'.]

System.Xml.Serialization.XmlReflectionImporter.Imp ortTypeMapping(TypeModel
model, String ns, ImportContext context, String dataType, XmlAttributes
a, Boolean repeats, Boolean openModel) +1533

System.Xml.Serialization.XmlReflectionImporter.Imp ortAccessorMapping(MemberMapping
accessor, FieldModel model, XmlAttributes a, String ns, Type
choiceIdentifierType, Boolean rpc, Boolean openModel) +11213

System.Xml.Serialization.XmlReflectionImporter.Imp ortMemberMapping(XmlReflectionMember
xmlReflectionMember, String ns, XmlReflectionMember[]
xmlReflectionMembers, Boolean rpc, Boolean openModel) +977

System.Xml.Serialization.XmlReflectionImporter.Imp ortMembersMapping(XmlReflectionMember[]
xmlReflectionMembers, String ns, Boolean hasWrapperElement, Boolean
rpc, Boolean openModel) +278

[InvalidOperationException: There was an error reflecting 'pListBox'.]

System.Xml.Serialization.XmlReflectionImporter.Imp ortMembersMapping(XmlReflectionMember[]
xmlReflectionMembers, String ns, Boolean hasWrapperElement, Boolean
rpc, Boolean openModel) +877

System.Xml.Serialization.XmlReflectionImporter.Imp ortMembersMapping(String
elementName, String ns, XmlReflectionMember[] members, Boolean
hasWrapperElement, Boolean rpc, Boolean openModel, XmlMappingAccess
access) +111

System.Web.Services.Protocols.SoapReflector.Import MembersMapping(XmlReflectionImporter
xmlImporter, SoapReflectionImporter soapImporter, Boolean
serviceDefaultIsEncoded, Boolean rpc, SoapBindingUse use,
SoapParameterStyle paramStyle, String elementName, String
elementNamespace, Boolean nsIsDefault, XmlReflectionMember[] members,
Boolean validate, Boolean openModel, String key, Boolean writeAccess)
+203

System.Web.Services.Protocols.SoapReflector.Reflec tMethod(LogicalMethodInfo
methodInfo, Boolean client, XmlReflectionImporter xmlImporter,
SoapReflectionImporter soapImporter, String defaultNs) +2460

[InvalidOperationException: Method Service.LoadListBox can not be
reflected.]

System.Web.Services.Protocols.SoapReflector.Reflec tMethod(LogicalMethodInfo
methodInfo, Boolean client, XmlReflectionImporter xmlImporter,
SoapReflectionImporter soapImporter, String defaultNs) +6904

System.Web.Services.Description.SoapProtocolReflec tor.ReflectMethod()
+133

System.Web.Services.Description.ProtocolReflector. ReflectBinding(ReflectedBinding
reflectedBinding) +2760
System.Web.Services.Description.ProtocolReflector. Reflect() +739

System.Web.Services.Description.ServiceDescription Reflector.ReflectInternal(ProtocolReflector[]
reflectors) +621

System.Web.Services.Description.ServiceDescription Reflector.Reflect(Type
type, String url) +117
System.Web.Services.Protocols.DocumentationServerT ype..ctor(Type
type, String uri) +159

System.Web.Services.Protocols.DocumentationServerP rotocol.Initialize()
+336
System.Web.Services.Protocols.ServerProtocolFactor y.Create(Type
type, HttpContext context, HttpRequest request, HttpResponse response,
Boolean& abortProcessing) +99

[InvalidOperationException: Unable to handle request.]
System.Web.Services.Protocols.ServerProtocolFactor y.Create(Type
type, HttpContext context, HttpRequest request, HttpResponse response,
Boolean& abortProcessing) +258

System.Web.Services.Protocols.WebServiceHandlerFac tory.CoreGetHandler(Type
type, HttpContext context, HttpRequest request, HttpResponse response)
+90

[InvalidOperationException: Failed to handle request.]

System.Web.Services.Protocols.WebServiceHandlerFac tory.CoreGetHandler(Type
type, HttpContext context, HttpRequest request, HttpResponse response)
+237

System.Web.Services.Protocols.WebServiceHandlerFac tory.GetHandler(HttpContext
context, String verb, String url, String filePath) +104
System.Web.HttpApplication.MapHttpHandler(HttpCont ext context,
String requestType, VirtualPath path, String pathTranslated, Boolean
useAppConfig) +175

System.Web.MapHandlerExecutionStep.System.Web.Http Application.IExecutionStep.Execute()
+120
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously) +155


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET Version:2.0.50727.42

Jul 4 '06 #1
0 2007

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jeff S | last post by:
I have the following three lines at the very top of a class file (prior to the namespace declaration line). using System; using System.Data; using System.Data.SqlClient; Then, in a...
1
by: D. Shane Fowlkes | last post by:
Tw part question: 1 - Is it <% @Import Namespace..... or <%@ Import Namespace... ? I'm seeing it both ways in a book (but I think one is a typo. My pages don't seem to care which it is. Or do...
2
by: Chris Langston | last post by:
I have a Web Server running IIS 5 or 6 on Windows 2K and Windows 2003 Server that is experiencing strange shutdown problems. We are using ASP.NET v1.1 and our application is written in VB.NET ...
1
by: HK | last post by:
I just moved an ASP.NET application to a new web server at a different location of ours. The SQL Server machine was moved to that new location at the same time as the web site DNS was pointed to...
2
by: sxiao | last post by:
Hi, there I got a NullReferenceException when there are more than one users trying to open the same page at the same time. The senerio is: Two users logged into the web application using the...
3
by: Kevin Hodgson | last post by:
I'm trying to import from a text file into a Sql DB, but I'm getting hung up on a date field. My text file has the date in the dd/mm/yyyy format. I Cast that field to CDate in VB.NET, which sets...
3
by: weird0 | last post by:
This is the exception that I get when i create a webserivce obj and call. The error comes on the webmethod call, when it opens a connection to the db. How do I fix it? What is the solution to...
1
by: Pedro Dinis | last post by:
i have this class library that connects to the database(see appconfig below) compiling 0 errors but when its running i amhaving this error An unhandled exception of type...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...

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.