473,473 Members | 2,124 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

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.Creat eFromCertFile(cert1Path))
proxy.ClientCertificates.Add(X509Certificate.Creat eFromCertFile(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" %>
Nov 14 '07 #1
0 1686

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: bs | last post by:
Hi, I am currently having a problem calling a web service that is secured using a digital certificate. I set up a Windows application to make a call to the service and it works fine. However...
1
by: Lloyd Dupont | last post by:
I'm building a Java Web Services exposed on the internet which I want to restrain the use to only a few authorized programs, that is .NET Windows Service (like IIS, Apache, etc..) I also intend to...
3
by: Kevin Richards | last post by:
I have a .NET web service that needs to be called from any platform. I need to make the Login method of the web service secure. It doesnt matter about the remaining methods, just the password...
5
by: Paul Hasell | last post by:
Hi, I'm trying to invoke a web method asynchronously but just can't seem to get it to tell me when it has finished! Below is the code I am (currently) using: private void...
1
by: mron0210 | last post by:
Hi, I have created a web service using Visual Studio .Net (Visual Studio Tools for Office : Excel project) and secured it using WSE 2.0. I have added a hyperlink in the Excel sheet which...
3
by: Paul Phillips | last post by:
I have been struggling with this for a couple of weeks. I have a digital certificate installed in my certificate collection store on my local computer. The site I am trying to post to also has...
0
by: Paul Phillips | last post by:
I have been struggling with this for a couple of weeks. I have a digital certificate installed in my certificate collection store on my local computer. The site I am trying to post to also has...
6
by: Doug Ferguson | last post by:
I am using a webservice client that was created from a WSDL file in .Net 1.1. The client ALWAYS works the first time I call it. The second call returns one of two exceptions. It either returns...
7
by: =?Utf-8?B?c2lwcHl1Y29ubg==?= | last post by:
Hi I am trying to see if I can call a Library remotely. The library contains a Form that I want to display then pass back some data to user that called this form remotely. I have it working...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.