new UsernameToken exception from web page that consumes web service using soap

I've the following problem, that is generating a UsernameToken in an asp.net page:
1) a web service (.net 1.1, WSE 2.0 SP3) that requires soap authentication with myUsernameTokenManager implementation

2) a winForm client (.net 1.1, WSE 2.0 SP3) that consumes the web service passing a UsernameToken in the Soap messages.

3) a web client that does the same as the winForm client but with error when generating the UsernameToken to add to the SoapContext.

Here is the piece of code: 

UsernameToken tok = new UsernameToken(CurrentUser.Instance.UserID, CurrentUser.Instance.Password, PasswordOption.SendPlainText);
webServ.RequestSoapContext.Security.Tokens.Add(tok);
DerivedKeyToken dks = new DerivedKeyToken(tok);
webServ.RequestSoapContext.Security.Tokens.Add(dks);
MessageSignature sig = new MessageSignature(dks);
webServ.RequestSoapContext.Security.Elements.Add(sig);
DerivedKeyToken dke = new DerivedKeyToken(tok);
webServ.RequestSoapContext.Security.Tokens.Add(dke);
EncryptedData enc = new EncryptedData(dke);
webServ.RequestSoapContext.Security.Elements.Add(enc);
The red line generates an Exception like:
WSE040: Type CLASSNAME.MyUsernameTokenManager, ASSEMBLYNAME could not be loaded. Please check the configuration file
where CLASSNAME and ASSEMBLYNAME are the name of the "Server" class an Assembly name... very strange since i'm on the client side!
Can someone help me, of give me some hint? Has it something to do with the impersonation of asp.net?
Thank You.
 
0
Lore71
7/27/2006 2:26:28 PM
asp.net.web-forms 93655 articles. 5 followers. Follow

0 Replies
664 Views

Similar Articles

[PageSpeed] 1

Reply:

Similar Artilces:

Changing URL in web.config for web service
I added a web reference to asmx file. In web.config - it adds - undefinedadd key="CoreService.CoreServices" value="http://test/CoreServices.asmx I then change it to <add key="CoreService.CoreServices" value="http://test2/CoreServices.asmx"/> But CoreService.CoreServices still looks for http://test/CoreServices.asmx.  What else do i have to change? I think CoreService.CoreServices are hard coded into the source code.  Girijeshhttp://www.girijesh.in/ I think CoreService.CoreServices are hard coded into the source code.  Girijeshhttp://www.girijesh.in/ So no ...

web web web
Name: bahadir Email: sensiz_olmuyor_t1_at_hotmail.com Product: Firefox 2 Beta 2 Summary: web web web Comments: web sayfası yapmak Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.8.1b2) Gecko/20060821 Firefox/2.0b2 ...

want to allow create new web page and edit exiting web page using my web application?
 I am using asp.net 2.0 VS 2005 pro edition. I want to make web application(web form)  where my uses can go and create simple web page or can create page , so then can add page/edit features let me know if some one know , how to do this , any idea, I want to allow my user to create web page and edit web page using my web applications. some one tell me how to do that Note : I dont want to use HTMl editor or any third party software tools thank you maxmax Hello, There is many ways you can implement this. And to build your application you to need to understand the exact ou...

Consuming Web service from .net 3.5 web application using ajax
Hi , Before in .net 2005 ,I use to consume the  web service from client side via Ajax and java script. that's just adding web service inside the script manger services.But  it was not possible with .net 2008 version WEB APPLICATION   , Even it works well with .net 2008 web sites. Please help me to solve the issue. I have no idea what you mean. Please post the code that "does not work". NC...   I have the same problem.  I have a .NET 3.5 Web Application not Web Site.  I fully qualify the web service with the namespace i,e,  &n...

New to web services...need help consuming web service
Hi guys. I am trying to use the NBA standing web service(developed by 4guysfromrolla) on my website and I cant seem to get it to work correctly. Its listed below. http://nbaweblog.com/nba/standings.asmx Tutorial is on the below page--http://aspnet.4guysfromrolla.com/articles/111203-1.aspx I made a web reference in my asp.net web project but when I go to create the object it gives me the Type "NBA.standings " not defined. I am copying the code exactly from the page. I put the imports system.web.services at the top of the page. This is my code from the page load event Dim proxy As N...

