c# - "Current user *** have no permission.",it showed this while using SqlCacheDependency and HttpRuntime.Cache.How to solve it? -
sqlcachedependencyadmin.enablenotifications(connstring); sqlcachedependencyadmin.enabletablefornotifications(connstring, tablename); sqlcachedependency sqldenpendency = new sqlcachedependency(entryname, tablename); httpruntime.cache.insert(key,lstdata,sqldenpendency,datetime.now.addminutes(timeout), cache.noslidingexpiration);
when used sqlcachedependency save data httpruntime.cache
this,there runtime error following:
current user uu163 have no permission . transaction ended in trigger. batch has been aborted.
[sqlexception (0x80131904): current user uu163 have no permission . transaction ended in trigger. batch has been aborted.] system.data.sqlclient.sqlconnection.onerror(sqlexception exception, boolean breakconnection, action
1 wrapcloseinaction) +2442126 system.data.sqlclient.sqlinternalconnection.onerror(sqlexception exception, boolean breakconnection, action
1 wrapcloseinaction) +5736904 system.data.sqlclient.tdsparser.throwexceptionandwarning(tdsparserstateobject stateobj, boolean callerhasconnectionlock, boolean asyncclose) +628 system.data.sqlclient.tdsparser.tryrun(runbehavior runbehavior, sqlcommand cmdhandler, sqldatareader datastream, bulkcopysimpleresultset bulkcopyhandler, tdsparserstateobject stateobj, boolean& dataready) +3731 system.data.sqlclient.sqlcommand.runexecutenonquerytds(string methodname, boolean async, int32 timeout, boolean asyncwrite) +940 system.data.sqlclient.sqlcommand.internalexecutenonquery(taskcompletionsource`1 completion, string methodname, boolean sendtopipe, int32 timeout, boolean asyncwrite) +272 system.data.sqlclient.sqlcommand.executenonquery() +280 system.web.caching.sqlcachedependencyadmin.setupnotifications(int32 flags, string table, string connectionstring) +752
how solve error?
wiki
Comments
Post a Comment