We have our own HttpModule and have implemented a Username token manager.
Within the token manager we create our own user and assign it to the current
context. In the HttpModule_PreRequestHandler we verify that the user can
access the web method that they have requested.
This works fine, but poses a problem when you try to add a web reference
within the IDE. As the IDE does not create a username token, the web service
cannot verify the user and an error occurs. This means that we cannot add a
web reference within the IDE. Nor can we do so using WSDL.
Can you pass in a username token when adding a web reference? Is there a way
to at least pass one in via wsdl?
Thanks
Mike
I am now finding that I need to generate the proxy class using WseWsdl2.exe.
But, when I run it I get the following error:
An error occurred processing this WSDL. More information:
System.InvalidCastException: Specified cast is not valid.
at ClientGen.ClientGen.WriteCSOperationBinding(StreamWriter writer,
ServiceDe
scription desc, OperationBinding op)
at ClientGen.ClientGen.WriteOperationBinding(StreamWriter writer,
ServiceDesc
ription desc, OperationBinding op)
at ClientGen.ClientGen.WriteClass(StreamWriter writer, ServiceDescription
des
c, String className, String url, Binding binding)
at ClientGen.ClientGen.GenerateCode(ServiceDescription desc, String
outputFil
e, XmlSchemas schemas)
at ClientGen.ClientGen.GenerateCode(String descriptionFile, String
outputFile
, XmlSchemas schemas)
at ClientGen.Class1.Main(String[] arguments)
Any thoughts? I've updated my policy.config to include:
<operation
requestAction="http://schemas.microsoft.com/wse/2003/06/RequestDescription">
<request policy="" />
</operation>
which I got from
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wse/html/fe8145
4b-678f-4912-89a6-b77ad423cc10.asp, thinking that would help, but not.
> We have our own HttpModule and have implemented a Username token manager.
> Within the token manager we create our own user and assign it to the current
[quoted text clipped - 11 lines]
> Thanks
> Mike
SA - 10 Feb 2005 00:47 GMT
For your situation, it's probably best to write your own proxy and base it
on SoapClient (or SoapSender if you don't need request/response).

Signature
Sven.
> I am now finding that I need to generate the proxy class using WseWsdl2.exe.
> But, when I run it I get the following error:
[quoted text clipped - 21 lines]
>
> <operation
requestAction="http://schemas.microsoft.com/wse/2003/06/RequestDescription">
> <request policy="" />
> </operation>
>
> which I got from
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wse/html/fe8145
4b-678f-4912-89a6-b77ad423cc10.asp,
thinking that would help, but not.
> > We have our own HttpModule and have implemented a Username token manager.
> > Within the token manager we create our own user and assign it to the current
[quoted text clipped - 11 lines]
> > Thanks
> > Mike