Newbie to CSLA

Newbie to CSLA

Old forum URL: forums.lhotka.net/forums/t/2041.aspx


Inquistive_Mind posted on Thursday, December 28, 2006

Hello All,

              I have just started to learn CSLA and right now working on the sample code given the book and PT demo.I have created a authetication demo using the PTPrincipal and PTIdentity classes.The demo worked fine but now that I want to build on I have created some sample forms to check create a roles based application.However now the application does not perform the Authentication at all.It is giving me the following error.

Could not find stored procedure 'usp_GetFid'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Could not find stored procedure 'usp_GetFid'.

Source Error:

Line 112:                    cm.Parameters.AddWithValue("@Username", criteria.Username);
Line 113:                    cm.Parameters.AddWithValue("@Password", criteria.Password);
Line 114:                    using (SqlDataReader dr = cm.ExecuteReader())
Line 115:                    {
Line 116:                        if (dr.Read())

 

The stored procedure name is GetFid and not usp_GetFid.Previously it used usp_Fid but now it uses GetFid.Eventhough in the Dataportal<fetch> method the commandtext has GetFid and the database has GetFid as the stored procedure name the demo is still looking for usp_GetFid.In fact I changed the name to usp_GetFid and ran the demo still it does not work.

           Any information regarding this would be of great help.

Thanks,

xal replied on Thursday, December 28, 2006

Is the initial catalog set correctly in your connection string?
asp caches the assemblies, so just updating your bin folder won't do it sometimes. Try altering your web.config. Just adding an empty line (or removing it) from the bottom of the file will do. This forces the whole app to reset. Beware though that this kills any open sessions you may have.

Andrés

Inquistive_Mind replied on Thursday, December 28, 2006

Thank you for your reply.

          I did check for the changes you suggested but it does not work.I am stilling getting the same error.I checked for the database name, just added a blank line in config file,restarted the whole application,IIS and the Database.

Inquistive_Mind replied on Thursday, December 28, 2006

Hello,

          I got it to work.I had to recreate the entire project and then imported all the files.Thanks for the information you gave me.It was certainly helpful.Smile [:)] 

Copyright (c) Marimer LLC