none
c# Application crashes on windows 7.0 RRS feed

  • Question

  • My application is in c# using .net framework 2.0 and communicates with web service(IIS6.0). It works without any issue on windows xp but it crashes on windows 7.0. Crash exception giving kerneldll32 error. When I debug the crashdump

    MANAGED_STACK: 
    (TransitionMU)
    00000000002A7E10 000007FEF8036733 mscorlib_ni!System.Threading.WaitHandle.WaitOne(Int64, Boolean)+0x23
    00000000002A7E50 000007FF00776768 System!System.Net.NetworkAddressChangePolled.CheckAndReset()+0x58
    00000000002A7EB0 000007FF0071FD12 System!System.Net.NclUtilities.get_LocalAddresses()+0x32
    00000000002A7F10 000007FF0071FC2D System!System.Net.WebProxyScriptHelper.myIpAddress()+0xd
    (TransitionUM)
    (TransitionMU)
    00000000002A87D0 000007FEF803B2A8 mscorlib_ni!System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo, Boolean)+0x328
    00000000002A8970 000007FEF803AF66 mscorlib_ni!System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)+0x26
    00000000002A89C0 000007FF0071FBEE System!System.Net.WebProxyScriptHelper+MyMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)+0x5e
    00000000002A8A10 000007FF0071F4C8 Microsoft_JScript!Microsoft.JScript.LateBinding.CallOneOfTheMembers(System.Reflection.MemberInfo[], System.Object[], 
    EXCEPTION_OBJECT: !pe b1c0228
    Exception object: 000000000b1c0228
    Exception type: System.Security.SecurityException
    Message: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
    InnerException: <none>
    StackTrace (generated):
    <none>
    StackTraceString: <none>
    HResult: 8013150a

    MANAGED_OBJECT: !dumpobj b1d4b88
    Name: System.String
    MethodTable: 000007fef8107c18
    EEClass: 000007fef7d0e530
    Size: 2152(0x868) bytes
     (C:\Windows\assembly\GAC_64\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll)
    String:    at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed)
       at System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet grantedSet, PermissionSet refusedSet, CodeAccessPermission demand, PermissionToken permToken, RuntimeMethodHandle rmh, Object assemblyOrString, SecurityAction action, Boolean throwException)
       at System.Security.CodeAccessSecurityEngine.CheckHelper(CompressedStack cs, PermissionSet grantedSet, PermissionSet refusedSet, CodeAccessPermission demand, PermissionToken permToken, RuntimeMethodHandle rmh, Assembly asm, SecurityAction action)
       at System.StubHelpers.StubHelpers.BeginStandalone(IntPtr pFrame, IntPtr pNMD, Int32 dwStubFlags)
       at DevExpress.Utils.Win.Hook.HookManager.GetCurrentThreadId()
       at DevExpress.Utils.Win.Hook.HookManager.GetInfoByThread()
       at DevExpress.Utils.Win.Hook.HookManager.WndHook(Int32 ncode, IntPtr wParam, IntPtr lParam)

    Fields:
                  MT    Field   Offset                 Type VT     Attr            Value Name
    000007fef810ee88  4000096        8         System.Int32  1 instance             1064 m_arrayLength
    000007fef810ee88  4000097        c         System.Int32  1 instance             1063 m_stringLength
    000007fef8109660  4000098       10          System.Char  1 instance               20 m_firstChar
    000007fef8107c18  4000099       20        System.String  0   shared           static Empty
                                     >> Domain:Value  00000000000dc610:0000000002d51308 000000001b4d5790:0000000002d51308 <<
    000007fef8109510  400009a       28        System.Char[]  0   shared           static WhitespaceChars
                                     >> Domain:Value  00000000000dc610:0000000002d51ae8 000000001b4d5790:0000000002f80ce0 <<

    EXCEPTION_MESSAGE:  Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Versi

    MANAGED_OBJECT_NAME:  System.Security.SecurityException

    Friday, August 10, 2012 1:48 PM

All replies

  • Hi Anidhar,

    Welcome to the MSDN Forum.

    According to the exception message, it seems that there is no such permission to finish the operation.

    Do you try to run it as administrator?

    Or your Win7 machine have enough permission to check a location(maybe network, maybe local, whatever, it is required by your application)? Is the user which logs on this computer have sufficient permissions?

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Anidhar Wednesday, August 15, 2012 7:43 PM
    • Unmarked as answer by Anidhar Wednesday, August 15, 2012 7:43 PM
    Monday, August 13, 2012 10:31 AM
    Moderator
  • Hi Anidhar,

    Do you have any update?

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, August 16, 2012 1:52 AM
    Moderator
  • Hi Mike,

    Thanks for getting back. I have checked the permission set for the user, everything seems to be fine. And moreover we aren't getting this error everytime. Once in a while, randomly it happens only on windows 7.0 PC. So confused why it should happen that way.

    Thanks

    Anidhar

    Friday, August 17, 2012 12:33 PM
  • Hi Anidhar,

    Thank you for your updating.

    As you know, Win7 has more strictly security control than Win XP.

    So I think your application may try to access some particular positions(maybe folder, maybe registry, maybe some other protected files), but without permission. 

    So you can check the related code, and the security.

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, August 20, 2012 8:30 AM
    Moderator
  • Hi Mike.

    Thanks for ur input.

    But it doesn't error out everytime. For the same critieria, it errors out once in a while. That is bit odd. Still trying to figure out the issue.

    Thanks

    Anidhar

    Thursday, August 23, 2012 5:41 PM
  • It looks like you should be talking to DevExpress about this. It's trying to do something that involves finding a thread, therefore there are multiple threads involved (or it wouldn't be trying to choose a thread!) and each thread will have different security configurations.

    Phil Wilson

    Thursday, August 23, 2012 6:10 PM
  • Hi Anidhar,

    Please checkout this link:

    http://www.votedemos.com/kernel-dll32.php


    Regards, http://www.shwetalodha.blogspot.in/

    Thursday, August 23, 2012 6:13 PM