Authentication problem while regenerating the code

Posts   
 
    
Romi
User
Posts: 11
Joined: 21-Aug-2009
# Posted on: 11-Jan-2010 13:47:11   

Hi,

I am facing a problem with authentication. There is a .lgp file in our project, which was previously generated. Now we have to add some new tables and fields. When i do unattended refresh for all catalogs, the llbl throws an error saying invalid username/password. I made changes to app.config file with <add key="Main.ConnectionString" value="data source=database;user id=abc;password=actual password;persist security info=false;"/>

and then tried again. But this did not help.

The code which is already present in our project was generated with different password and now the password has changed. I modified the password to the current password, but still it gives me the same error. INVALID USERNAME/PASSWORD.

Do i have to make changes somewhere else also to be able to establish a connection to database and reflect the changes made in the database?

Please guide

Core exception :- -----[Core exception]-------------------- at System.Data.OracleClient.OracleException.Check(OciErrorHandle errorHandle, Int32 rc) at System.Data.OracleClient.OracleInternalConnection.OpenOnLocalTransaction(String userName, String password, String serverName, Boolean integratedSecurity, Boolean unicode, Boolean omitOracleConnectionName) at System.Data.OracleClient.OracleInternalConnection..ctor(OracleConnectionString connectionOptions) at System.Data.OracleClient.OracleConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.OracleClient.OracleConnection.Open() at SD.LLBLGen.Pro.DBDrivers.OracleMS.OracleSchemaRetriever.RetrieveSchema(String connectionString, IDBSchema schemaToRetrieve, SchemaFetchFlags fetchFlags) at SD.LLBLGen.Pro.DBDrivers.OracleMS.OracleCatalogRetriever.RetrieveSchemas(String connectionString, IDBCatalog catalogToRetrieve, SchemaFetchFlags fetchFlags) at SD.LLBLGen.Pro.DBDrivers.OracleMS.OracleDBDriver.PopulateSelectedCatalogs(Hashtable callBacks, Hashtable connectionElements, SchemaFetchFlags fetchFlags, Hashtable properties) at SD.LLBLGen.Pro.Gui.Forms.MainWindow.RefreshCatalogs(Boolean unattended, Hashtable catalogsToRefresh) at SD.LLBLGen.Pro.Gui.Forms.MainWindow.OnProjectExplorerCatalogRefreshClicked(Object sender, CatalogRefreshEventArgs e) at SD.LLBLGen.Pro.Gui.Forms.ProjectExplorer._menuItemCatalogRefreshUnattended_Click(Object sender, EventArgs e) at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e) at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e) at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met) at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met) at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea) at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ToolStrip.WndProc(Message& m) at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 11-Jan-2010 14:32:38   

When i do unattended refresh for all catalogs, the llbl throws an error saying invalid username/password. I made changes to app.config file with <add key="Main.ConnectionString" value="data source=database;user id=abc;password=actual password;persist security info=false;"/>

In which aplication did you carry out the above mentioned app.config changes?

This is an error in the Designer, right? What happens if you do a normal refresh to the catalog (not un-attended)?

Romi
User
Posts: 11
Joined: 21-Aug-2009
# Posted on: 11-Jan-2010 17:28:40   

Thanks walaa for you quick response,

i have made the changes in app.config in the generated llbl code generated project. i.e. the DAL of my application.

when i do a normal refresh to the catalog it prompts me to enter username and password and then asks for the confirmation to save the setting to use for the next. This works fine thanks.

After the above step, However on experimental basis, i changed the connection string in app.config to a wrong password and tried to do un-attended refresh. This time It could connect to database and did not give me any error. i am confused, where is llbl gen storing the connection settings?

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 12-Jan-2010 05:39:55   

Unattended is simply not showing you dialogs, so it's using the credentials stored inside the project. This is copied from the manual:

An unattended refresh will automatically refresh the catalog for you using the last used connect credentials. It might be the password you used isn't yet stored in the project and the refresh fails the first time. If that's the case, perform an attended refresh first.

Unattended refreshes aren't that recommended anyway, as the report shown after a refresh is important, it shows the changes made.

David Elizondo | LLBLGen Support Team
Romi
User
Posts: 11
Joined: 21-Aug-2009
# Posted on: 12-Jan-2010 15:55:25   

Thanks a lot every one smile