Server Error in '/' Application.

Some or all identity references could not be translated.

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.Security.Principal.IdentityNotMappedException: Some or all identity references could not be translated.

Source Error:


Line 184:                    ' Add user rights to this directory:
Line 185:                    Dim dSecurity As System.Security.AccessControl.DirectorySecurity = dInfo.GetAccessControl
Line 186:                    dSecurity.AddAccessRule(New System.Security.AccessControl.FileSystemAccessRule("ASPNET", System.Security.AccessControl.FileSystemRights.FullControl, System.Security.AccessControl.AccessControlType.Allow))
Line 187:
Line 188:                End If

Source File: C:\inetpub\wwwroot\Applications\ContentManagedSites\YAMAHA_MANUFACTURER_SITES\YAMAHA-CORE\Live\App_Code\classes\Images\clsImageStream.vb    Line: 186

Stack Trace:


[IdentityNotMappedException: Some or all identity references could not be translated.]
   System.Security.Principal.NTAccount.Translate(IdentityReferenceCollection sourceAccounts, Type targetType, Boolean forceSuccess) +4800063
   System.Security.Principal.NTAccount.Translate(Type targetType) +129
   System.Security.AccessControl.CommonObjectSecurity.ModifyAccess(AccessControlModification modification, AccessRule rule, Boolean& modified) +104
   System.Security.AccessControl.CommonObjectSecurity.AddAccessRule(AccessRule rule) +70
   System.Security.AccessControl.FileSystemSecurity.AddAccessRule(FileSystemAccessRule rule) +9
   clsImageStream.FetchAndScale(Int32 iPictureID, Int32 iWidth, Int32 iHeight, String zBackgroundColour, String zMode) in C:\inetpub\wwwroot\Applications\ContentManagedSites\YAMAHA_MANUFACTURER_SITES\YAMAHA-CORE\Live\App_Code\classes\Images\clsImageStream.vb:186
   used_bikes.ShowModels() in C:\inetpub\wwwroot\Applications\ContentManagedSites\YAMAHA_MANUFACTURER_SITES\YAMAHA-CORE\Live\used-bikes.aspx.vb:78
   used_bikes.Page_Load(Object sender, EventArgs e) in C:\inetpub\wwwroot\Applications\ContentManagedSites\YAMAHA_MANUFACTURER_SITES\YAMAHA-CORE\Live\used-bikes.aspx.vb:34
   System.Web.UI.Control.OnLoad(EventArgs e) +95
   System.Web.UI.Control.LoadRecursive() +59
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +678


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3535.0