Login Skip Navigation LinksWilsonORMapper > Forums Search
Demo Version Demo Version
Download and try for yourself a fully working demo version, including sample apps and documentation.  The only limitation is that the demo version only works inside the debugger.

PayPal Subscribe
Get It All for $50 USD:
WebPortal, ORMapper,
Source Code, All Updates
PayPal

User Login User Login
Log In
 
 
Reset Password

Wilson ORMapper Forums Wilson ORMapper Forums : General Support : "ObjectSpace: SetField failed for...." error

Date Post
8/25/2007 2:35:06 PM

Hi,

I have recently started using The WilsonORMapper and am new to the capability. I get the following error when retrieving an GetObjectSet. "ObjectSpace: SetField failed for..". The odd thing is that my mapping file is very simple (with no relationships being used) and the only change I have made to it that most tables do not use an identity column for the primary key but a user defined one (example attached).


 <entity type="App.ddo.TtPhonePh" table="ttPhone_Ph" keyMember="pMId" keyType="User">
  <attribute member="pMId" field="p_m_id" alias="PMId" />
  <attribute member="pCtPhone" field="p_ct_phone" alias="PCtPhone" />
  <attribute member="pArea" field="p_area" alias="PArea" />
  <attribute member="pNumber" field="p_number" alias="PNumber" />
  <attribute member="pCtStatus" field="p_ct_status" alias="PCtStatus" />
  <attribute member="pInsertBy" field="p_insertBy" alias="PInsertBy" />
  <attribute member="pInsertDate" field="p_insertDate" alias="PInsertDate" />
  <attribute member="pUpDateBy" field="p_upDateBy" alias="PUpDateBy" />
  <attribute member="pUpDateDate" field="p_upDateDate" alias="PUpDateDate" />
 </entity>

Also interestingly I do not have any problems running the application locally either in debug mode or hosted as a website on my machine. However the error is encounted when I host the application on my website (GoDaddy). I am wondering if this has anything to do with the SQL Server versions. On my local machine I have is "9.00.3042.00, SP2, Express Edition" and on the website it is "9.00.3050.00, SP2, Standard Edition (64-bit)".

Any other information associated with rectifying the problem would be appreciated.
 
Please note that the "Engine.ExecuteScalar" works fine in all cases.

Thanks
Nilesh

8/25/2007 3:45:50 PM

It sounds like your GoDaddy site doesn't have the necessary reflection permissions.  If they have given you just the standard medium permission set then you'll need them to specifically give you the reflection permission.  Many hosters routinely do this since there are so many cases and libraries that require it, and at one time MS was even considering adding a standard "hoster" permission set that would include this (although I don't think they ever delivered).  If I remember correctly, the alternatives are to map public properties instead of private fields, or to use the IObjectHelper interface -- but its been a while and I may be off a little on the exact details of the alternative.

Thanks, Paul Wilson