Basic Search  Advanced Search   
Topics Resources Free Library Software XML News About Us
home » info bank » .NET XML KB Articles » PRB Thu, Jul 12, 2007
.NET XML KB Articles


Page: 1  2  3  

"'columnName' is already declared" Errors When You Build a Microsoft Visual Basic .NET Project
KB: 818218
You have an XML schema with elements that have the same name in different cases (for example, MYELMENT and MyElement). When you generate the DataSet for the XML schema in Visual Basic .NET, and you try to build the application that consumes the DataSet, you receive the following errors:
  • 'columnMYELEMENT' is already declared as 'Private Dim columnMYELEMENT As System.Data.DataColumn' in this class.
  • Property 'MYELEMENT' has multiple definitions with the same signatures.
  • Parameter already declared with name 'MyElement'.
  • Property 'MYELEMENTColumn' has multiple definitions with the same signatures.
When you generate a DataSet from an XML schema, an XMLSchemaName.vb file is also created with the DataSet schema. In the Visual Basic .NET file, the elements of the XML schema are declared as DataColumn. Therefore, there are two declare statements (one for each element). Because Visual Basic .NET is case-insensitive, it cannot distinguish between the two declare statements that only differ by case. Therefore, you receive errors when you build the project.
View this KB Article...

"The Specified Web Server Is Not Running ASP.NET Version 1.1" Error Message When You Create ASP.NET 1.1 Application
KB: 817267
Microsoft Visual Studio .NET 2003 cannot open an existing ASP.NET 1.1 Web project under the following circumstances:
You set ASP.NET 1.1 to Prohibited in the Web Service Extension list.
You set ASP.NET 1.0 to Allowed in the Web Service Extension list.

The computer is running Microsoft Windows Server 2003.

When you try to create a new ASP.NET 1.1 project, you may receive the following error message:
Visual Studio .NET has detected that the specified Web server is not running ASP.NET version 1.1. You will be unable to run ASP.NET Web applications or services.

If both ASP.NET 1.1 and ASP.NET 1.0 are set to Prohibited in the Web Service Extension list, you may receive the following error message when you try to open a new ASP.NET 1.1 project in Visual Studio .NET 2003:

Visual Studio .NET has detected that ASP.NET applications and services are locked down in IIS. You can run the IIS Security Lockdown Wizard to change lockdown status

Note By default, when you install Microsoft .NET Framework 1.0, ASP.NET 1.0 is not added to the Web Service Extension list in Microsoft Internet Information Services (IIS) 6.0.
View this KB Article...

"System.InvalidOperationException" Error While Serializing a Class Without Default Constructor
KB: 816225
When you create an XmlSerializer object to serialize a class without a default constructor, you may receive the following error message:
An unhandled exception of type 'System.InvalidOperationException' occurred in system.xml.dll
Additional information: ApplicationName.ClassName cannot be serialized because it does not have a default public constructor.
To be serialized by an XmlSerializer object, a class must have a default constructor.
View this KB Article...

XmlElementAttribute Is Missing for the Generated Class Members While Using Xsd.exe
KB: 816222
When you use the XML Schema Definition Tool (Xsd.exe) to generate managed classes from an XML schema, the XmlElementAttribute class is not generated for complex type member elements of the top-level elements of an included schema. You see this behavior when the value of the elementFormDefault attribute of the <xs:schema> element in the including schema is set to qualified, even though the included schema sets the elementFormDefault attribute to unqualified.
View this KB Article...

System.InvalidOperationException Error When You Use HttpWebRequest and HttpWebResponse Classes in Application with Thread Pool
KB: 815637
When you use the System.Net.HttpWebRequest and the System.Net.HttpWebResponse classes in an application that uses a thread pool, you may receive the following error message:
System.InvalidOperationException: There were not enough free threads in the ThreadPool object to complete the operation
View this KB Article...

Web References Added to Visual Source Safe Cause Merge Problems and Errors While You Update References
KB: 814715
When you add your ASP.NET Web application project and your ASP.NET Web services project to Microsoft VisualSource Safe, you may experience problems when you update the Web references of your Web application project. For example, when you update your project Web References folder, the changes that you incorporated in the Web services interface do not appear in the Web service proxy file. When you click the Get Latest Version (Recursive) command, you are prompted to merge the file. When you click Merge, your Web Service Proxy may not reflect the latest changes. The merge may corrupt the files and then make them unusable.
View this KB Article...

"System.InvalidOperationException" Error While Serializing NameValueCollection Objects Using XmlSerializer
KB: 814187
When you try to serialize NameValueCollection objects by using the XMLSerializer object, you receive the following exception error message:
An unhandled exception of type 'System.InvalidOperationException' occurred in system.xml.dll Additional information: You must implement the Add(System.String) method on System.Collections.Specialized.NameValueCollection because it inherits from ICollection.
View this KB Article...

