S
smiling1
I have Visual Basic code in an InfoPath form that uses
Environment.Username to retrieve the user's ID. The code works fine
for me and another person in our office.
Other users, however, get the error below. I've looked at IE security
settings, haven't seen any differences (could be missing something).
Where should I look?
Ideas?
thanks!
Request for the permission of type
System.Security.Permissions.EnvironmentPermission, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
failed.
at
System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet
grantedSet, PermissionSet deniedSet, CodeAccessPermission demand,
PermissionToken permToken)
at System.Security.CodeAccessSecurityEngine.Check(PermissionToken
permToken, CodeAccessPermission demand, StackCrawlMark& stackMark,
Int32 checkFrames, Int32 unrestrictedOverride)
at
System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission
cap, StackCrawlMark& stackMark)
at System.Security.CodeAccessPermission.Demand()
at System.Environment.get_UserName()
at
InfoPathProject2.InfoPathProject2.btnApplicationManager_OnClick(DocActionEvent
e) in C:\my_data\Visual Studio
Projects\InfoPathProject2\FormCode.vb:line 351
at
Microsoft.Office.Interop.InfoPath.SemiTrust._ButtonEventSink_SinkHelper.OnClick(DocActionEvent
pEvent)
Environment.Username to retrieve the user's ID. The code works fine
for me and another person in our office.
Other users, however, get the error below. I've looked at IE security
settings, haven't seen any differences (could be missing something).
Where should I look?
Ideas?
thanks!
Request for the permission of type
System.Security.Permissions.EnvironmentPermission, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
failed.
at
System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet
grantedSet, PermissionSet deniedSet, CodeAccessPermission demand,
PermissionToken permToken)
at System.Security.CodeAccessSecurityEngine.Check(PermissionToken
permToken, CodeAccessPermission demand, StackCrawlMark& stackMark,
Int32 checkFrames, Int32 unrestrictedOverride)
at
System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission
cap, StackCrawlMark& stackMark)
at System.Security.CodeAccessPermission.Demand()
at System.Environment.get_UserName()
at
InfoPathProject2.InfoPathProject2.btnApplicationManager_OnClick(DocActionEvent
e) in C:\my_data\Visual Studio
Projects\InfoPathProject2\FormCode.vb:line 351
at
Microsoft.Office.Interop.InfoPath.SemiTrust._ButtonEventSink_SinkHelper.OnClick(DocActionEvent
pEvent)