Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / February 2005

Tip: Looking for answers? Try searching our database.

Bypassing WSE to add web reference

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike - 02 Feb 2005 15:41 GMT
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
Mike - 02 Feb 2005 17:17 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.