"Access Denied" Error Message When You Call a Web Service While Anonymous Authentication Is Turned Off
KB: 811318
When you try to call a Web service application and Anonymous access authentication is turned off, you may receive the following error message.

The request failed with HTTP status 401: Access Denied.

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.Net.WebException: The request failed with HTTP status 401: Access Denied.

When Anonymous access authentication is turned off for the Web service application, all the caller applications must provide the credentials before making any request. By default, the Web service client proxy does not inherit the credentials of the security context where the Web service client application is running.

To resolve this problem, you must use the Credentials property of the Web service client proxy to set the security credentials for Web service client authentication.
View this KB Article...

Common Proxy Server and Firewall Issues with MapPoint .NET
KB: 330221
MapPoint .NET is a HTTP-based Web service that is delivered over TCP/IP. The operation, connectivity, and performance of MapPoint .NET can be impacted by the proxy server and firewall environment. Client applications access the service through this environment. The following errors are related to the proxy server and firewall issues.
View this KB Article...

Web Services XmlInclude Does Not Work on Enumerations
KB: 326792
The XmlInclude attribute is currently intended to support polymorphic return types. In other words, it is intended to permit you to mark a Web method as returning a base class, but also include the definitions for the derived classes in the WSDL document so that clients can be prepared to accept objects of the derived types as return values.
View this KB Article...

"Access Denied" Error Message Occurs When You Impersonate an Account in ASP.NET and Then Call STA COM Components
KB: 325791
If you impersonate a particular account in your ASP.NET Web Service (.asmx) or in your Web Form (.aspx), and then you call to an Apartment/Single-threaded Component Object Model (COM) component, the process identity (by default, ASPNET account) is used instead of the impersonated account. Therefore, logic errors may occur when you try to access resources from the COM component, or you may receive the following error message:

Access Denied

The thread that executes your ASP.NET request is one of the I/O threads or one of the workerThreads in the ASP.NET worker process (aspnet_wp.exe). These threads are all Multi-Threaded Apartment (MTA) threads. If you programmatically impersonate an account in your .aspx or .asmx code, or if you impersonate by using in Web.config or Machine.config, then the impersonation token is held on this MTA thread. If you then make a call into a single-threaded or an apartment-threaded COM component, that component is accessed by an entirely different thread, which is the single thread in its Single-Threaded Apartment (STA). Because this STA thread does not have an impersonation token of its own, and the impersonation token of the MTA thread is not passed to the STA thread, the STA thread then executes under the process identity.
View this KB Article...

Error Message When You View Multi-Dimensional XSD Schemas in the Visual Studio .NET XML Schema Designer
KB: 325695
When you try to open and view a multi-dimensional XML Schema Definition (XSD) schema in Visual Studio .NET, an XML Designer window may open instead of a Schema Designer window, and you may receive the following error message in the Data view of the XML Designer:
Although this XML document is well formed, it contains structure that the DataView cannot display. The same table (TableName) cannot be the child table in two nested relations.
View this KB Article...

Slow Performance When Transforming an ADO.NET DataSet with Non-Nested DataRelations
KB: 325693
Performance of your computer system slows when you try to transform the XML representation of a DataSet that has multiple related DataTable objects whose DataRelation objects are not nested to reflect a hierarchical structure.

Many XSL Transformation (XSLT) performance problems are caused by non-optimized code in the XSLT stylesheet. The non-optimized code might also be a result of poorly structured data in the source XML instance. In this case, the source XML is poorly structured.
View this KB Article...

System.Xml.XmlSerializer Does Not Serialize Default Values
KB: 325691
System.Xml.XmlSerializer does not serialize default values that are present in the XML schemas (XSD). For example, if the schema contains the following line, the default value of False for the <boolf> element is not serialized:

<xsd:element name="boolF" type="xsd:boolean" minOccurs="1" maxOccurs="1" default="false" />
View this KB Article...

Session State Is Lost in Web Farm If You Use SqlServer or StateServer Session Mode
KB: 325056
If you use SqlServer or StateServer session state mode, session state may be lost when you run an ASP.NET Web application in a load balanced Web farm environment.

To maintain session state across different Web servers in the Web farm, the application path of the Web site (for example, \LM\W3SVC\2) in the Microsoft Internet Information Services (IIS) metabase must be the same for all of the Web servers in the Web farm.

On one Web server, the instance ID of the Web site where the ASP.NET application is hosted may be 2 (where the application path is \LM\W3SVC\2). On another Web server, the instance ID of the Web site may be 3 (where the application path is \LM\W3SVC\3). Therefore, the application paths between Web servers in the Web farm are different.
View this KB Article...

Page: 1  2  3  

  Contact Us | E-mail Us | Site Guide | About PerfectXML | Advertise ©2004 All rights reserved. | Privacy