Home      Members   Calendar   Who's On

Welcome Guest ( Login | Register )
      

Home » BPM.NET 2007/Sharepoint Accelerator 2007 » BPM.NET 2007/Sharepoint Accelerator 2007 » Configuration » User Provider / Forms / Invalid Connection...

15 posts, Page 1 of 2. 12»»

User Provider / Forms / Invalid Connection...Expand / Collapse
Author
Message
Posted Friday, January 18, 2008
Senior Member

Senior MemberSenior MemberSenior MemberSenior MemberSenior MemberSenior MemberSenior MemberSenior Member

Group: Forum Members
Last Login: Friday, March 14, 2008
Posts: 9, Visits: 26
I'm trying to set up a User Provider to connect to an existing database table.  I keep getting "Invalid connection string" errors.  I can't verify the connection string directly, since the syntax (based on the sample on the Central Configuration under the Datasouce field) is not the same as .NET / OLEDB, but I tried the parts and they work.

User Entity properties:

<properties>
   <property name="user_name" type="string" displayname="Full Name" purpose="name"/>
   <property name="user_code" type="string" displayname="Name" purpose="identifier"/>
   <property name="email" type="string" displayname="Email" purpose="email"/>
   <property name="supervisor_user_code" type="string" displayname="Supervisor" purpose="manager"/>
   <property name="default_company_id" type="string" displayname="Pwd" purpose="password"/>
</properties>

User provider properties:

<properties>
   <property name="user_name" type="string" displayname="Full Name" purpose="name"/>
   <property name="user_code" type="string" displayname="Name" purpose="identifier"/>
   <property name="email" type="string" displayname="Email" purpose="email"/>
   <property name="supervisor_user_code" type="string" displayname="Supervisor" purpose="manager"/>
   <property name="default_company_id" type="string" displayname="Pwd" purpose="password"/>
</properties>

Datasouce: (password is not really xxx, I tested with the real one)

(SQL Server 2000 Database)

   server=localhost;database=ePC_06_04_00_25;User ID=sa;pwd=xxx;

I also tried my machine name:

   server=pauyoupc3;database=ePC_06_04_00_25;User Id=sa;pwd=xxx;

Data Table / View    system_user_id

User login property   user_code     (this is a column in the system_user_id table)

I get the error when I click "Test SQL Connection", I get the error.  The Logger console shows:

! - Table Exists failed, - Invalid connection string. Please check MSDTC setting
s and check if Database User settings are valid., Module - C:\WINDOWS\assembly\G
AC_MSIL\Skelta.Configurations.DB\3.5.0.0__2e19164ab495b4e7\Skelta.Configurations
.DB.dll, Source -    at Skelta.Configurations.DB.SqlDbCore.TableExists(String ta
bleName), pauyoupc3, Process - aspnet_wp, 1/18/2008 1:20:35 PM

! - Test Connection failed:-Invalid connection string. Please check MSDTC settin
gs and check if Database User settings are valid., - Invalid connection string.
Please check MSDTC settings and check if Database User settings are valid., Inne
r Exception :Invalid connection string. Please check MSDTC settings and check if
 Database User settings are valid., Module - C:\WINDOWS\assembly\GAC_MSIL\Skelta
.CentralConfigCodeBehind\3.5.0.0__0b81c60a2e4cd174\Skelta.CentralConfigCodeBehin
d.dll, Source -    at Skelta.Configurations.DB.SqlDbCore.TableExists(String tabl
eName)
   at Skelta.CentralConfigCodeBehind.CreateRepository.CreateConnectionString(Boo
lean forTestConnection, String connectionstr, String buttonname)
   at Skelta.CentralConfigCodeBehind.CreateRepository.btnTestForms_ServerClick(O
bject sender, EventArgs e), pauyoupc3, Process - aspnet_wp, 1/18/2008 1:20:35 PM

Post #390
Posted Friday, January 18, 2008
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: Saturday, February 12, 2011
Posts: 133, Visits: 427
Hi,
Can you make sure the MSDTC settings are configured correctly.

First verify if the "Distribute Transaction Coordinator" Service is running on both the Database Server computer and the Client computer.

Go to "Administrative Tools > Services"
Turn on the "Distribute Transaction Coordinator" Service if it is not running. 
If it is running and the client application is not on the same computer as the database server, carry out the following steps on the computer running the database server.

