I understand that when you install the .NET framework, having copied all the assemblies into the Global Assembly Cache, they are then NGENed into native code. This is why it takes a while.
This makes a lot of sense, so I've never understood why the architects of .NET didn't provide support like this for our applications. On some of the larger systems I work on they are noticably sluggish when they start up and I experimented once, signing and putting the assemblies into the GAC, then NGENing them and they were considerably faster on start up.
So why not have a system whereby the first time you run an application the native image that is created (albeit on a line by line basis) is cached somewhere with a link to the original assembly? I appreciate that somethings couldn't be done like this (stuff from emit for instance) but the vast majority of the time JITting is something which really doesn't have to happen every time an application is run.
Yes, seems I was off on one. Reading around, if you've given your assemblies a strong name then you get little performance from NGENing them unless they are in the GAC due to some validation which is done, but its absolutely not compulsory.
So I took one of my dumb console apps which does something and just tried to NGEN it and it didn't complain.
Coming back to the original point. If you're going to design a system with an intermediate language and CLR and all that, I still would have thought that building a standard way whereby the assemblies get Jitted just once would be in the list of original requirements. Computers rarely change their instruction sets, so why just keep doing it over and over again?
The implication there is that all the code has been JITted. Depending on application complexity, it's entirely possible that you only follow certain paths through the code on certain runs - thus causing problems if you were to just emit the ngen of the single pass. You could only really do this if all paths were hit during the process - otherwise there's no real need for you JITting and you could just ngen up front.
I was brought up to respect my elders. I don't respect many people nowadays.
i am using Db Name Called ECO and there no table having with the name "services".
i am using windows authentication in web.config file.
please help me out to sort out this problem.
even i tried by giving all permissions but no luck
i am getting below error
The SELECT permission was denied on the object 'services', database 'mssqlsystemresource', schema 'sys'.
Invalid object name 'SqlQueryNotificationService-98253c68-5c04-44ef-9939-b8ee242c7b34'.
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.Data.SqlClient.SqlException: The SELECT permission was denied on the object 'services', database 'mssqlsystemresource', schema 'sys'.
Invalid object name 'SqlQueryNotificationService-98253c68-5c04-44ef-9939-b8ee242c7b34'.
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Which version of SQL Server?
When does it happen - when you connect to the database, when you do the first query, somewhen later, ...?
Can you connect to the SQL Server with e.g. SQL Server management Studio and execute some queries?
I have query regarding LdapSessionOptions.SecureSocketLayer property in context of LDAP authentication.
I have run this code for Ldap Port 636 ie for SSL LDAP.obviously SecureSocketLayer has to be true in this case.
My query is that if Ldap Port is 389(ie apart from 636), will the value of SecureSocketLayer be ignored, or we will have to set the property to false explicitly.
(as of now I am not able to test for this case, so putting the query.)
LdapConnection con = new LdapConnection(new LdapDirectoryIdentifier(ldapHost, int.Parse(LdapPort)));
this.CurrentLdapCertPath = ldapCertPathPassed;
con.SessionOptions.SecureSocketLayer = true;
con.SessionOptions.VerifyServerCertificate = new VerifyServerCertificateCallback(ServerCallback);
con.Bind(new NetworkCredential(UserId, Password));
Ladies and Gentlemen,
i have had something rear its ugly head today and I frankly do NOT for the life of me understand how this can be. After spending a couple of hours PROVING to myself (I am not always easily convinced) that what I am see is real, I scoured the net to the best of my googling abilities and came up empty. So I lay this at your feet hoping someone here has an answer.
Naturally, I am on the customer site with a hard deadline and more than just my reputation at stake! I will spot you that I am NOT the most experienced Windows developer on this plant, but I have been around the block a few times.
Here is my story.
I have created a WPF application that is very much multi-threaded. In fact it is highly dependent on these threads. There are 5 main threads: 1) UI; 2) TCP/IP server; 3) GPIB client; 4) main application; and 5) the main application interface.
When the app starts, MainWindow runs as with most WPF type apps. In the constructor I create some little class to do this and that and I instantiated each of the objects for the 4 main threads (obviously I am in the UI thread). Once the constructor is done the app drops into the normal sort of WPF wait for something to happen kind of thing. Meanwhile my other threads are busy handling comms, reading files and a variety of other things. When a particular msg arrives via TCP/IP the MainWindow is notified and he throws up a Window being used as a dialog. nothing fancy, just var dlg = new myWindow(); dlg.ShowDialog();
Here is where it gets REALLY weird! Every thread in the app stops! Freezes. Goes out to lunch! Describe how you wish. But they freeze. When the dialog is dismissed everybody goes about their business like nothing happened. Of course the reeks havoc on comm threads.
Anybody and ANY ideas why this is happening?? And more to the point what the remedy is?
Richard, thank you. Very much! An excellent suggestion! However after a sleepless night (anybody know why stuff like this always happens on site during acceptance testing?) a good friend this morning showed me error of my ways. You, see, the only problem was I have a wretched case of idiotitis. In my zeal to explore the nooks and crannies of this Windows world I made the decision that a nice clean way to allow objects to get information from other objects was exposé an event and delegate. Seemed reasonable to me at the time. Having spent most of my life in a world where objects on different threads have REAL boundaries I assumed that if some object from another thread registered a handler that naturally when that handler was invoked from thread 2 that the event would interrupt thread 1 it would process the event and thread 2 would go merrily on its way. Nope. Thread 2 runs the event handler. Well when the thread that is minding your comms is now suddenly executing code in MainWindow which consists of putting up a dialog guess who isn't watching his comms.
Error of my ways #2 has to do with where one starts threads, which is the point you are making. I was informed that launching critical long running tasks from the MainWindow code was not a very good idea. Suggestion was to move them to the App class and override OnStartup. Which I have now done. That does create several questions but I will save them for another day.
Error of my ways #3 was to foolishly mentally assign characteristics to objects in threads as I would to a process of lightweight thread in other operating systems. Not a good analogy.
Sorry for the length but somebody out there will make the same boo-boo someday.
I have 3 richtextboxes I want to save all 3 in the same rtf file and load the file with the specific text in the apropriate richtextbox
How can you load specific part of the text file in a richtextbox then load another specific in another.
Like read the rtf file and when a certain string is found add the text below that in richtextbox1 and if another specific string is found stop adding to richtextbox1 and start adding to richtextbox2 and lastly when another specific string is found stop adding to richtextbox2 and start adding to richtextbox3
I am using Entity Framework 4.5, I have to join 5 table entities and get result of Complex Type CT. This Complex Type contains other list of objects as its members.
For example: we have entities A, B, C, D and E, which are having any one column related to each other entities. There are 5 other Classes which are derived from the above entities. Like class A1 is using some columns of A and B1 is using few columns of B and C1, D1 and E1 are using some of the columns of C, D and E respectively.
The complex type CT is having list of A1, list of B1, list of C1, list of D1 and list of E1.
Now I want to join or include on Entity Framework entities and get the result as CT object but it contains lists of different objects.
Can anybody please help me in writing this complex join or include query whichever is better for the performance. Any help is great supportive any link or any code snippet etc.
For multiple employees (one or more), I have to generate report
--Report will be same for all employees
--Each page of report viewer will contain a single report for a single employe.
For example, for 10 employees ten report will be in ten pages of a single report viewer.
I am making report with RDLC
How i will do it??
Please help me
modified 2-Apr-13 0:46am.
Last Visit: 7-Dec-19 1:46 Last Update: 7-Dec-19 1:46