WCF Service using ASP.NET Forms Authentication -


i invoking wcf web service (.net 4.0) via jquery $.ajax() asp.net page. how can secure wcf service such authenticated asp.net users can invoke service's methods? need imperatively check forms authentication cookie manually in each service method, or there more declarative approach?

solution: move .svc files under "services" directory (or directory hold services secured) , secure directory own web.config. configure location deny anonymous users:

<?xml version="1.0"?> <configuration>    <system.web>     <authorization>       <deny users="?"/>     </authorization>   </system.web>  </configuration> 

Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -