Skip to content

Commit 4dd31c5

Browse files
committed
Updated Readme
1 parent e1e53d3 commit 4dd31c5

File tree

1 file changed

+64
-1
lines changed

1 file changed

+64
-1
lines changed

README.md

Lines changed: 64 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,79 @@
11
# Verify FormsAuthentication cookie on request through custom attribute
22
httpModule for verification of FormsAuthentication cookie on request, using a custom attribute.
33

4-
Currently supported use cases:
4+
## Currently supported use cases:
5+
6+
### C#:
7+
8+
#### Decorated on a PageMethod or ASP.NET Ajax WebMethod:
9+
510
```csharp
611
[RequiresAuthentication]
712
[WebMethod]
813
public string AjaxMethod() {
914
```
1015

16+
17+
#### Decorated on a Page, MasterPage or ASP.NET Ajax WebService Class:
18+
##### Page Class:
1119
```csharp
1220
[RequiresAuthentication]
1321
public partial class WebFormsPage : System.Web.UI.Page
1422
```
23+
##### MasterPage Class:
24+
```csharp
25+
[RequiresAuthentication]
26+
public partial class WebFormsMasterPage : System.Web.UI.MasterPage
27+
```
28+
##### WebService Class:
29+
```csharp
30+
[RequiresAuthentication]
31+
[System.Web.Script.Services.ScriptService()]
32+
[WebService(Namespace = "http://localhost:8080/")]
33+
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
34+
[global::Microsoft.VisualBasic.CompilerServices.DesignerGenerated()]
35+
public class AspAjaxWebService : System.Web.Services.WebService
36+
{
37+
}
38+
```
39+
40+
---
41+
42+
### VB:
43+
44+
#### Decorated on a PageMethod or ASP.NET Ajax WebMethod:
45+
```vb
46+
<RequiresAuthentication>
47+
<WebMethod>
48+
public function AjaxMethod() as string
49+
```
50+
51+
#### Decorated on a Page, MasterPage or ASP.NET Ajax WebService Class
52+
##### Page Class:
53+
```vb
54+
<RequiresAuthentication>
55+
Partial Class WebFormsPage
56+
Inherits System.Web.UI.Page
57+
```
58+
59+
##### MasterPage Class:
60+
```vb
61+
<RequiresAuthentication>
62+
Partial Class WebFormsMasterPage
63+
Inherits System.Web.UI.MasterPage
64+
```
65+
66+
##### WebService Class:
67+
```vb
68+
<RequiresAuthentication>
69+
<System.Web.Script.Services.ScriptService()>
70+
<WebService([Namespace]:="http://localhost:8080/")>
71+
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)>
72+
<[global].Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
73+
Public Class AspAjaxWebService
74+
Inherits System.Web.Services.WebService
75+
End Class
76+
```
77+
1578
<br/>
1679
Remember to set the FormsAuthentication cookie!

0 commit comments

Comments
 (0)