TopplistanDatorerDetaljer för "If broken it is, fix it you should"

If broken it is, fix it you should

If broken it is, fix it you should
En blogg om hur man debuggar problem i ASP.NET med windbg, Bloggen behandlar problem som hängningar, minnesläckor, krasher och exceptions av olika typer.
Artiklar: 1-30, 31-60, 61-90, 91-120, 121-150

Artiklar

My presentation on Troubleshooting ASP.NET applications at Oredev
2008-05-26 12:01:00
The guys at Oredev are in the midst of preparing for the next Oredev conference in November.  Sadly I won't be presenting there this year because of other comittments. I say sadly because it was an awesome event last year. If you want to check out my presentation from last year you can do that here.  The page says "Due to technical problems with our video equipment, this session was never recorded" but that is incorrect. The video is there...   Disclaimer:  I had some issues with the mike not fitting properly so it starts off a little bit shaky:) but hopefully you can oversee the presentation skills and look at the content instead There are also plenty of other videos from the other presentations here. After having seen a lot of really good presentations, like Scott Hanselmans MVC presentation, I realize I have a lot to learn as far as presentation skills go, and next time I present I will for sure use Mark Russinovich zoomit tool t...
The 21 most popular blog posts
2008-05-21 15:45:00
I started this blog 2.5 years ago today, mostly because I felt that the same types of issues came up over and over and over in our support cases. I figured that if I started writing about them, a lot of people would be able to resolve them on their own, or even better avoid them in the first place. A lot of water passed under the bridge since then, but looking back at some of those earlier posts they are still very applicable today, and they still seem to continue to get a lot of hits.  Here is a list of the 21 most popular ones... ASP.NET 2.0 Crash case study: Unhandled exceptions ASP.NET Case Study: Lost session variables and appdomain recycles ASP.NET Memory: If your application is in production? then why is debug=true .NET Memory Leak Case Study: The Event Handlers That Made The Memory Baloon ASP.NET Performance Case Study: Web Service calls taking forever .NET Memory usage - A restaurant analogy .NET Garbage Collector PopQuiz - Followup .Net memory leak: Unblock my final...
DebugDiag 1.1 or Windbg, which one should I use? and how do I gather memory
2008-05-21 13:40:00
If you have read any of my posts you have probably noticed that I am very partial to windbg and the debugging tools for windows.  I often get friendly nudges from the developers of debugdiag when I suggest using adplus and windbg on internal discussion lists, and to be fair I have to beat on the drum a bit for debug diag as well. My answer to the question "Should I use DebugDiag 1.1 or Windbg" is both... it just depends on the scenario.  I often lean towards windbg but to a large extent that is because that is what I use all the time, so in many cases where both fit the bill equally well I simlply haven't invested the time to see how it can be done with debug diag and therefore I suggest what I know works. Before I start the comparison, I just want to mention that dumps created with debug diag can be analysed in windbg and vice versa.  They use the same APIs and create the same types of memory dumps.  Where they differ largely is how you configure them...
ASP.NET Performance issue: Large number of application restarts due to viru
2008-05-14 09:44:00
Issues caused by frequent application restarts are pretty common. If you are interested in what causes application restarts in general, and how you can monitor application restarts and what causes them you should read this post: ASP.NET Case Study: Lost session variables and appdomain recycles The most recent one was one where the ASP.NET site would respond slowly at regular intervals (read: it grinded to a halt every few hours).  First shot at gathering data: We started off by getting a memory dump with debug diag when the process was responding slowly.  Unfortunately at the time that the dump was taken no requests were executing (i.e. ~* e !clrstack showed no managed stacks and ~* kb showed all the threads in their idle states), so we didn't get much of a clue as to why the process was responding so slowly.  If you are debugging a performance issue it is key to try to get dumps while there are requests executing since memory dumps are just snapshots of the...
IIS7 Breaking Changes for ASP.NET 2.0
2008-05-14 09:36:00
I just came across this great post from Mike Volodarsky (a program manager in the IIS team) about breaking changes when you move 2.0 applications to IIS 7. It is definitely worth a read before you make the switch so you can take appropriate actions to avoid running into problems. Laters, Tess
"Failed to start stack walk: 80004005", "Following frames may be wrong" and
2008-05-13 16:33:00
When you debug .net applications you will sometimes get error messages in windbg.  Here are a few of the ones I most commonly get questions around...   Failed to start stack walk If you run the sos command !clrstack to display the .net stack on a thread, and this thread is a .net thread but it is not currently running any .net code, sos will spit out Failed to start stack walk: 80004005.  This does not mean that there is anything wrong with the process or with the debugger. It simply means that sos can't display the stack because there is none. OS Thread Id: 0x1ec (12) Failed to start stack walk: 80004005   Unable to walk the managed stack If you run !clrstack on a native thread (i.e. a thread that has no corresponding System.Threading.Thread), sos will display the following message instead. OS Thread Id: 0x554 (11) Unable to walk the managed stack. The current thread is likely not a managed thread. You can run !threads to get a list of managed threads in the...
Mer om: Star , Start
ASP.NET Hang: Authenticode signed assemblies
2008-05-13 11:26:00
When you use authenticode signed assemblies in an application, the application needs to go out and check the certificate revocation lists (CRLs) to verify that the signature is still valid the first time it loads up the authenticode signed assembly.  If the server, serving your asp.net application, doesn't have internet access or if the internet connection is slow this can lead to issues where you stall the process during startup or when the assembly in question first loads. What you will typically see is a thread loading up an assembly with a callstack like this:0:026> kL 200 ChildEBP RetAddr 0e82c1b4 7c822124 ntdll!KiFastSystemCallRet 0e82c1b8 77e6bad8 ntdll!NtWaitForSingleObject+0xc 0e82c228 73ca64ec kernel32!WaitForSingleObjectEx+0xac 0e82c254 73ca6742 cryptnet!CryptRetrieveObjectByUrlWithTimeout+0x12f 0e82c280 73ca3253 cryptnet!CryptRetrieveObjectByUrlW+0x9b 0e82c2f8 73ca6b26 cryptnet!RetrieveObjectByUrlValidForSubject+0x5b 0e82c348 73ca3568 ...
Blog Interesting - 32 Ways to Keep Your Blog from Sucking
2008-05-09 13:39:00
Today I came across a really good article for bloggers, Scott Hanselmans post on "Blog Interesting - 32 Ways to Keep Your Blog from Sucking"  I realize that most of you are not bloggers, and also that I am breaking rule #7 and #8 on the list here:)  7. Don't post throwaways I try to have a minimum length to a post. If you don't think about your blog post, likely no one else will either. If I want to save a link, rather than posting "I want to save this link, so I'm blogging it to remember" I use a service like http://del.icio.us/shanselman. Unless you're a link blogger, but then you'd batch them up. 8. Avoid "excessive quoting" Some popular bloggers can get away with this, but I think that quotes make up more than 30% of a blog post (or, gasp, 70% or more) than you really have to ask yourself "am I providing value here?" ...but I really enjoyed his post, so I'm sharing it for you to enjoy as well... And regarding #7, trying to have a minimum lenght to...
How do I get a hotfix for .net or Visual Studio?
2008-05-09 09:26:00
I very frequently get emails like the one I got this morning: "Tess, It sounds like the hotfix for kb946644 may resolve a problem we've been having for some time in .Net 2.0.How, exactly, can we get this hotfix? Can you provide it?" This particular hotfix was one i blogged about here, regarding a deadlock with the GC when using XmlSchemaSet.Add... but the answer will be the same for any hotfix. Many new hotfixes in the Visual Studio or .net framework area are available for public download by the Visual Studio and .NET Framework Public Availability Program. If the particular hotfix you are looking for (like this one) is not available there, you need to open a support case and the reason for this is that we want to keep track who gets certain hotfixes in case there is an issue that we need to inform the customers about.   If you open a support case to get a hotfix this case will of course be free of charge, however if the fix does not resolve the ...
ASP.NET Crash: StackOverflowException with Server.Transfer
2008-05-08 02:34:00
I have written a few posts about stackoverflow exceptions, here, here, here and here.  The one I am going to talk about today is one of those unfortunate cases where you are trying to do the right thing and still shoot yourself in the foot. Problem description: Randomly when browsing the application we get the "Internet Explorer cannot display the webpage" page, and the following event is found in the system eventlog Event Type: Warning Event Source: W3SVC Event Category: None Event ID: 1009 Date: 2008-05-06 Time: 10:04:26 User: N/A Computer: MYMACHINE Description: A process serving application pool 'DefaultAppPool' terminated unexpectedly. The process id was '4436'. The process exit code was '0x800703e9'. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. 0x800703e9 means "Recursion too deep; the stack overflowed" so we are dealing with a stackoverflow as the title of the post suggests, i.e. that we are exhausting the m...
ntdll!kifastSystemcallret, SharedUserData!SystemCallStub and search engines
2008-05-07 11:31:00
If I were to pick out ten keywords for my blog I would pick, in no particular order, ASP.net, windbg, sos, debugging, .net exceptions, memory leaks, performance issues, OutOfMemory exceptions, garbage collection, troubleshooting.  Those are the things that I think, but I might be wrong, that people who visit my blog are most interested in. As with most other technical blogs (I think), about half of the traffic to my blog comes from people searching on various search engines, but what really surprised me was what the top search terms are that bring people here, since obviously my keywords are way off:)  1. kifastsystemcallret2. .net exception types3. ntdll!kifastsystemcallret4. 0x800703e95. 0xe0434f4d6. Invalid viewstate7. tess blog8. tess fernandez9. developerinstallation10. unblock The 0x800703e9 (exception code for StackOverflow) and 0xe0434f4d (exception code for .net exceptions) I can completely understand, just like invalid viewstate and ".net exception typ...
Why are some commands missing in sos for 2.0 compared to sos for 1.1?
2008-04-30 08:27:00
This question that I got from a reader is something that I get asked pretty frequently... "I met a small problem during my dump analysis, our application is using .net 2.0. when I load 2.0 version of sos.dll, some of useful extension commands are lost, but sos.dll which is under clr10 debugging tool has. Do you know any way to use those extension command in 1.1 under 2.0 sos.dll?" After you have gotten used to the wealth of commands and functions in sos for .net framework 1.1 it can get a bit tedious to have to do these things manually when debugging 2.0 applications.  The differences are not extreme but commands such as !aspxpages etc. are missing in 2.0, and the reason is basically that the debugging architecture in 2.0 is very different from 1.1 so the commands are ported continously and sent out with hotfixes and service packs, but some just havent made it yet. You can not use the 1.1 version on 2.0 applications by loading it in an alternate way unfortunately, for m...
Setting breakpoints in .net code using !bpmd
2008-04-28 16:52:00
From time to time I get questions like "our process spawns a lot of threads, how do we know who created them?" or "can I tell how many times we call this method?".  You can answer both of these questions by setting breakpoints, and below is a simple sample of how this is done in windbg with sos... My demo application (MyApplication.exe) has a class MyThreadClass that has a method CreateAThread, this creates a thread and starts running some method on that thread.  What I am going to show here is how you can set a breakpoint when a thread is started to identify that the method CreateAThread started it, and automate it so that you don't have to click go after each time you hit the breakpoint... 1. Attach to the process with Windbg (File/Attach to process) 2. load sos (.loadby sos mscorwks) 3. Set the breakpoint on System.Threading.Thread..ctor in mscorlib.dll (the constructor for Thread) 0:005> !bpmd mscorlib.dll System.Threading.Thread..ctorFound 4 methods...MethodDes...
Does interrupting GC.WaitForPendingFinalizers interrupt finalization?
2008-04-22 17:07:00
I got a question the other day around calling GC.Collect and GC.WaitForPendingFinal izers.  The issue revolved around a problem where the finalizer was blocked and where the application would call GC.Collect() and GC.WaitForPendingFinalizers() which then caused the thread that called GC.WaitForPendingFinalizers() to hang, and the question was If we interrupt the thread that calls GC.WaitForPendingFinalizers() will this also interrupt the finalizer thread, i.e. unblocking the finalizer? I would be very surprised if it did, but I can see where the question came from as the msdn documentation for GC.WaitForPendingFinalizers is a bit ambigous. When the garbage collector finds objects that can be reclaimed, it checks each object to determine the object's finalization requirements. If an object implements a finalizer and has not disabled finalization by calling SuppressFinalize, the object is placed in a list of objects that are marked as ready for finalization...
Pimp up your debugger: Creating a custom workspace for windbg debugging
2008-04-18 13:19:00
From time to time I get questions about how to change settings in windbg like this one... The default color scheme for the command window is really annoying, because it is always black and white. It is really hard to figure out something in the screen after you have executed some commands that generates lots of output, especially for the command you entered. Then I tried to configure the colors through view -> options -> colors, unfortunately I failed because of the items listed there which was not documented well. After google for some time, I still did not get something interesting. I am absolutely horrible with colors and the combination of colors.  I usually wear all black clothes with bright fuschia sneakers:) so before I answer the question above, let me just say that I am not going to advice on color combinations for windbg, I'll just show you how I have set up my windbg environment so that you can set up your own the way you like it. Windbg Workspaces Windbg ...
How does the GC work and what are the sizes of the different generations?
2008-04-17 14:10:00
During our ASP.NET debugging chat there were many questions around the GC and the different generations. In this post I will try to explain the basics of how the GC works and what you should think about when developing .net applications in relation to the GC. First off, there is already a lot written about the .net Garbage Collector. One of the best resources regarding how the GC works and how to program efficiently for the GC is Maoni?s blog. She hasn?t written anything since May 2007 but all the posts on her blog are still very relevant since the GC hasn?t really changed enough that it makes a difference as far as .net developers should be concerned. Maoni had a presentation at the 2005 PDC about the GC and unfortunately her link to the presentation points to an invalid location so if you are interested in looking at it I have attached it to this post. Most of what I will discuss in this article is a mixture of her presentation along with things I have learned along the way, and...
Mer om: Gener
My presentation on Troubleshooting ASP.NET production issues at Developer S
2008-04-12 13:52:00
  The purpose of my presentation was to show some common pitfalls and of course to show off windbg and sos just to show people that if you have a hang, perf issue, memory leak or crash, there are tools out there that can help you figure out the root cause so that you don't have to resort to guessing.  The site I used for the presentation is attached to this blog post. is a summary of the topics I covered. Hangs and Performance issues First I debugged a simple hang (using locks in conjunction with long running operations) to show the power of windbg and sos, and to show off a few of the commands.  (more info) After this I went into a high CPU in GC scenario with string concatenation and showed a simple example where I reduced the execution time of a page assembling an XML file from 6 seconds to ~2 ms by changing from using string concatenation to using StringBuilder.  I had a brief spiel about how the GC works and why string concatenation caused high C...
