asp.net - Exception: Argument must be either a FieldInfo or PropertyInfo On server -
the environment:
- development pc: windows 7 x64 clean install, visual studio 2012 , iis 7.5
- deployment server: windows 2008 w/ sp2, iis 7, .net 4.0 (not sure if it's 32 or 64 bit)
- language: vb
- codebase: classic asp, new code additions done in asp.net using
the backstory:
i rewriting section of our intranet admin site. have bunch of code (20+ files) under directories in app_code 2 namespaces defined. have aspx page in subfolder of site uses code in app_code. running linq query pulls down data sqlserver display on page.
the issue:
when code deployed server, linq-to-sql query errors out
stack trace: [argumentexception: argument must either fieldinfo or propertyinfo] system.linq.expressions.expression.validatesettablefieldorpropertymember(memberinfo member, type& membertype) +2751766 system.linq.expressions.expression.bind(memberinfo member, expression expression) +48 {my aspx file class}.{defined function} in {my aspx.vb file} {my aspx file class}.pageload() in {my aspx.vb file} {my aspx file class}._lambda$__1(object a0, eventargs a1) in c:\windows\microsoft.net\framework\v4.0.30319\temporary asp.net files\root\06df741c\5a279add\app_web_{my aspx file name}.aspx.2589a445.y_7knnxz.0.vb:0 system.web.ui.control.onload(eventargs e) +91 system.web.ui.control.loadrecursive() +74 system.web.ui.page.processrequestmain(boolean includestagesbeforeasyncpoint, boolean includestagesafterasyncpoint) +2207 the linq query runs fine on local machine's iis server, , in visual studio 2012's dev server; not on public web server.
other linq queries on other .net aspx pages work, , have used many functions way. have tried removing namespaces, adding line continuation characters, etc... trying shotgun hairbrained ideas @ it. have searched as find answer, , can find code files throw error.
i in proccess of trying clone environment in vm (run eval copy of server 2008) , host site in it.
any offered appreciated.
it appears there issue way environment on server handling public variables vs public properties linq queries when doing my
select new myclass { .var1 = result.variable } i added property modifier variable:
class myclass public property var1 end class instead of
class myclass public var1 end class
Comments
Post a Comment