We have recently developed a web form that submits payables trasactions to Microsoft Dynamics GP via econnect. The form works in our testing environement but once we moved to production we are expereincing a problem. In our testing environement the econnect installation as well as the GP SQl databases reside on the same server where as in production the GP databases on a a sql server and econnect it installed along with the Microsoft Dynamics GP server software on a separate application server.
When trying to submit the form in the production environement we receive the following error:
10/15/2008 5:37:02 PM Error: The server process could not be started because the configured identity is incorrect. Check the username and password. (Exception from HRESULT: 0x8000401A)
I have checked the username and password under componenet services -- computers 00 My Computer -- Com + Applications -- econnect service and the identity used is a domain admin account that has full access to the SQL instance where the GP databases are located.
I used the follwing KB article on partner source as a reference with no success. KB873981
Any assitance you can provide would be greatly appreciated.
The follwoing is the eConnect9.0 code snippet I used for creating a new Batch:
public void SerializeNewBatchCreateObject()
{
SMTransactionBatchType smTrxBatchType = new SMTransactionBatchType();taCreateUpdateBatchHeaderRcd header = new taCreateUpdateBatchHeaderRcd();
try
{
//Populate the elements of the first PMTransaction
header.BACHNUMB = txtBatchNum.Text.Trim();
// GET THE NEW BATCH NUMBER
header.BCHCOMNT = txtBatchComment.Text.Trim();
// Batch Comments
header.BCHSOURC=
"PM_Trxent"; // Batch Source
header.SERIES = 4;
// 4-Purchasing
header.ORIGIN =
Convert.ToInt16(ddlOrigin.SelectedValue); //Get the Selected Origin
header.BACHFREQ =
Convert.ToInt16(ddlFrequency.SelectedValue.ToString()); //Get the Selected frequency
header.GLPOSTDT = txtBatchDate.Text.Trim();
//get the Batch creation Date from the WF
header.CHEKBKID = ddlCheckbookID.SelectedValue;
int UserIdLength = WindowsIdentity.GetCurrent().Name.Length; // Is this creating a problem ??
header.USERID =
WindowsIdentity.GetCurrent().Name.Substring(15, UserIdLength - 15); // Is this creating a problem ??
//Add the header node to the Batch type object
smTrxBatchType.taCreateUpdateBatchHeaderRcd = header;
//Create an eConnect document object and populate i with the transaction type objecteConnectType eConnect = new eConnectType();SMTransactionBatchType[] myTrans = { smTrxBatchType };
eConnect.SMTransactionBatchType = myTrans;
//serialize to a memory stream.XmlSerializer serializer = new XmlSerializer(eConnect.GetType());MemoryStream memStream = new MemoryStream();
serializer.Serialize(memStream, eConnect);
memStream.Position = 0;
//read from the memory stream to a string variable to pass to the eConnect API.string xml = "";
XmlTextReader xmlreader = new XmlTextReader(memStream);while (xmlreader.Read())
xml = xml + xmlreader.ReadOuterXml();
memStream.Close();
eConnectMethods eConCall = new eConnectMethods();
// Create a connection string to the Microsoft Dynamics GP Server
//Integrated security is required ( Integrated Security=SSPI)string cnString = "data source=SVRSQL02\\ABC;initial catalog=XYZ;Integrated Security=SSPI;Persist Security Info=True;User ID=aa;Password=bbb;packet size=4096";
bool result;
// Create an AP Invoice in MIcrosoft Dynamics GP. Returns true if successresult = eConCall.eConnect_EntryPoint(cnString, EnumTypes.ConnectionStringType.SqlClient, xml, EnumTypes.SchemaValidationType.None, "");
}
catch (System.Exception exc)
{
string sMsg = Environment.NewLine + DateTime.Now.ToString() + " Error: " + exc.Message + Environment.NewLine + Environment.NewLine;
LogFile(sMsg);
}
finally
{
//eConCall.Dispose();
}
}