Developer Summit Sessions on Silverlight, MVC, FaceBook, and Work ethics am
2008-04-12 13:52:00
On Wednesday I presented a session on troubleshooting ASP.NET production issues at Developer Summit 2008 in Sweden.  It offered a lot of good presentations as usual, and here is a summary of the ones I went to along with some links related to the topics they were covering. I will write a separate post about the presentation I did along with a download for the actual presentation. I spent most of my time on the Web track and I was only there for the first day since I had to get back to work to take care of my customers yesterday.  Building RIA with Silverlight 2.0 Robert Folkesson, Microsoft   Nikhil Khotari was supposed to deliver this session but unfortunately he was not able to make it so Robert, one of the Developer Evangelists in sweden presented instead.  In the presentation, Robert covered the differences between 1.0 and 2.0, and showed off communication with WCF services, socket communication, Databinding and filtering, Styles, Isolated storag...
.NET Performance Issues: What if I suspect that my performance problem is i
2008-04-10 11:17:00
Last week Graham was guest blogging on my blog about PSSDiag and how to gather data with PSS Diag.  In this second installment he talks about how to read and understand the data.  Graham is in the process of starting his own blog about how to troubleshoot different SQL issues.  As soon as it is up and running I will post a link. In the meantime, enjoy! Part 2: Reviewing the data First off - an addition to Part 1. One of my colleagues in the US has posted the internal performance statistic T-SQL script which we use to capture all sorts of data from the SQL Server DMVs. This script doesn?t install by default with a standard SQL Server setup like the rest of SQLDIAG, but you can obtain the script and download it from the SQL Server Engineers blog here. He also helpfully provided an XML config file with all the required entries to make it run. I found the easiest way to deploy it in a default install of SQL Server was to unzip the 2 SQL scripts and the 2 XML f...
.NET Performance Issue: What if I suspect that my performance problem is in
2008-04-04 10:56:00
Very often when investigating ASP.NET or other .NET performance issues we find threads stuck waiting for SQL Server or some other database to respond. I am by no means an expert in SQL Server so I thought I'd invite one of the escalation engineers, Graham Kent, in the SQL Server support team to write a little bit about how you can determine if there is a performance issue in SQL Server or if you can discard SQL Server as the root cause of your perf issue. Graham Kent, SQL Server Escalation Engineer In this first installment he is talking about how to collect SQL Server performance data with PSSDiag Part 1: Collecting the right data SQL Server performance is a huge subject in its own right, but sometimes I chat with people who work with SQL Server less often, and they?re looking for a quick way to help them analyze whether they have a SQL Server performance problem at the root of an application problem that they?re debugging. I was chatting with Tess the other day and we though...
Live blog chat about asp.net and debugging with windbg and sos (10 am EST/4
2008-04-03 21:01:00
Welcome to the first blog chat for ASP.NET Debugging.  I hope you enjoy this and please let me know your comments on the experience.  I am planning on posting a recap of the conversation (or question and answers) after we are done to the blog so that others can see what was discussed.  If it gets busy and your question doesn't get answered, I will be reviewing the chat and will get an answer posted in the recap.  This chat will last an hour. UPDATE Thank you everyone who attended this chat.  It went really well and we will be doing more of these in the future.  Look for a post shortly with a recap of the chat we had today.
.NET Debugging Demos Lab 7: Memory Leak - Review
2008-04-03 14:33:00
We have reached the end of the .NET Debugging Demos series.  And we are going to end it with a review of the last memory leak lab. I am interested to get feedback, either in comments or through email in the contact me section, on what you liked, what you didn't like. If you felt that it was worth your while etc. so I know if there is an interest in possibly doing similar lab series in the future.  It will probably be a while before I would post a new series but if there is interest at least I can start thinking about it.  If that is the case, let me know what you thought was missing from this one so that I can put some good scenarios in the next one. Previous demos and setup instructions If you are new to the debugging labs, here you can find information on how to set up the labs as well as links to the previous labs in the series. Information and setup instructionsLab 1: HangLab 1: Hang - reviewLab 2: CrashLab 2: Crash - reviewLab 3: MemoryLab 3: Memory - review...
Recap of yesterdays ASP.NET Debugging Blog Chat
2008-04-03 09:08:00
I have to say that I was happily surprised, not only that so many people showed up and about the amount of questions that came up but also about the type of questions that came up.  It was definitely very interesting for me. Tom had a good recap of the chat topics that came up, and we will be dividing these among us to write articles that cover these in a little more detail.  The portions that were covered in the chat will be covered in the posts as well...  Basics of debugging, how to capture a dump Orphaned worker processes with IIS High memory in ASP.NET Memory limits for 32-bit and 64-bit processes If dumps are different from different tools Preemptive GC and how that is handled managed and native resources being leaked GC Gen sizes including the Large Object Heap !locks taking a parameter Setting a breakpoint in managed code When do we see ObjectDisposedException future/schedule of SOS.dll Problem with !pe and !soe leaking memory Functions...
Questions about .net Exceptions
2008-04-01 13:48:00
One of my readers emailed me the following question I have a simple questions that my management asks me. When I see all kinds of exceptions thrown (null exceptions etc..), what is the user experience? Does their system hand these back to the user? does it return an error message? or simply crashes? How can I determine the user experience pertaing to these exceptions? My answer The answer depends very much on the type of exception that is thrown, where it is thrown from and of course if it is caught or not. In the eventviewer (if running .net 2.0) you will see all exceptions that are thrown.  Case #1 Most applications throw a number of NullReference exceptions because they have code similar to this one try{  UserName = Request.Cookies["UserName"].Value;    }Catch(Exception ex){  // handle the exception} In this case, if Request.Cookies["UserName"] does not exist, you will of course throw a NullReferenceException when trying to do .Value...
New version of SilverLatte and Espresso Blend available for download
2008-04-01 11:59:00
I am sure that you have all been awaiting this new version of SilverLatte and Espresso Blend as much as I have.  Last week I got a chance to test out the new bits and I was completely elated with all the new features.  Especially the new editor add-in for windbg:)    Powered by SilverLatte More information Espresso Blend and SilverLatte are the next in a series of tools that allows you to develop rich user interfaces for both web and windows applications.  With its sharp GUI it enables rapid development in all .net languages, including the new chai# language. Just like its predecessors it is of course cross platform and all that stuff, but having tried it just for a few days I will have to say it is the best and easiest to use tool that I have ever developed in.  I was talking before about Silverlight and Expression Blend democratizing the cloud, but they are nothing compared to this new version of Espresso Blend.&n...
Mer om: Download
.NET Case Study: Stackoverflow Exception when using a complex rowfilter
2008-04-01 11:57:00
When you use very complex Rowfilters or expressions on datasets or datatables you may end up getting a stackoverflow exception. Eber was running into this and posted a comment here.  Since it is something we see from time to time and it was a bit to long to answer in the comments, here is the why and the how... Problem description: When browsing an ASP.NET site, intermittently we get "Internet Explorer cannot display the webpage" accompanied by the following event in the eventlog:Event Type: Error Event Source: .NET Runtime 2.0 Error Reporting Event Category: None Event ID: 5000 Date: 2008-03-31 Time: 09:59:27 User: N/A Computer: MYMACHINE Description: EventType clr20r3, P1 w3wp.exe, P2 6.0.3790.3959, P3 45d6968e, P4 system.data, P5 2.0.0.0, P6 471ebf27, P7 1840, P8 0, P9 system.stackoverflowexception, P10 NIL. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.   Generating dumps: Following the instructions in the stackov...
Welcome to a blog chat on Wednesday about ASP.NET and Debugging
2008-03-28 12:34:00
On Wednesday (April 2nd) me and Tom from the ASP.NET Debugging Blog will co-host a live blog chat on our blogs where you can ask questions about ASP.NET and Debugging with windbg and sos.  The chat client will be hosted on our blogs for an hour starting at 10 AM EST (Eastern Standard Time) /4 PM CET (Central European Time) so you can just browse to either http://blogs.msdn.com/Tess or http://blogs.msdn.com/Tom to attend and ask any questions you want about ASP.NET and debugging with windbg and sos.dll. We will both host the exact same chat so the questions and answers will appear on both blogs simultaneously. Because of time differences we will probably miss some people from Asia and the western regions of the US but if it turns out well we will probably host more of these sessions at other times that fit these regions better. Feel free to drop a note if you are interested in attending this chat session or future ones in other time-zones so we ca...
ASP.NET Case Study: Hang with mixed-mode dlls
2008-03-27 13:51:00
If you use mixed mode dlls (assemblies with .net and c++ code) you need to take care to not have any .net entry points so that you don't end up with a GC/LoaderLock deadlock like this one.  What is a managed/.net entry point you might ask... it basically means that during the loading of the assembly the assembly may call some .net methods.  For example, if you have a dllmain that calls into managed code, or if you have managed constructors for static value types.  In esscence, anything that would allow you to call into managed code whilst holding the loaderlock.   Problem explanation The loaderlock is a native critical section that is used when loading a dll using CreateObject, LoadLibrary, GetProcAddress, FreeLibrary, GetModuleHandle or on the first load when invoking a method using pinvoke. If you have a .net assembly referencing a mixed mode assembly you will also enter the loaderlock the first time you access so...
.NET Debugging Demos Lab 7: Memory Leak
2008-03-25 15:33:00
This is the last debugging lab in the .NET Debugging Demos series.  By now you should have the basics down for troubleshooting hangs, perf issues, memory leaks and crashes in .net applications. Hope you have enjoyed your debugging sessions. The last one in the series is a managed memory leak caused by holding on to resources in an unexpected way.   Since it is the last one I have tried to make the questions a little bit less leading than the previous ones:) Previous demos and setup instructions If you are new to the debugging labs, here you can find information on how to set up the labs as well as links to the previous labs in the series. Information and setup instructionsLab 1: HangLab 1: Hang - reviewLab 2: CrashLab 2: Crash - reviewLab 3: MemoryLab 3: Memory - reviewLab 4: High CPU hangLab 4: High CPU hang - reviewLab 5: CrashLab 5: Crash - reviewLab 6: Memory LeakLab 6: Memory Leak - review Problem description: The problem description is very similar to Lab 6....
ASP.NET Viewstate error - Validation of viewstate MAC failed
2008-03-17 11:55:00
Last week I was working with on a case where they were getting this error message HttpException (0x80004005): Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster Typically this occurrs if the application is on a webfarm and autogenerate is used as the validation key.  This is because if you request a page and click a button for example, the postback may go to another server in the web farm and if the validation keys don't match, asp.net will consider the viewstate as invalid. However, in this case, they were not on a web farm so none of this applied.   Viewstate and viewstate validation use a couple of hidden form fields like __VIEWSTATE and __EVENTVALIDATION.  If the page renders so slowly that the __EVENTVALIDATION field has not rendered by the time someone clicks the button or control th...
Mer artiklar från denna bloggen:
1-30, 31-60, 61-90, 91-120, 121-150
28715 bloggar i topplistan.
Statistiken nollställs varje vecka.


Kontakta Oss