is port cached in StoreConnection for model?

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
urbanr
Posts: 9
Joined: Tue 23 Apr 2019 11:52

is port cached in StoreConnection for model?

Post by urbanr » Thu 31 Oct 2019 00:42

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?

Shalex
Site Admin
Posts: 8921
Joined: Thu 14 Aug 2008 12:44

Re: is port cached in StoreConnection for model?

Post by Shalex » Thu 31 Oct 2019 19:54

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.

urbanr
Posts: 9
Joined: Tue 23 Apr 2019 11:52

Re: is port cached in StoreConnection for model?

Post by urbanr » Thu 31 Oct 2019 22:01

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?

Shalex
Site Admin
Posts: 8921
Joined: Thu 14 Aug 2008 12:44

Re: is port cached in StoreConnection for model?

Post by Shalex » Fri 01 Nov 2019 20:03

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.

lucas21
Posts: 3
Joined: Thu 28 Nov 2019 05:38
Contact:

Re: is port cached in StoreConnection for model?

Post by lucas21 » Thu 28 Nov 2019 11:11

Thats true 1521 is default port, ok, will try it out thanks for the information

Post Reply