Go to "Administrative Tools > Component Services"
On the left navigation tree, go to "Component Services > Computers > My Computer" Right click on "My Computer" and select "Properties"
Select "MSDTC" tab
Click "Security Configuration"
Make sure you check "Network DTC Access", "Allow Remote Client", "Allow Inbound/Outbound", "Enable TIP"
The service will restart
You may need to reboot your server if it still does not work.

On your client computer use the same procedure as above to open the "Security Configuration" setting. Then make sure you check "Network DTC Access", and "Allow Inbound/Outbound" options. Restart the service and the computer if necessary.

On you SQL Server Service Manager, click the "Service" dropdown, select "Distribute Transaction Coordinator". It should also be running on your server computer.

Regards,

Moderator

Post #391
Posted Saturday, January 19, 2008
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: Saturday, January 19, 2008
Posts: 1, Visits: 2
Pauyou,

Firstly, you may try with the below connection string (uid instead of User Id) and then try the scenario.

server=pauyoupc3;database=ePC_06_04_00_25;uid=sa;pwd=xxx;

If that doesn't help and the same issue persists, then go for the below MSDTC check.

Go to "Administrative Tools > Services"
Turn on the "Distribute Transaction Coordinator" Service if it is not running.
If it is running and the client application is not on the same computer as the database server, carry out the following steps on the computer running the database server.

Go to "Administrative Tools > Component Services"
On the left navigation tree, go to "Component Services > Computers > My Computer"
Right click on "My Computer" and select "Properties"
Select "MSDTC" tab
Click "Security Configuration"
Make sure you check "Network DTC Access", "Allow Remote Client", "Allow Inbound/Outbound", "Enable TIP"
The service will restart
You may need to reboot your server if it still does not work.


On your client computer use the same procedure as above to open the "Security Configuration" setting. Then make sure you check "Network DTC Access", and "Allow Inbound/Outbound" options. Restart the service and the computer if necessary.

On you SQL Server Service Manager, click the "Service" dropdown, select "Distribute Transaction Coordinator". It should also be running on your server computer.

Thanks, Sri

Post #392
Posted Monday, January 21, 2008
Senior Member

Senior MemberSenior MemberSenior MemberSenior MemberSenior MemberSenior MemberSenior MemberSenior Member

Group: Forum Members
Last Login: Friday, March 14, 2008
Posts: 9, Visits: 26
I had made those DTC changes when I got BPM.NET 2007 working the first time using the Skelta List users, and I rechecked them.

I tried uid instead of User Id and it still didn't work.

Finally I tried to connect to a SQL Server 2005 database on another machine (the one I put the Skelta Repository on) - and that worked! 

