WPF application issues on windows server 2003/2008 - wpf

I deployed my WPF application on windows server 2008 and its working fine when i started using of it. But after some time i'm facing so many problems with my app like its freezing some windows/controls and some windows only minimize, maximize and close buttons are working and in some windows some controls only working, any one help me please to get out of this.
Thanks,
#nagaraju.

In a server environment, you should deactivate Hardware rendering, as most servers have only very limited GPU performance. See this link, item 6, on how to set this. Please report after ensuring software rendering is enabled.

Related

RenderTargetBitmap renders empty images

Here's the situation: I have an ASP.NET Web Forms application which uses WPF controls for reporting.
Process is the following: Create WPF controls and bind to data -> create image from WPF control -> use generated image to create PDF reports.
I'm using RenderTargetBitmap to render bitmaps from WPF controls. Issue is when I run all this on my local machine (Windows 10) it works, as soon as application is deployed on QA machine (Windows Server 2008 R2) it generates empty images.
I tried to simplify reporting page, by leaving only static text on the WPF control, still I get empty page.
I created sample console application which mimics part of binding data to WPF (granted static data) and generating image from WPF control & it works on both environments. One difference I can think of is the console application is not running as IIS' AppPoolIdentity, which runs the Web Application on the QA machine.
I came across this SO post which suggests there was a Windows Update that caused similar issue. Our QA machine is Azure VM, so updates are installed regularly. Update that caused the issue is from September 2017, having fix update out in October 2017. So I rulled out windows update causing the issue.
Also in the referenced SO post, OP suggests that this issue happens only if account running the code is System account
It ONLY doesn't work if run under high privilege SYSTEM account (e.g. from Task scheduler).
I tried this as well, having Task Scheduler running the sample console app, but as I mentioned above it successfully created the image.
So at this moment I'm pretty much out of ideas.
The application code that is supposed to generate images is scattered so I'm not sharing it here, but if any piece is of particular interest happy to post.
Any idea what can cause this different behavior in diff. environments ?
It turns out ruling out missing Windows Update was not the right thing to do.
At the end I installed the fix windows update and issue was solved.

All converted apps including samples fail to run with a 'The parameter is incorrect'

I'm trying to convert a WPF oneclick installed application and so everything should be pretty straight forward. However, whenever I run the debug project, I get
'The parameter is incorrect'
in a message box popup and I can never run the app.
This happens for my app while trying to debug, all the samples from github, and even the DAC application from the Windows Store. The error pops up even once the app is installed and showing in my application list.
I'm on the latest build of the Creators Update.
There are various errors in the event viewers, but they seem to be a common occurence for WinRT apps.
Any ideas at all?
If you have the WPF project in VS2017, I'd recommend to package directly from VS without using the DAC. see the article for more information https://learn.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-packaging-dot-net
The problem appears to be related to the May Security Update. I restored Windows to the factory defaults and everything works fine.
However, once I install the the May Security Update to address this bug with Sql Server and Filestreams, the Desktop Bridge Debugging project stops working.
I'm going to throw out a random guess that it's related to the Microsoft Malicious Software Removal Tool, as the event viewer logs mentioned an issue with the 'parameter is incorrect' referring to the Microsoft.MRT.
Of course it could be anything, and as only 7500 people have even downloaded the Desktop Bridge Debugging project in the first place, I doubt it's high on the list of Microsoft Developer Priorities.
And to be completely honest, it's really probably my fault for not rewriting the app as a UWP app, after rewriting it as a Windows Forms app, and as a Silverlight app, and as a WPF app and on and on and on. Although, I'm not sure how many glasses of Kool Aid are left in the punch bowl for me.

How to use dotTrace Performance Profiling while launching the WPF application it self

Am working on WPF application. It is taking lot of time to launch the application so one of my client raised performance issue. To solve/identify the issue what is the best solution ? and am using dotTrace profiler to identify the issue but while launching how can I attach process to application ?.
You can launch your application under dotTrace - it's a standard way to profile an app. See https://www.jetbrains.com/help/profiler/Starting_Local_Profiling_Session.html

Web performance isn't up to snuff... what's the new "Microsoft Way"?

