Page 1 of 1

is port cached in StoreConnection for model?

Posted: Thu 31 Oct 2019 00:42
by urbanr
Hi,
I have updated edml connection string in Database explorer with new port number,
saved and rebuild but when running app (mvc with webapi) it uses previous port 1521.
The result is I'm getting NET: Invalid SID error
Cannot find anywhere embedded that number in code, where is it taken from?

Re: is port cached in StoreConnection for model?

Posted: Thu 31 Oct 2019 19:54
by Shalex
1521 is the default port number. Refer to https://www.devart.com/dotconnect/oracl ... tring.html.

Enable the dbMonitor tool and check actual connection string used by runtime of your application.

Re: is port cached in StoreConnection for model?

Posted: Thu 31 Oct 2019 22:01
by urbanr
I know 1521 is default port, I have changed it and it still exist somewhere.

Connection string on DBMonitor seems to be OK:

Open connection: "User Id=xxxxx;Password=yyyyy;Server=zzzzzzz;Direct=True;Sid=abc;Persist Security Info=True" Error
Connect: "User Id=xxxxx;Password=yyyyy;Server=zzzzzzz;Direct=True;Sid=abc;Persist Security Info=True" Error

NET: Invalid SID

I can connect fine with oracle developer to that database with these credentials

Question is can I change default port for oracle dot connect?

Re: is port cached in StoreConnection for model?

Posted: Fri 01 Nov 2019 20:03
by Shalex
Your connection string doesn't include the Port parameter. Please add "Port=your_value;" to the connection string.

When you update your connection string in *.edml via Tools > Entity Developer > Database Explorer, this should update the connection string in *.edps. And the new connection string should be used by your context constructor after you save the model to regenerate the code.

Re: is port cached in StoreConnection for model?

Posted: Thu 28 Nov 2019 11:11
by lucas21
Thats true 1521 is default port, ok, will try it out thanks for the information