I guess even the Forms/User Provider featuer does not support SQL Server 2000 (I knew BPM.NET 2007 itself required 2005.

.

Post #396
Posted Monday, January 21, 2008
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: Saturday, February 12, 2011
Posts: 133, Visits: 427
Hi,
BPM.NET 2007 works fine with Sql server 2000 as well as Sql server 2005.There should be some settings which might be causing an issue. Can you use the attached tool to test the connection string which you had provided. Rename the file from.txt to .exe after download.

regards,

Moderator

  Post Attachments 
TestConnection.txt (618 views, 24.00 KB)

Post #397
Posted Monday, January 21, 2008
Senior Member

Senior MemberSenior MemberSenior MemberSenior MemberSenior MemberSenior MemberSenior MemberSenior Member

Group: Forum Members
Last Login: Friday, March 14, 2008
Posts: 9, Visits: 26
OK, I pasted in to Conn-1 and Conn-2:

server=pauyoupc3;database=ePC_06_04_00_25;uid=sa;pwd=xxxx;

Clicked all 3 Test buttons, and they all responded "Connection Success..."

I also tried:

Conn1: server=pauyoupc3;database=ePC_06_04_00_25;uid=sa;pwd=xxxx;

(Skelta Datasource) Conn2: server=dev;database=SkeltaEval1;uid=sa;pwd=xxxx;

Clicked all 3 buttons, and they all responded "Connection Success..."

(To recheck, I pasted the 1st database back into Central Config / User Provider / Datasource and and clicked "Test SQL Connection" and got back "Forms test failed - Invalid connection string. Please check MSDTC settings and check if Database User settings are valid. - Check logger console for more details"

(Also with the connection (same database contents as above):

server=dev;database=PAUYOU060401MSS;uid=sa;pwd=xxxx;

I can use Enterprise Console and logon as a user out of that database, add Queues, and assign users out of that database, so I assume the other configuration settings are correct.)


 

Post #398
Posted Monday, January 21, 2008
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: Thursday, March 12, 2009
Posts: 166, Visits: 707

Hi,

 

Can you send the screen shot of MSDTC settings please?

Regards,

Bineesh

Post #399
Posted Monday, January 21, 2008
Senior Member

Senior MemberSenior MemberSenior MemberSenior MemberSenior MemberSenior MemberSenior MemberSenior Member

Group: Forum Members
Last Login: Friday, March 14, 2008
Posts: 9, Visits: 26
See attached

  Post Attachments 
MSDTC-1.JPG (514 views, 42.05 KB)
MSDTC-2.JPG (468 views, 35.55 KB)
Post #400
Posted Monday, January 21, 2008
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: Saturday, February 12, 2011
Posts: 133, Visits: 427
Hi,
Thanks for the details. The settings looks perfect. The only difference from test connection tool is exception occurs when the connection is open from w3w process. Can you set the connection string correctly and try the below code from an aspx page.

using System.Transactions;

SqlConnection sqlConn = new SqlConnection("server=pauyoupc3;database=ePC_06_04_00_25;uid=sa;pwd=xxxx;");
            try
            {
                System.Transactions.TransactionOptions to = new System.Transactions.TransactionOptions();
                to.IsolationLevel = System.Transactions.IsolationLevel.ReadCommitted;
                to.Timeout = TimeSpan.Zero;
                using (TransactionScope tscope = new TransactionScope(System.Transactions.TransactionScopeOption.Required, to))
                {
                    sqlConn.Open();
                    tscope.Complete();
                }
                }
            catch (Exception ex)
            {
                Response.Write(ex.Message + ((ex.InnerException == null) ? "" : "\r\n \r\nInnerException:" + ex.InnerException.Message));
            }
            finally
            {
                sqlConn.Close();
            }



Moderator
Post #401
Posted Tuesday, January 22, 2008
Senior Member

Senior MemberSenior MemberSenior MemberSenior MemberSenior MemberSenior MemberSenior MemberSenior Member

Group: Forum Members
Last Login: Friday, March 14, 2008
Posts: 9, Visits: 26
This ran OK: (the 2 messages appeared in IE after running, the error message did not appear):

using System;

using System.Data;

using System.Configuration;

using System.Collections;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using System.Web.UI.HtmlControls;

using System.Data.SqlClient;

using System.Transactions;

namespace TestASPX

{

public partial class Connect1 : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

SqlConnection sqlConn = new SqlConnection("server=pauyoupc3;database=ePC_06_04_00_25;uid=sa;pwd=xxxx;");

Response.Write(@"Created Connection</BR>");

try

{

System.Transactions.TransactionOptions to = new System.Transactions.TransactionOptions();

to.IsolationLevel = System.Transactions.IsolationLevel.ReadCommitted;

to.Timeout = TimeSpan.Zero;

using (TransactionScope tscope = new TransactionScope(System.Transactions.TransactionScopeOption.Required, to))

{

sqlConn.Open();

tscope.Complete();

Response.Write(@"Got to: tscope.Complete();</BR>");

}

}

catch (Exception ex)

{

Response.Write(ex.Message + ((ex.InnerException == null) ? "" : "\r\n \r\nInnerException:" + ex.InnerException.Message));

}

finally

{

sqlConn.Close();

}

}

}

}

Post #402
« Prev Topic | Next Topic »

15 posts, Page 1 of 2. 12»»

Reading This TopicExpand / Collapse
-
Active Users: 2 (2 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.

All times are GMT -5:00, Time now is 10:45am

 
Execution: 0.203.11 queries.Compression Enabled.

Copyright © 2002 - 2009 Skelta Software. All rights reserved. Tel: 1 (678) 306 4110 | Email:sales@skelta.com
Skelta - A BPM Workflow Software Company