Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV forum
Suggested answer

System.UnauthorizedAccessException

Posted on by 577

Hi Floks,

Presently i have facing below issue for one of my Client .


"The Server "DynamicsNAV71" was unable to process the request. Close the application and start again .

Server instance: DynamicsNAV71
User: XXXXX\XXXXX
Type: System.UnauthorizedAccessException
Message: Access to the path 'C:\ProgramData\Microsoft\Microsoft Dynamics NAV\71\Server\MicrosoftDynamicsNavServer$DynamicsNAV71\assembly\Page46_421.dll' is denied.
StackTrace:
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalDelete(String path, Boolean checkHost)
at Microsoft.Dynamics.Nav.Runtime.CSharpCompiler.CompileCSharpSourceToAssembly(String assemblyFileName, String sourceFileName, String& errors, Assembly& assembly)
at Microsoft.Dynamics.Nav.Runtime.AssemblyGetter.GetAssembly(ObjectType objectType, Int32 objectId)
at Microsoft.Dynamics.Nav.Runtime.NCLCodeLoader.GetApplicationObjectClrType(ObjectType objectType, Int32 objectId)
at Microsoft.Dynamics.Nav.Runtime.NCLMetaApplicationObject.CompileAndLoadClrObject()
at Microsoft.Dynamics.Nav.Runtime.NCLMetadata.GetMetaApplicationObject(ObjectType objectType, Int32 objectId, Boolean requireCompiled)
at Microsoft.Dynamics.Nav.Runtime.NavFormHandle.CreateTarget()
at Microsoft.Dynamics.Nav.Runtime.NavApplicationObjectBaseHandle`1.get_Target()
at Microsoft.Dynamics.Nav.Runtime.NavForm.TryGetUIPart(String uiPartName, NavForm& form)
at Microsoft.Dynamics.Nav.Service.NsDataAccess.Create(ITreeObject parent, NavRecordState state, Boolean instantiateNewForm, Guid parentFormHandle, String parentControlName, Boolean& instantiatedForm)
at Microsoft.Dynamics.Nav.Service.NSFormBatchOpen.Open(NavSession session)
at SyncInvokeOpenForm(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.ErrorMappingCombinator(ServiceOperation innerOperation, NSServiceBase serviceInstance, Object[] inputs, Object[]& outputs)
Source: mscorlib
HResult: -2147024891

NAV Version : NAV 2013 R2 CU 51
NAV SERVICE Account :XXXX\NAV
SQL SERVICE Account : NETWORK SERVICE

1.We provide the full rights permission for both account for that folder.
2.We try to run both service with same Account but no output still Client having same issue .
3.We uninstall and re-install the NAV in that server.

Any Advise? 

Regards
Subhashis 

  • mhdsemps Profile Picture
    mhdsemps 25 on at
    RE: System.UnauthorizedAccessException

    Thanks this did it for i gave share rights to everyone and it worked thanks

  • Suggested answer
    subhashis Das Profile Picture
    subhashis Das 577 on at
    RE: System.UnauthorizedAccessException

    Hi All ,

    Thanks for suggestion. At present this issue is resolved .

    Still root cause is unknown for this case , we create new VM for NAV app server then able to run the client. One thing confirm that  It had nothing to do with permissions or Object Compilation.

    I suspect that some windows patch causing this issue but not sure ...

    Thanks

    Regards

    Subhashis

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,640 on at
    RE: System.UnauthorizedAccessException

    Did you try to run client as the Administrator? and try to compile all the objects and restart the servcies.

  • subhashis Das Profile Picture
    subhashis Das 577 on at
    RE: System.UnauthorizedAccessException

    Hi Helena

    Yes you are correct ,the error gave with various pages or other objects. and most funny thing is that its happen for Standard NAV database and server Client .

    Regards

  • subhashis Das Profile Picture
    subhashis Das 577 on at
    RE: System.UnauthorizedAccessException

    Yes Every one have the per permission .

    Btw I am using admin account for running the client in the sever .

    Regards

    Subhashis

  • Suresh Kulla Profile Picture
    Suresh Kulla 43,640 on at
    RE: System.UnauthorizedAccessException

    I am asking you to give the permission for Everyone Group not service account.

  • Helena Nunes Profile Picture
    Helena Nunes 250 on at
    RE: System.UnauthorizedAccessException

    Hi, in times I had the same problem and the error gave with various pages or other objects. I don't know how to explain what exactly happened but what I do know is that when I compiled the object, the error would disappear. It had nothing to do with permissions. I think it had to do with the slowness of the server that was running the NAV service, the users were running NAV client from their computers in France and accessing servers in another country. The connections weren't the best so the RTC NAV client sometimes lost connection to the server for "seconds". I think that the problem was because of this. Can't garantee! Now we have new servers and changed the way they access. We haven't had any more errors of this type since then.  

  • subhashis Das Profile Picture
    subhashis Das 577 on at
    RE: System.UnauthorizedAccessException

    Hi Suresh ,

    Yes. Those service account already have full right Permission for that folder .

    Regards

    Subhashis

  • Suresh Kulla Profile Picture
    Suresh Kulla 43,640 on at
    RE: System.UnauthorizedAccessException

    Have you tried giving full rights to the Everyone for the Server folder ?

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

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

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,564 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,651 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans