c# - WCF calls 3rd party DLL only works in VS2015 but not without -
i using 64bit windows7 home premium sp1 , vs2015.
i wrote wcf application calls 3rd party dll (from vendor) written in c#. when "view in browser" right clicking productreadservice.svc in vs2015 solution explorer, can call svc(localhost:17476/productrestservice.svc) , method(this calls 3rd party dll localhost:17476/productrestservice.svc/getproductlist/1) , wcf works without problem on browser (chrome , ie), returning xml result correctly.
now want wcf running without vs2015 since need run in production env.
problem:
1) however, when publish wcf iis7.5, able call svc (localhost:8123/productrestservice.svc) without problem, when called method (localhost:8123/productrestservice.svc/getproductlist/1) encountered request error "the server encountered error processing request. see server logs more details." when checked logs found this: 2016-09-07 12:46:44 ::1 /favicon.ico - 8123 - ::1 mozilla/5.0+(windows+nt+6.1;+wow64)+applewebkit/537.36+(khtml,+like+gecko)+chrome/52.0.2743.116+safari/537.36 404 0 2 3 2016-09-07 12:48:26 ::1 /productrestservice.svc/getproductlist/1 - 8123 - ::1 mozilla/5.0+(windows+nt+6.1;+wow64)+applewebkit/537.36+(khtml,+like+gecko)+chrome/52.0.2743.116+safari/537.36 400 0 0 4
i tried changing defaultapppool identity localservice , windows login id, nothing works.
in order confirm problem lies 3rd party dll, changed method getproductlist not load/call 3rd party dll instead return fixed dummy value, , both works perfectly. sure problem caused dll when running without vs2015.
2) reverted code , stopped iis , tried running iisexpress (using iisexpress used vs2015). started using same config file vs2015 inside /config:path-to-code.vs\config\applicationhost.config... encountered same issue, while accessing localhost:17476/productrestservice.svc there not problem.. encountered error when accessing method localhost:17476/productrestservice.svc/getproductlist/1.
question:
q1) how come wcf calling 3rd party dll works when launched using vs2015 , not when launched via iis7.5 or iisexpress independently?
q2) how copy iisexpress settings/config vs2015 iis7.5 , c:\program files\iie express\iisexpress.exe?
any appreciated. thanks!
update: 2) found problem iisexpress.. changed "c:\program files (x86)\iis express\iisexpress.exe" instead of "c:\program files\" , both svc , method work! why not "c:\program files" since os 64bit?
i still cant iis work both, appreciated!
thanks!
update solved!
i managed fix problem. in iis 7.5.76 set defaultapppool advanced settings
1) .net framework version v4.0
2) enable 32-bit application = true
3) identity = localsystem
now, wcf service , method(calling 3rd party dll) works iis , can run production service!
Comments
Post a Comment