开发者

Access WebService variable in projects referenced by the webservice

I have a .net c# web service that references other projects to achieve whatever it needs to.

I need to have a variable set with a unique guid for each call to a web method in the webservice.

The variable/value does not need to be visible/accessible/outputted to the consumers of the webservice.

This variable(the value in the variable) should be accessible in the projects that the webservice references, but i cannot explicitly pass it as a parameter to any of the functions in the projects.

The variable/value only needs to be alive for the lifetime of the webmethod call and be reset for 开发者_如何学运维each new call to the web method.

What kind of variable(static, global, local etc.) should be used and where should it be declared?

Thanks!


Thanks to whoever had answered(but strangely deleted the answer) and suggested using InternalsVisibleTo attribute.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