Can you return .net web controls in a .net page from a web service?
I've got a problem with a project. I've got to compile an entire .net page and return it as part of a Web Service for display. The problem I have is that I need to add WebControls and functionality to the page so that not only the html content and images are displayed (which I've managed) but that textboxes, labels, buttons and datasets can be displayed also. Essentially I need to make a call from one site for a page, populate the page and return it in a state as though it resided on the same server/webspace as the calling page. Code is currently built as follows into a string: strOpenHT...

How to build a web page to consume a web service?
 Hi,I have built a web project in visual studio 2005 and web reference to the project.(for instance I use "ws1" for the reference name).My question is how to use the web server function with the web reference.(for instance I have a web service function sayHello())Please help me. Thanks Mark     This video will show you how. http://www.asp.net/learn/videos/video-280.aspxSteve Wellens My blog  Hi marks416,Please go through this links, it will help you to know the web service in details with sample code.http://www.codeproject.com/KB/XML/Web...

Need Windows Form to Retrieve Information From Web Form
I have a cash and carry web site that customers can order products, the next day come in to the company to pay and pickup. I would like to create a windows application for the company to do two things: 1. download all the orders from the day before 2. upload price changes, product changes, category changes I've search the internet and forums and the only thing I can find that I think would actually link these two together would be a web service. Can you please tell me if I am heading in the right direction or if there is another method to link the two applications, if there are any pitf...

How to call a .net web service from another .net web service?
Hi all,I have developed two asp .net web services using visual studio .net 2003.I wish to call one web service from another web service.I tried adding a web reference of the web service in another web service and was able to do so.but i m not able to access the web methods provided by the web servicecould you please suggest a way to go about itExpecting quick replyThanxCharmy try to make sure that you reference it in the web reference and call it properly this is sample  [WebMethod()] public double CalcDistance(int x1, int y1, int x2, int y2) { Calculator.Service1 calc = new...

Can my web page with a form submit to other web pages forms?
I was wondering if I created an aspx page that had a form on it that I could use the submit button to submit this form's contents to other web pages forms(servers accepting those form's data). I am thinking this would be a great way to update data on particular web pages without having to actually visit those similar web pages. Any ideas, examples would be much appreciated. Thanks in advance.  Yes you can.  It's called Cross Page Posting: http://msdn2.microsoft.com/en-us/library/ms178139.aspxAlso: http://msdn2.microsoft.com/en-us/library/ms178140.aspx might ...

Why don't I see the "use master page" check box when I add a new web form to my web app?
From what I've read I should see this check box whenever I add a new web form but I don't.  Should I add something else instead of a web form or is there a flaw in my web apps install? Woot! I found the answer!  There is an item in the add new item dialog box called web content form! If you use this instead of the web form then all is good and warm fuzzy!...

Web service or Web page?
One client want to communicate with our server. The data is simple. So I think that there are the following solutions to solve this problem. 1. the client use httpwebrequest to send data by get or post method. The server side is a web page. It can parse the request and retrieve data from query. After processing these data, the server send back a response objec to the client. This solution can be used whatever the client is a window application or a web application. The problem is that the server send the whole web page to the client. In order to solve this problem, I use in-line se...

.Net Web Form & Web Service Deployment
Hi all I have written some test web services and some web form applications and deployed them to my IIS. That's fine but I now want to deploy them to my real IIS server. I have created an msi for each but the problem is I seem to only be able to deploy to the default web site. Our default web site is turned off and instead we use several other sites. Does anybody happen to if Powerbuilder 11 supports non default web sites? If not do I need to hack the msi and if so can anybody suggest a suitable tool. I have Orca but it's not very friendly. Unless of course I knew exactly w...

Web service in .NET from Java Web Service
Hi there,I'm pretty new to .net (although i have years of experience with the old vb 6, access 2k, as well as java)... and need some with perhaps either some syntax or something.Here is the wsdl.<wsdl:definitions targetNamespace="http://www.dynix.com/schema/book">−<wsdl:types>−<schema targetNamespace="GetBookInfoByISBN">−<complexType name="BookInfoType">−<sequence><element maxOccurs="1" minOccurs="0" name="Title" nillable="true" type="xsd:string"/><element maxOccurs=&quo...

Web resources about - new UsernameToken exception from web page that consumes web service using soap - asp.net.web-forms

IdentityBlog - Digital Identity, Privacy, and the Internet's Missing Identity Layer
Kim Cameron's Identityblog contributes to the discussion of Identity and Privacy issues and technology. If focuses on the user-centric identity ...

leastprivilege.com
In May 2012 I migrated my blog from self-hosting to WordPress. In the process I lost all permalinks and other content links might be broken as ...

Integrating With Fusion Application Using Services (Perl: SOAP::Lite)
Blogs.Oracle.Com - Fusion Applications Developer Relations

How to remove WS-Security tokens from a SOAP message
After you've validated a UsernameToken, or checked an XML Signature, it is often good practice to then strip out the WS-Security blocks containing ...

WS Security Performance - Francois Lascelles
The WS Secure Conversation specification describes a mechanism letting multiple parties establish a context (using the WS Trust Request Security ...

Sam Ruby: More noncense
... back in the blogosphere, this time in a newhome. I've updated my blogroll. Welcome back! The occasion? To defend the use of a standard UsernameToken ...

Sitemap
Home Archives All Articles Contact Privacy Policy Home Java Struts Spring Hibernate WebService Eclipse Get the latest in your inbox for free ...

Archive
Archive - JCooney.NET

Replay Attacks: Why "If it works twice, then it doesn't work" makes sense
Everyone who has ever performed a demo has had the experience of being asked "Can you send that message once more, I want to see will it work ...

Resources last updated: 12/11/2015 12:17:47 AM