Click here to Skip to main content
15,887,928 members
Home / Discussions / C#
   

C#

 
GeneralRe: faster than: richTextBox1.Select(78,65);richTextBox1.SelectionColor= Color.Red; Pin
leppie21-Apr-05 19:53
leppie21-Apr-05 19:53 
GeneralRe: faster than: richTextBox1.Select(78,65);richTextBox1.SelectionColor= Color.Red; Pin
leppie21-Apr-05 19:51
leppie21-Apr-05 19:51 
GeneralProblem with Socket.Connect() in .Net ActiveX App Pin
Hawk33721-Apr-05 4:07
Hawk33721-Apr-05 4:07 
QuestionIs this component thread safe? Pin
pankazmittal21-Apr-05 3:56
pankazmittal21-Apr-05 3:56 
AnswerRe: Is this component thread safe? Pin
S. Senthil Kumar21-Apr-05 5:11
S. Senthil Kumar21-Apr-05 5:11 
Questiondefault ApartmentState of a C# application's thread? Pin
Pain_Elemental21-Apr-05 3:46
Pain_Elemental21-Apr-05 3:46 
AnswerRe: default ApartmentState of a C# application's thread? Pin
John Fisher22-Apr-05 7:51
John Fisher22-Apr-05 7:51 
GeneralCode Access Security Performance Degradation with .NET SP3 Pin
Watermad21-Apr-05 3:25
Watermad21-Apr-05 3:25 
All
I have an application which loads a large amount of data into a combobox, ~1000 entries.

Before my machine got updated with .NET CLR 1.0 SP3 the dialog with the combobox was displayed an immediately ready for use. Now with SP3 the dialog is locked out for ~2 seconds.

Using Compuware Dev Partner Performance Analysis the population of the combobox is the culprit.
The code access security permissions are being invoked and taking an inordinate amount of time on the Combobox.AddRange.
By denying the various permissions the UIPermission was identified as being invoked as follows.

System.Security.Permissions.UIPermission, mscorlib, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
at System.Security.SecurityRuntime.FrameDescHelper(FrameSecurityDescriptor secDesc, IPermission 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.Windows.Forms.Control.FromHandle(IntPtr handle)
at DevExpress.XtraBars.MessageFilter.BarManagerMessageFilter.InternalPreFilterMessage(BarManager manager, Int32 Msg, IntPtr HWnd, IntPtr WParam, IntPtr

LParam)
at DevExpress.XtraBars.MessageFilter.BarManagerMessageFilter.DevExpress.Utils.Win.Hook.IHookController.InternalPreFilterMessage(Int32 Msg, IntPtr HWnd, IntPtr

WParam, IntPtr LParam)
at DevExpress.Utils.Win.Hook.HookManager.InternalPreFilterMessage(Int32 Msg, IntPtr HWnd, IntPtr WParam, IntPtr LParam)
at DevExpress.Utils.Win.Hook.HookManager.WndHook(Int32 ncode, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.SafeNativeMethods.GetWindowTextLength(IntPtr hWnd)
at System.Windows.Forms.Control.get_WindowText()
at System.Windows.Forms.ComboBox.NativeClear()
at System.Windows.Forms.ObjectCollection.ClearInternal()
at System.Windows.Forms.ObjectCollection.Clear()

However asserting the permission as follows did not resolve the issue,
[UIPermissionAttribute(SecurityAction.Assert, Unrestricted=true, Window=UIPermissionWindow.AllWindows)]

Has anyone else encountered this change in security behaviour, and know of any configuration change that can remedy the performance penalty now being incurred?

Regards
David

Hasta La Victoria Siempre!
GeneralRichTextBox question! Pin
QzRz21-Apr-05 3:08
QzRz21-Apr-05 3:08 
GeneralRe: RichTextBox question! Pin
Polis Pilavas21-Apr-05 3:54
Polis Pilavas21-Apr-05 3:54 
GeneralRe: RichTextBox question! Pin
QzRz21-Apr-05 5:24
QzRz21-Apr-05 5:24 
GeneralRe: RichTextBox question! Pin
Judah Gabriel Himango21-Apr-05 7:24
sponsorJudah Gabriel Himango21-Apr-05 7:24 
QuestionHow do StreamWriter work? Pin
Snowjim21-Apr-05 2:30
Snowjim21-Apr-05 2:30 
AnswerRe: How do StreamWriter work? Pin
mav.northwind21-Apr-05 3:07
mav.northwind21-Apr-05 3:07 
General[Active Directory] Enumerating Users in group Pin
Jaymz66621-Apr-05 2:12
Jaymz66621-Apr-05 2:12 
GeneralRe: [Active Directory] Enumerating Users in group Pin
Steve Dinn21-Apr-05 3:49
Steve Dinn21-Apr-05 3:49 
GeneralRe: [Active Directory] Enumerating Users in group Pin
Jaymz66621-Apr-05 4:15
Jaymz66621-Apr-05 4:15 
GeneralRe: [Active Directory] Enumerating Users in group Pin
Steve Dinn21-Apr-05 7:53
Steve Dinn21-Apr-05 7:53 
GeneralRe: [Active Directory] Enumerating Users in group Pin
Anonymous22-Apr-05 1:20
Anonymous22-Apr-05 1:20 
Generalerror in using matlab Pin
hediii21-Apr-05 1:15
hediii21-Apr-05 1:15 
GeneralMethodInfo.Invoke urgent help please Pin
hasansheik21-Apr-05 1:13
hasansheik21-Apr-05 1:13 
GeneralRe: MethodInfo.Invoke urgent help please Pin
leppie21-Apr-05 1:32
leppie21-Apr-05 1:32 
GeneralMethodInfo.Invoke urgent help please Pin
hasansheik21-Apr-05 1:13
hasansheik21-Apr-05 1:13 
QuestionWhich one is faster - Static function calls or If else? Pin
abcxyz8221-Apr-05 0:47
abcxyz8221-Apr-05 0:47 
AnswerRe: Which one is faster - Static function calls or If else? Pin
leppie21-Apr-05 0:51
leppie21-Apr-05 0:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.