views:

2330

answers:

7

I am using a Session Parameter on an ObjectDataSource. It works fine on the local development machine but I get this error after copying the website to the production server:

Type 'System.Web.UI.WebControls.SessionParameter' does not have a public property named 'DbType'.

+1  A: 

I found the answer but I don't know why it does this.

I just removed the DBType property and it worked fine.

Travis
Just had the same thing happen to me. Maybe the dev box is loading 3.5 assemblies and the production site is loading 2.0?
Will
A: 

Travis' answer gave me a clue, but perhaps it could be stated better thusly:

Somehow, in copying the website to the production server, a number of the parameter objects (Specifically, those with type GUID) had the "Type"="Guid" element changed to "DBType"="Guid".

e.g parameter should be:

NOT

A: 

Me again!

First Answer I gave was WRONG!
Correct answer is that .NET Framework v3.5 was installed, and it needs to be updated to .NET framework 3.5 SP1

SteveS
A: 

Confirmed: This requires .NET Framework 3.5 SP1 update.

A: 

Wow I also removed DbType="Date" and it started working. did'nt even bother publishing, just changed it on the server with notepad. Thanks

A: 

I change DbType to Type and this got the site working.

John M
A: 

well. you should change it. eg. if it is DbType="Guid" then change it to Type="Object"