Hi, when i try to logon on server under user account (customer) i have error. This is a previously working user, he already has organization, mailboxes, he worked before. Also there are users who only created and at the first logon the same error. The error is not required for all new users, I created 5 new users for the test - there was no problem.
Server Error in '/' Application.
Unable to cast object of type 'System.DBNull' to type 'System.String'.
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.InvalidCastException: Unable to cast object of type 'System.DBNull' to type 'System.String'.
Source Error:
Line 76: <ItemTemplate> Line 77: <asp:hyperlink id=lnkEdit runat="server" CssClass="Medium" NavigateUrl='<%# GetSpaceHomePageUrl((int)Eval("PackageID")) %>'> <span style="color: red;"> Line 78: <%# PortalAntiXSS.EncodeOld((string) Eval("PackageName")) %> </span>Line 79: </asp:hyperlink> Line 80: </ItemTemplate>
Source File: c:SolidCPPortalDesktopModulesSolidCPUserSpaces.ascx Line: 78
Unable to cast object of type 'System.DBNull' to type 'System.String'.
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.InvalidCastException: Unable to cast object of type 'System.DBNull' to type 'System.String'.
Source Error:
Line 76: <ItemTemplate> Line 77: <asp:hyperlink id=lnkEdit runat="server" CssClass="Medium" NavigateUrl='<%# GetSpaceHomePageUrl((int)Eval("PackageID")) %>'> <span style="color: red;">Line 78: <%# PortalAntiXSS.EncodeOld((string) Eval("PackageName")) %> </span>Line 79: </asp:hyperlink> Line 80: </ItemTemplate>
Source File: c:SolidCPPortalDesktopModulesSolidCPUserSpaces.ascx Line: 78
Hello,
It sounds like a DB issue with the user. Would you be able to run the following in your SQL Management Studio on the SolidCP database:
DECLARE @return_value int
EXEC @return_value = [dbo].[GetMyPackages]
@ActorID = 1,
@UserID = 16
SELECT 'Return Value' = @return_value
GO
For this you do need to set the 2 values:
ActorID = the user running the query (1 = serveradmin. This should be the same as userID)
UserID = The user ID from the URL string (You can find this by looking at the customer list logged in as reseller/serveradmin)
If you then look at the PackageName which is outputted you will find the one with the issue.
You will then need to fill the PackageName on the [dbo].[Packages] for the matching PackageID.
In [dbo].[Packages] every package should have a name so it might be worth you checking over that table for other users. You can use this query to check all packagenames
SELECT * FROM [SolidCP].[dbo].[Packages] WHERE [PackageName] is NULL;
Kind Regards,
Trevor Robinson
The problem appears VERY FREQUENT. Could you fix it in the next updates?
Is it possible to solve the problem forever?
Hello,
The problem isn't with SolidCP codes, it's an mixup in your SolidCP database specifically.
Therefor the only solution is to inspect your actual database and fix the database records in question.
Once your database (and records) are healthy it should function without any such error.
regards,
Marco