The Dev Guy

The Dev Guy

Monday, May 23, 2011

Dynamics SL BP Install “Cannot open database ‘System Database Name’ requested by the login. Login failed. Login failed for user ‘BusinessPortalUser’

Goal 
You are trying to install/upgrade Business Portal for Dynamics SL 7.0. You do the install and get no error messages. You try to open business portal and no error message shows you get that Error. An Unexpected Error has occurred.  You turn off simple HTTP errors and still you get the same nondescript error.  

You look at %temp% (Hit Start, then run and type %temp% in the command line) and all the install logs (place you should always start with a problem in installing BP), but find no errors you can see. You also check the logs under Application and Security and nothing is there.  SharePoint runs fine but you can’t find what the actual error is in BP. IT just won’t run.
     
Environment
 Dynamics SL 7.0. Windows Server 2003 Enterprise SP 2. SQL 2008 SP 1.  

Issue
            First Trick, when you are getting errors that don’t tell you anything and nothing is logged, Open IIS Manager. Right mouse on the site and select browse. In this case drill down to the BusinessPortal Virtual Directory and browse. When you do this you get the actual error which is: “Cannot open database ‘System Database Name’ requested by the login. Login failed. Login failed for user ‘BusinessPortalUser’.

            Sounds Simple enough! You go into SQL Enterprise Manager and log in as BusinessPortalUser. You make sure you can get in see the system database and the application. If you cannot get in then the password is different then you thought and in the upgrade you told SL the wrong password. Change the password in SQL by double clicking under Security and Logins and BusinessPortalUser. Type new password twice then hit ok.
            If you had to change or not, then search for the pcconfigure.exe. It should be in port 80’s virtual directory. Double click and enter the server, system database, BusinessPortalUser and the password.
            9 times out of 10 even if you do this, you will still get the error. This happens to me a lot so you are bound to see it. Ergo this post.  


Resolution
            Business Portal has a registry key that it keeps login information for the business portal user. If the owner of the Business Portal does not have proper rights to the registry then it will fail with the error.  The Key is the PMA key under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Business Portal\PMA
 So you go into RegEdit, drill down to the key. Right mouse on PMA and select security. Assign the owner of the businessportal to have read rights.  To find the owner, look in IIS under the Business Portal virtual Directory then go to the application pool for it and assign it to the identity in that application pool.

            There is a chance that the Capicom.dll is the wrong version. I have only seen this once or twice but know a that you may have to check that if its not fixed.

Conclusion
            A common error in BP can be better diagnosed by browsing in IIS and then fixed by assigning registry rights to the owner of BP.
               

Tuesday, May 17, 2011

Dynamics SL Screen is customized as Maximized and will not return to normal state

Goal 
A user that has All User Customization Rights (Rights to create customizations everyone sees) keeps customizing a screen or series of screens to be maximized. You need to be able to fix this customization or remove it. But you have other ligitimate Customizations so a total delete of custom is not possible.
     
Environment
 Dynamics SL 7.0.

Issue
           When you Look at properties of the Form there is no Maximized or Windows State Property to edit. You can only view the property by hitting Shift F4 which is the Customization Property Browser. It has a property called windows state. But that property as everything on the Customization Property Browse is not editable.   The regular Property window reached by hitting F4 does not have Windows State.

            If you physically un-maximize the window in custom mode and hit save, then you open the screen again, it is still customized.
            Often this problem has the effect of hiding the grid on the screen. Like the GL Journal Transactions Screen. With this problem if it is customized as maximized the grid will disappear (become left justified OFF THE SCREEN).  You have to get rid of the maximized then move the grid back to the center of the screen manually.  But once again you have the issue that the screen will not un-maximize.

Resolution

            The easy fix to this is to export your customizations to a text file. Export only all user customization. Open the Text file and look for  windowstate. You will find something like this:



Begin Form Form1
'' Version         =   6
   height          =   539
   left            =   186
   top             =   137
   width           =   652
   windowstate     =   1
End

Change the 1 or 2 to 0. Save the Text File then Import the Custom back in.



Conclusion

                Sometimes users can save a screen as customized and distort the screen so that key information does not show. To get rid of a customization like this, export all user customizations and look for windowstate = 1 and change to  = 0.
                Do yourself a favor, if you do a customization for all users in SL, export when it is complete so you can revert back. If you have good export backups, you can just go to the screen in question and select remove all customizations for the screen then reimport.  Can save you some grief.