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
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"
I get an error when I do that:
"Request for the permission of type 'System.Net.WebPermission, System,
Version=188.8.131.52, 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
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'.
Line 1: <%@ WebService Language="vb" CodeBehind="~/APP_Code/XXXXXX.vb"