Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

security error - medium trust envirnoment

Status
Not open for further replies.

NoCoolHandle

Programmer
Apr 10, 2003
2,321
US
Hi,

I was in the process of transfering a site we manage to a new hosting provider and started getting a non descript security error - the hosting company believes it is because they work in a medium trust environment.

(the code in question was written by someone else and i am just getting the pleasure of troubleshooting it..)

After doing much digging I found the error was being triggered by a call in a datalist's itemdatabound event.

Specifically where it was trying to read the value from a control in the datalist.

Code:
 Dim lngDateType As Long = e.Item.DataItem("dateType")

Any idea as to get around this is very welcome!

TIA

Rob
 
this code doesn't tell us anything. for a better idea of what's going on you should have some form of logging in the application. at a minimum the logs should be logging errors that the system encounters. if you can provide the full stack trace, then we could start to diagnose the problem.

what BCL (base class library) assemblies does the project reference? what 3rd party assemblies? this will help provide some insight. For example medium trust issues are common with Nhibernate (a 3rd party ORM framework). there are known solutions for the medium trust issues pertaining to NH which you could find by searching the web.

Jason Meckley
Programmer
Specialty Bakers, Inc.

faq855-7190
faq732-7259
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top