Blog Home  Home Feed your aggregator (RSS 2.0)  
Venexus DotNetNuke Blog - DotNetNuke - Incoming TDS RPC Protocol Stream Incorrect Error for SQL Server 2005
DotNetNuke Articles, Code Snippets, Errors, and News
 
 Tuesday, December 13, 2005

InnerException: The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Parameter 1 ("@rawQuery"): Data type 0xE7 has an invalid data length or metadata length.

This is here as a placeholder because I have a feeling this is going to come up agaqin soon...We experieced this issue with a DNN module that called a stored proc on a database that was not located on the same server as where the DNN installation lived and a different database than the DNN database.

0xE7 = 231, which is correct for nvarchar. Running SQL Profiler, no trace of the stored proc being run was found.

**NOTE** The stored procedure that is being called is NOT in the DotNetNuke database.

We tried the following cases with interesting results:

Error Case:

Server A (Windows 2003 Standard running IIS), connecting to Server B (remote SQL Server 2005 database). ERROR = TRUE

Test Case 1:

Server A (Windows 2003 Enterprise running IIS), connecting to local SQL Server 2000  database. ERROR = FALSE

Test Case 2:

Server C (Windows 2003 Standard running IIS), connecting to local SQL Server 2000  database. ERROR = FALSE

Test Case 3:

Server A (Windows 2003 Enterprise running IIS), connecting to Server C (remote SQL Server 2000  database). ERROR = FALSE

Test Case 4:

Server C (Windows 2003 Standard running IIS), connecting to Server B (remote SQL Server 2005 database). ERROR = TRUE

Test Case 5:

Server D (Windows 2003 Standard running IIS), connecting to local SQL Server 2005  database. ERROR = TRUE

See the pattern? So, this definitely points to an SQL Server 2005 issue. This lead us down the route of changing the provider to see if the module would work. And guess what? It did. The error goes away. WTF? No time to run a packet sniffer. I am logging this here as a great mystery to solve some other time.


 Update 1/9/2005:

During validation of a byte-ordered user-defined type passed through RPC, user-defined type validation performs de-serialization/re-serialization of the user-defined type and requires that the resulting bytes be exactly the same as the original. If the validation fails, you will see the error:

"System.Data.SqlClient.SqlException, Incoming TDS RPC protocol stream is incorrect. Parameter 1 ("<ParameterName>"): The supplied value is not a valid instance of data type <TypeName>. Check the source data for invalid values."  - Reference: http://support.microsoft.com/default.aspx?scid=kb;en-us;910228  in section 4.1.4
Tuesday, December 13, 2005 3:35:40 PM (US Eastern Standard Time, UTC-05:00)  #       |   |  Tracked by:
"Upgrading DNN from local SQL Server 2000 to Remote SQL Server 2005" (Venexus Do... [Trackback]
Copyright © 2010 Venexus, Inc.. All rights reserved.