c# - Managing membership provider on web service the right way -
i have silverlight 5 app , wcf service stores/gets membership api information related users sybase anywhere provider.
piece of web.config
:
... <profile defaultprovider="saprofileprovider"> <providers> <clear /> <add name="saprofileprovider" type="ianywhere.web.security.saprofileprovider" connectionstringname="mycontext" applicationname="/" commandtimeout="30" /> </providers> <properties> <add type="system.string" name="myuserdata" /> ...
the service returns data stored in myuserdata
public string getmyuserdata() { try { string result = null; result = httpcontext.current.profile.getpropertyvalue("myuserdata") string; if (result == null) { result = string.empty; } return result; } catch (exception e) { _logger.errorexception(e.message, e); throw; } }
but error:
invalid request on pooled connection ianywhere.data.sqlanywhere.saexception (0x80004005): run time sql error -- * error * assertion failed: 104909 (12.0.1.3967)
can replace catch this?
catch (exception e) { _logger.errorexception(e.message, e); }
Comments
Post a Comment