474,039 Members | 48,944 Online
Bytes | Software Development & Data Engineering Community
+ 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.c er"
Dim cert2Path As String = "certificate2.c er"
Dim proxy As New SecuredWebServi ce()
Proxy.Url = "https://url.asmx"
proxy.ClientCer tificates.Add(X 509Certificate. CreateFromCertF ile(cert1Path))
proxy.ClientCer tificates.Add(X 509Certificate. CreateFromCertF ile(cert2Path))

result=proxy.me thod()
=============== =============== =============== =

I get an error when I do that:
"Request for the permission of type 'System.Net.Web Permission, 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 1745

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

Similar topics

0
1245
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 when I make a call from my ASP.NET page it fails with "System.Net.WebException: The request failed with HTTP status 403: Forbidden". The code that I am using to make the call in both instances is: MyWebService myService = new MyWebService();
1
1809
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 write. I had a hard time finding clear and simple on how to use security with web services. Let's imagine I get it right (I'm not sure) I runned a 'secure' Hello web services on Sun's app server. Now I try to connect to it with a .NET client.
3
2067
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 parameter of the Login call needs to be encrypted. Trying to do this platform independently seems to be difficult. I feel certificates is a bit over the top for what I am trying to acheive. Does anyone know of a way to make a single mthod of a...
5
3274
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 btnUpload_Click(object sender, System.EventArgs e) { try { SOPWebService.Client uploader = new
1
3505
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 when clicked invokes the web service. It works when I invoke the non secure web service. But
3
1492
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 our certificate installed is said it is ready to recieve transactions. I have created a file (xml) and I want to post to the given web address. An example of the web address is https://some.company.com/location this is what I have tried:
0
1083
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 our certificate installed is said it is ready to recieve transactions. I have created a file (xml) and I want to post to the given web address. An example of the web address is https://some.company.com/location this is what I have tried:
6
6279
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 the error: A) The connection has been closed on a receive : Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
7
2194
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 some-what. I am able to call form remotely and return data to client but somewhere after closing remote form and returning data - I get a Windows exception -
0
10532
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10328
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
12121
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
11983
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10297
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7858
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6814
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
5401
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 we have to send another system
3
3951
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.