You need to sign in to do that
Don't have an account?
AaronLau
Single Sign-On with "service is currently down" error
We are using a developer edition to test SSO, the organization id of the developer edition is "00D3000000018e5", the Single Sign-On Gateway URL configured is: "https://salesforce.didata.com/SignleSignOn/SingleSignOn.asmx". but when we tested it, there is an error "Your company's authentication service is currently down. Please contact the administrator at your company for more information.", the meaning of this error I think is "https://salesforce.didata.com/SignleSignOn/SingleSignOn.asmx" is not accessible, but the true is that is a valid web service url. could you anyone tell me where the problem is? do I miss anything?
All Answers
Hi Simon,
Could you please let me know what's the the right XML namespaces?
I have set the Namespace as below, but it's still getting the same error.
Appreciate if you could let me know anywhere in my XML that's wrong. Our webservice URL is: http://salesforce.tycoasia.com
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Web;
using System.Web.Services;
using System.DirectoryServices;
namespace SalesforceWebService{
/// <summary>
/// Summary description for SforceAuthenticationService.
/// </summary>
[WebService(Namespace = "urn:authentication.soap.sforce.com")]
public class SforceAuthenticationService : System.Web.Services.WebService{
[System.Web.Services.WebMethodAttribute()]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("",
RequestNamespace="urn:authentication.soap.sforce.com",
ResponseElementName="AuthenticateResult",
ResponseNamespace="urn:authentication.soap.sforce.com",
Use=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
[return: System.Xml.Serialization.XmlElementAttribute("Authenticated")]public AuthenticateResponse Authenticate ( string username,
string password, string sourceip){
AuthenticateResponse response = new AuthenticateResponse();// try and bind to an AD entry, this will authenticate the username & password we supply
// TODO: you'll need to change this to match your AD name
const string root = "LDAP://servername/OU=Asia,OU=APAC,OU=Divisions,DC=TYCOFS,DC=COM";try
{
String username1 = username.Replace("@tycoint.com.ASIADEV", "");
String account1 = "tycofs\\" + username1;
DirectoryEntry de = new DirectoryEntry(root, account1, password);// retrieve a property
string tempName = de.Name;response.Authenticated = true;
return response;//System.Diagnostics.EventLog.WriteEntry("Salesforce_WebService", "Username: " + username + "Password: " + password, System.Diagnostics.EventLogEntryType.SuccessAudit, 3);
}
catch(Exception){
response.Authenticated = false; return response;}
}
}
}
======================================
AuthenticateResponse.cs
===================
using System;
namespace SalesforceWebService{
/// <summary>
/// Summary description for AuthenticateResponse.
/// </summary>
public class AuthenticateResponse{
private bool authenticated; public bool Authenticated{
get{ return authenticated;}
set{ authenticated = value;}}
}
}
=================================================
This is the Response that will be sent to Salesforce.