tags:

views:

12

answers:

0

Hi, our customer need us to host/consume WCF in one project, I'm new to WCF now,

  1. It's a B/S project, IIS directory named [Project1]
  2. in the project, web.config - Authentication mode="Forms"

<authentication mode="Forms"> <forms name=".cspaccess" path="/" loginUrl="/Core/Login.aspx" protection="All" timeout="15"></forms> </authentication> <authorization> <deny users="?"/> </authorization>

  1. host a WCF service in the project [SvcFolder/WebSvc.svc], I can visit the wcf service at http://localhost/project1/SvcFolder/WebSvc.svc, but due to the permission checking in #2, page redirect to login.aspx
  2. add this(#3) WCF service reference, but failed, page redirected to the login.aspx, and shows 'cannot find service'.

My question is,

  1. How to add the WCF service hosting within the same project?

  2. How to get the currentUser's session in the WCF service?

  3. Why need to use WCF service in the case?

Thanks.