Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Unable to cast object of type 'System.Int32' to type 'System.String'.

(0) ShareShare
ReportReport
Posted on by

After installation of SP1 of Sharepoint 2013 and KB2935257 on Microsoft Dyanmics AX 2012 R2 CU7 i got following error when i try to open the enterprise portal:

You cannot view data on this page because you are not a registered user in Microsoft Dynamics AX. Contact your Microsoft Dynamics AX administrator.

Unable to cast object of type 'System.Int32' to type 'System.String'.

Microsoft.Dynamics.Framework.Portal

at Microsoft.Dynamics.Framework.Portal.AxSharepointWebSession.ReadWebSiteParameters()
at Microsoft.Dynamics.Framework.Portal.AxSharepointWebSession.IsPartitionDependentSite()
at Microsoft.Dynamics.Framework.Portal.AxSharepointWebSession.OnLogon(IAxaptaAdapter axaptaAdapter)
at Microsoft.Dynamics.Framework.BusinessConnector.Session.DynamicsSession.Init(ICacheContext context)

I tried to reinstall the enterprise portal but i'm still getting this error. 

Please suggest what could be the cause for error message. 

Thx

*This post is locked for comments

  • RE: Unable to cast object of type 'System.Int32' to type 'System.String'.

    I am also facing same issue and we are stuck here. I tried many things as per mentioned by people above, but no luck. I have installed an Hotfix KB2935257 and after that i started facing this issue. I was wondering can this hotfix cause this issue ?  Also i have standalone machine/server hosting AOS, Ax client and share point. I am facing this issue on this server.  Even i refresh the business connector config and ax client config but no luck. Can somebody give me any specific resolution for this issue? I wonder is it a known bug?

    Thanks

    Manoj Parashar

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 292,516 Super User 2025 Season 1 on at
    RE: Unable to cast object of type 'System.Int32' to type 'System.String'.

    Hi Koen,

    Glad your issue is solved now. You may also thank Ernest who brought your question to my attention :)

  • Koen Roks Profile Picture
    Koen Roks on at
    RE: Unable to cast object of type 'System.Int32' to type 'System.String'.

    Hi André,

    All users can connect to the client without any problems. We also have multiple domain names but we only use one domain. All users including the business connector proxy account (Made it a user in ax) where getting that message.

    Only one AX environment will be using that sharepoint server.

    I got the basic role center working now. Your user client comment gave me the idea to install a client on the same machine as sharepoint to check for connectivity issues. When I started ax the default role center popped up without the error message. I assume something has changed in the ax configuration on the server to make it work.

    Koen

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 292,516 Super User 2025 Season 1 on at
    RE: Unable to cast object of type 'System.Int32' to type 'System.String'.

    Hi Koen,

    Can this user access the client without problems? Can you also indicate if this is an environment with multiple domain names which do have a trust?

    Do you have more than one AX environment running using the same Sharepoint server?

  • Koen Roks Profile Picture
    Koen Roks on at
    RE: Unable to cast object of type 'System.Int32' to type 'System.String'.

    Yes the site is registered under the websites in the sys admin module. I also tried to remove it and register again.

    Koen

  • Suggested answer
    syed baber Profile Picture
    syed baber 11,633 on at
    RE: Unable to cast object of type 'System.Int32' to type 'System.String'.

    Hi Koen,

    You need to register EP site inside Dynamics AX under Sys Admin module.

    Have you registered your EP site or not?

    Thanks,

    Baber.

  • Koen Roks Profile Picture
    Koen Roks on at
    RE: Unable to cast object of type 'System.Int32' to type 'System.String'.

    I am also facing the same problem but on AX 2012 R2 CU7 with Sharepoint 2010 sp2.

    When opening the enterprise portal I get the following message:

    4300.EPError.JPG

    To try and solve it I did the following steps:

    • Clean install of de ep 
    • Reinstall of the business connector on the aos service
    • Checking the Dynamics Ax Configuration (busniss connector config) on the sharepoint machine
    • Adding the businness connector proxy account to all security groups

    Does someone have any other suggestions on what I can try.

    Thanks!

    In the event viewer:

    Errors:

    No .NET Business Connector session could be found.

    Microsoft.Dynamics.Framework.BusinessConnector.Session.Exceptions.NoKernelSessionException
    at Microsoft.Dynamics.Framework.BusinessConnector.Session.DynamicsSession.get_AxaptaAdapter()
    at Microsoft.Dynamics.Framework.Portal.CommonControls.VendProfileAccountHelper.IsVendor(ISession session)
    at Microsoft.Dynamics.Framework.Portal.CommonControls.VendAccountChooser.IsVisible()

    AND

    Unable to cast object of type 'System.Int32' to type 'System.String'.

    Microsoft.Dynamics.Framework.Portal

    at Microsoft.Dynamics.Framework.Portal.AxSharepointWebSession.ReadWebSiteParameters()
    at Microsoft.Dynamics.Framework.Portal.AxSharepointWebSession.GetWebSiteParameter(Object cacheKey)
    at Microsoft.Dynamics.Framework.Portal.AxSharepointWebSession.IsPartitionDependentSite()
    at Microsoft.Dynamics.Framework.Portal.AxSharepointWebSession.OnLogon(IAxaptaAdapter axaptaAdapter)
    at Microsoft.Dynamics.Framework.BusinessConnector.Session.DynamicsSession.Init(ICacheContext context)

    Warning:

    No .NET Business Connector session could be found.

    Microsoft.Dynamics.Framework.BusinessConnector.Session.Exceptions.NoKernelSessionException
    at Microsoft.Dynamics.Framework.BusinessConnector.Session.DynamicsSession.get_AxaptaAdapter()
    at Microsoft.Dynamics.AX.Framework.Services.Client.MetadataCache.GetWebModuleMetadata(ISession session, String webModulePath)
    at Microsoft.Dynamics.Framework.Portal.UI.WebControls.MasterPageControl.FindRedirectPageForModule(ISession session, String& redirectMenuItemForModule)
    at Microsoft.Dynamics.Framework.Portal.UI.WebControls.MasterPageControl.RedirectToHomePageAndCompany(SPWeb site)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,407 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans