Exception when calling the dragnet webservice over SSL HTTPS

If you are having a problem using Dragnet, post a message here.

Moderator: SourceGear


Posts: 5
Joined: Tue Jan 17, 2006 5:16 pm
PostPosted: Mon Apr 10, 2006 6:01 am
Hi. We use the dragenetwebservice to add bug through our own interface. This has worked perfectly until we moved dragnet to anohter server which uses SSL. The server does not have a signed certificate.

The problem is, when we call the webservice we get the following exception:

Code: Select all
The remote certificate is invalid according to the validation procedure. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


I have searched the forums before posting but i did not find a solution to my problem. Any ideas what is going on?

Thanks in regards

Posts: 490
Joined: Wed Jan 14, 2004 10:22 am
Location: SourceGear
PostPosted: Mon Apr 10, 2006 10:17 am
If this is your own interface, you may be able to code it to ignore the certificate problem.

The following thread in Microsoft's ASP.NET forum may help you:

http://forums.asp.net/999670/ShowPost.aspx
Mary Jo Skrobul
SourceGear

Posts: 5
Joined: Tue Jan 17, 2006 5:16 pm
PostPosted: Mon Apr 10, 2006 11:39 am
Is worked perfectly. Thanks alot. Much appriciated.

/Anders

Posts: 1
Joined: Fri Jan 05, 2007 5:32 pm
PostPosted: Fri Jan 05, 2007 5:45 pm
I am trying to use this to get around the same problem. Doing it by config didn't work so I pasted the following into my C# code:

internal class AcceptAllCertificatePolicy : ICertificatePolicy
{
public AcceptAllCertificatePolicy()
{
}

public bool CheckValidationResult(ServicePoint sPoint,
X509Certificate cert, WebRequest wRequest,int certProb)
{
// Always accept
return true;
}
}

ServicePointManager.CertificatePolicy = new AcceptAllCertificatePolicy();

but the bolded part gives me: "class, struct or interface must have a return type". I tried public void AcceptAllCertificatePolicy() but I still get this. What am I doing wrong?

Posts: 3558
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
PostPosted: Mon Jan 08, 2007 10:12 am
I've seen this error where the constructor's name does not match the class name due to a typo, but your code looks correct.

I wouldn't think this is the problem, but it might be worth looking at the declaration. Is the declaration of your Accept class in the same assembly as the ServicePointManager.CertificatePolicy call? Does changing the keyword internal to public help?

This doesn't make sense, as I think you would get a protection or violation error due to the classes protection declaration. But other than that, I don't see any other problems in the code.
Jeff Clausius
SourceGear

Return to Support (Dragnet)

Who is online

Users browsing this forum: No registered users and 2 guests

cron