Looking for opinions. I'm working on a mid-sized 3-tier ASP.NET project (.NET 2.0 and Visual Studio 2005) with an Oracle on Unix back-end, some beefy MS web servers, and IE browser clients. Performance is pretty bad, and users feel the UI looks outdated as well. We may have an opportunity soon to redesign and rewrite the entire application from the ground up, and I'm wondering what the current or recommended MS platform is.
I was involved with WPF and Silverlight on a different contract when MS downgraded support for Silverlight in favor of "HTML5" for Windows 8 and Windows Phone a few years back. I'm not trying to start a flame war between how long Silverlight or even WPF will be around, but I'm looking for some modern alternatives as of today, April 2013. The one requirement we can't get around is that we can't install something on each and every user PC throughout the client organization.
My own background is in WinForms and C# more so than any of the above, but everywhere I turn it seems developing any new LOB apps in WinForms isn't done much anymore.
Whatever happened to the Application Server platform and apps run thru Remote Desktop? Does it still make sense to develop desktop apps and deploy to app servers and just put a shortcut on each user's desktop, or even map a drive letter like we used to do back in the day?
Your $0.02 would be appreciated!
I would definitely consider doing it as an internal web site.
The UI would be HTML5 using the "single page application" (SPA) for each function you need. Each function would be on a page that is loaded when the user needs it. The javascript/ajax code in the browser would interact with the web server which feeds back the raw data needed to be displayed.
Using Active Directory, you can have full security and customization per person.
If you need lots of interactivity, then you'd also want to consider including SignalR in the mix. (That is one of the "new" MS tools!)
If you can't install anything in the end users' PCs then go ASP.Net. Anything else will require installation.
You can make a web application more appealing to the users by having a good designer and a LOT of javascript. Not remotely comparable to the power and beauty of WPF, but that's your best bet.
WPF is part of the .Net framework and will not run without it installed.
Silverlight could also be an option, but it still requires an installation (although minimal, 4 MB, less-than-2 minute install), but an install anyways.
WinRT only works in Windows 8. It's not supported in lower versions (Vista, XP, 7). So I don't think it's an option as of now (unless all your users have Windows 8, of course).
And no, winforms is not an option. It's also part of the .Net framework, and even if you could get it installed, it doesn't make any sense having to deal with the limitations of it, having many much much better technologies at your disposal.

Silverlight on Windows 8

I'm running my SL5 application (that has been working well so far) on Windows 8, and it is not going well. I have a background picture which usually does not render correctly, almost everytime I navigate my background (including the controls over it) just goes white till I resize IE, then it re-paints (what makes it stranger is that the parts that goes white is outside of the navigation frame, why is it getting repainted). (Chrome renders fine)
When I run my application out-of-browser my login screen pops up and works correctly but after the login screen closes it looks like the gray background of the login screen remains behind and I cannot click on anything, resizing makes no difference, it looks like every control has been disabled.
I have updated my NVidia Drivers to the latest, don't think its a display driver issue though.
Anyone else had these issues? Anyone else running SL5 fine on windows 8?
(Looks like I'll be downgrading back to windows 7 soon)
Silverlight should run great on any desktop browser in Windows 8, just like it does on Windows 7, Vista, and Mac. The underlying runtime is 100% the same. That does not mean you may not find a glitch with a graphics driver, but it means you shouldn't - and likely won't.
I did want to make a clarifying point, however, that Silverlight is not part of the Modern Internet Explorer (the Metro Internet Explorer). Only a subset of Flash is supported and that is only supported on white-listed sites.
This means Silverlight solutions that you might have expected to run on the Surface RT (running Windows RT - or Windows on Arm) will not run (as there is no SL runtime). And, I think we can all have a collective moan and ask, together, "Why not?" To which there is no acceptable answer.
The theoretical goal, of course, is to write native Windows 8 apps. If you want to write something web based you should write it in HTML5. That's the official word. I think we all know that HTML5 has a ways to go in order to catch Silverlight, but it is what it is. Can't change some things.
I have had no issues with any of my Silverlight 5 apps running on Windows 8 - I focus mainly on line of business apps but have some graphical and otherwise apps that run fine as well.
I'm only marking this as the answer to close the case, what the actual answer was to the problem we will never know. The solution: automatic updates. After much hassles with getting automatic updates to actually go through, my machine is now working well.

Resources