0

I have a web service. I have around 15 web methods in it. Now I want to use session variables. To enable session we can use WebMethodAttribute.EnableSession Property like below for each web method

[WebMethod(EnableSession=true)]
public string GetSomeDetails() {}

But instead of writing for all web methods, I want to do it in only one place. So is there any way to enable session for complete WebService.

dnyaneshwar
  • 1,296
  • 3
  • 18
  • 26

1 Answers1

0

I don't think there is a built in solution for this. Here is a postsharp solution.

Community
  • 1
  • 1
Mertus
  • 1,145
  • 11
  • 17