Dynamic display WSDL to different users

C

Chang

I am wondering if there is a way to display my WSDL dynamically according to
different user credentials.

For example, I have 3 operations in my web service: func_Calculate_Value1,
func_Calculate_Value2, func_Calculate_Value3

Right now I have 3 customers A, B and C.
A is my Gold customer, and I want him to see all 3 operations.
B is my Silver customer, and I want him to see func_Calculate_Value1,
func_Calculate_Value2
C is my regular customer, and I want him to see func_Calculate_Value1 only.

I assign different user/passwd to A, B, C, and I want to customize what they
can see in WSDL. I don't want a regular customer to see all my operations.
 
J

John Saunders [MVP]

Chang said:
I am wondering if there is a way to display my WSDL dynamically according
to
different user credentials.

For example, I have 3 operations in my web service: func_Calculate_Value1,
func_Calculate_Value2, func_Calculate_Value3

Right now I have 3 customers A, B and C.
A is my Gold customer, and I want him to see all 3 operations.
B is my Silver customer, and I want him to see func_Calculate_Value1,
func_Calculate_Value2
C is my regular customer, and I want him to see func_Calculate_Value1
only.

I assign different user/passwd to A, B, C, and I want to customize what
they
can see in WSDL. I don't want a regular customer to see all my operations.

You can turn off automatic generation of the WSDL by disabling the
"Documentation" protocol in your web.config::

<configuration><system.web><webServices>
<protocols>
<remove name="Documentation"/>
</protocols>
</webServices></system.web></configuration>

You can then give your customers access to the WSDL of your choice by
whatever means you like. For instance, you could serve the WSDL from a web
site on the same server as your web service, and you could use an
HttpHandler to serve it. That handler could require authentication, then
build the WSDL on the fly by using the
System.Web.Services.Description.ServiceDescription class, and return it to
the caller. This might allow clients, depending on the authentication
mechanism, to use Add Web Reference.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top