call secure web service (thru cer) from a web service

call secure web service (thru cer) from a web service

Post by VFRL » Thu, 15 Nov 2007 12:49:01


I have a vb.net web service. I am trying to call another webservice that is
secured through certificate. I have received the certificate file and I am
trying to call the service using the file. I am having some challenges such
as:

1. I can not add a web reference to the secure service. Error: The request
failed with HTTP status 400: Bad Request.
2. to overcome this, I asked for a proxy class. I received the dll and I
added it as a reference in bin. I then have the following code:
=======================================
Dim cert1Path As String = "certificate1.cer"
Dim cert2Path As String = "certificate2.cer"
Dim proxy As New SecuredWebService()
Proxy.Url = "https://url.asmx"
proxy.ClientCertificates.Add(X509Certificate.CreateFromCertFile(cert1Path))
proxy.ClientCertificates.Add(X509Certificate.CreateFromCertFile(cert2Path))

result=proxy.method()
==============================================

I get an error when I do that:
"Request for the permission of type 'System.Net.WebPermission, System,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=XXXXXXXXXXXXX' failed"

3. Can some one do me a big favor and tell me how I can refer to a file
under App_Data or App_Code other than using "~/App_Code/Filname". I get an
error when I move the code to the server and run it using the url versus
Visual Studio start button. It complains that "File not found" or

Parser Error
Description: An error occurred during the parsing of a resource required to
service this request. Please review the following specific parse error
details and modify your source file appropriately.

Parser Error Message: Could not create type 'XXXXX'.

Source Error:


Line 1: <%@ WebService Language="vb" CodeBehind="~/APP_Code/XXXXXX.vb"
Class="XXXXX" %>
 
 
 

1. InvocationTargetException when calling "new Service()" in Axis web service to call another web service

2. SN#18889 Webinar: Web Services SSO - Securing Web Services in a Federated World

SYSTEM NEWS FOR SUN USERS
Vol 116 Issue 4 2007-10-22 Article 18889 from section "Security"

Register Now for This October 31st Event

This Sun-sponsored webinar will cover standards (SAML, WS-Trust and
WS-Security); Federated Single Sign-on (SSO); service gateways;
secure token services; and web services security container plug-ins.
Presenters will be Dave Linthicum, Linthicum Group; Daniel Raskin and
Kevin Schmidt, Sun. The event is scheduled to take place on
Wednesday, October 31st at 12 noon (EST).

Details at http://www.yqcomputer.com/

Have a custom version of 'System News for Sun Users' delivered to you
via email each week in PDF, text or HTML. Only the sections that you
select will be included in your copy of the news magazine. Subscribe at
http://www.yqcomputer.com/
(c) 2005 System News, Inc. http://www.yqcomputer.com/

3. Interfacing with MQ Series or Secured Web Service(web service with a digital certificate) using Oracle

4. Calling one web service from another web service

5. Calling a Web Service using Axis, from within an Axis Web Service running under Tomcat

6. SSRS - Retrieving XML data from a web service/calling web service from report problems...

7. web-service call from inside a web-service - AV

8. Calling an Asynch web service within a web service.

9. Web Service Call hangs from Web Service

10. Timeout errors making a web service call from another web service

11. How to call a web service using NT Authentication from Web Service

12. 'web service call failed: 500' using ajax hovermenu and web service

13. Calling Google Web Service in VBA using Web Services Toolkit - Invalid OLEVERB structure error