.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Application.Current.MainWindow.InvalidateVisual(); not working

Posted By:      Posted Date: October 14, 2010    Points: 0   Category :WPF

Hello all,


I am now working on the application which needs to get screenshots of WPF applications, the approach I use is injecting into target WPF application code and hooking Direct3D functions to intercept EndScene events and grab backbuffer.


The issue I have is that since the moment I inject into the application code, there is no change in visual representation of its windows then EndScene is not called, but I need to get a first screenshot as soon as possible. For that purpose I would like to force redraw of entire main window of the application. For this pupose in the injected code I call


View Complete Post

More Related Resource Links

New off line application working with sdf file. Need advice


Hey Folks

I am working on a project currently where I need to get data out of a 3rd party vendor's software that uses a .sdf file I looked this up and its a SQL CE file. I was hoping to just link to with with access but thats apparently not going to happen. I need to link to the database extract data from it to a csv file for later use. I also and most important I need to get the data from it and create a report that can be printed while on a customers site that my or may not have web access so I need for this program to be on and off line. I had my webapplication that I have been working on open and was able to bring up the sdf file under the server exploere however I can't seem to get anything out of it when I try to do grid views or detail views errors out.

Can I use one of Visual Studio projects to create this sort of applicaiton if so what would be the best approach. I would love to get an access odbc driver since office is allready installed on the employee's laptop's



Windows Forms application Stopped Working message in Windows Vista



A Windows Forms application developed with VB2008 Express that has been successfully run on two Windows XP systems and a Windows 7 system fails to run on two of two Windows Vista systems tried so far.


Attempting to run the app on a Windows Vista system results in a system dialog box titled, Microsoft Windows, with the message, A problem caused the program to stop working correctly.  Windows will close the program and notify you if a solution is available.  A single button at the lower right of the dialog contains the text, Close Program.
The initial form of the application never displayed and the dialog above appeared with little delay after attempting to start the program.

The program uses an SQL Server Compact Edition 3.5 database and the program is compiled to include the following .DLL files so the user does not need to install SQL ServerCE.

The Load event of the initial form causes a DataSet to be filled from the SQL CE DB.

I have the System Informa

How to get current user session in Windows application C#?



I am trying to create a Windows Application similar to facebook friend finder.exe in .NET. The steps I have followed to achieve this is as follows:

1. I have created a webservice containing webmethod SaveContacts(string firstname, string lastname, string number, string photo, string email, string userid).


2. I am consuming the webservice in a Windows Form application and calling the above mentioned function.

Now, I want to get the current logged in user ID which through the windows form application which is something tedious to me.

If anyone have any idea how to achieve this. Please help.






CLR Profiler is not working.Unhandled exception has occured in your application.


For me CLR Profiler is not working.

When i choose profile application and browser to the executable file.It show's up an message box

"waiting for application to start Common language runtime" .

the message box stays for long time and when i click on "Show Heap now" button even as above message box is displayed i get the following error

Unhandled exception has occured in your application. If you click Continue,the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.

Object reference not set to an instance of an object.

SPContext.Current.Web.CurrentUser null in application page on 2008 r2 server

With my current situation I have:
a wss3 development environment on a 2003 R2 server
then a production 2008 r2 server.

For some reason on the 2008 server the SPContext.Current.Web.CurrentUser object is null for users who are site collection administrators but may not have permission to log into the server itself; however, on the 2003 R2 server the code works fine for those users.
When googling around, I had seen something about nt permissions on the bin folder sometimes being and issue until asp.net cache picks up the dll but this is a page in the _layouts directory and the code is in the .aspx page itself. It works fine for me as a system administrator on either machine.

Any suggestions? Thanks.

Get Assembly info of my current C# Application


Hello, developers...

How can i get the assembly information of my current C# application, for example its GUID?



Amin Mashayekhi

Response.Redirect not working on an UpdatePanel if redirecting to a ClickOnce application (in some c



I have a strange issue. I am using the AjaxControlToolkit 3.0.30930 (the most recent). I have a very simple page with an UpdatePanel. A button on the UpdatePanel invokes Response.Redirect and passes the URL of a Click Once application on the same server. This works well if I run the website on my local system (Windows 7, IIS 7.5).

If I run the website on a remote system (Windows Server 2008, IIS 7.5, same settings) the redirect simply does not work when invoking the page from remote (using the IP address). Instead a postback is executed. Even if I use the IP address of the webserver to invoke the website locally on the webserver, the redirect does not work. Using http://localhost on the webserver the redirect works well.

I tried another test page with no UpdatePanel: The redirect works well in all scenarios.

I tried out to invoke the ClickOnce application using a link instead of Response.Redirect: The redirect works well in all scenarios, even with an UpdatePanel.

Does anyone have a clue what the problem might be?


Here is the ASPX:


<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TestWithUpdatePanel.aspx.cs" Inherits="TestWithUpdatePanel" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//E

Custom Web Application URL is not working.

I have created a web application on port 80 and have created a site collection for it. I have assigned the web app a custom URL.  SharePoint by default tries to insert the server name as the URL. For some reason, when I use a custom URL, the site is not accessible. However, when I leave the default server name, the site is suddenly accessible. Why is this the case and how can I make it so I can use custom URLs? Thanks.

WPF(Speech to Text Application) has stopped Working


This is an application(for converting the Speech to text) created in WPF (C# .net) in Windows Server 2008 Enterprise R2. It is buiding properly and while running it is showing the error WPF application has stopped working and it needs to close the program.

The Error details

Problem signature:

Problem Event Name: APPCRASH

Application Name: WPFSpeechToText.exe

Application Version:

Application Timestamp: 4cc2aeaa

Fault Module Name: KERNELBASE.dll

Fault Module Version: 6.1.7600.16385

Fault Module Timestamp: 4a5bdfe0

Exception Code: c000041d

Exception Offset: 000000000000aa7d

OS Version: 6.1.7600.

Locale ID: 1033

Additional Information 1: af5f

Additional Information 2: af5f87ebdae7965d2b41e6339144a33c

Additional Information 3: bdb6

Additional Information 4: bdb62151460fc71dea0ef6a609bbf67a

Read our privacy statement online:


If the online privacy statement is not available, p

Dynamically get the current instance of the workflow within a re-hosted WPF application



the scenario is: I create a re-hosted WPF application for the workflow designer, and within this designer I can edit the workflow(sequence, flowchart) with pre-defined and custom activities. The question is, how can I programmatically get an instance of the current workflow. Thereafter I can do some manipulations on this instance.



Form based authentication on current web application SharePoint 2010



I have question about creating form based authentication. I want to have different authentication in the same web application in the same time. For now I have windows authentication and I want to extend it to Form base authentication. I follow procedure on link http://blog.summitcloud.com/2009/11/forms-based-authentication-sharepoint-2010-fb/ step by step but it doesn't work. Also when I try to change authentication in Central administration to Forms it is not possible because that option is disable. Is there any setup for overcome this issue.

Thank in advice.


Search not working for one web application but is working for two others


I have three web apps: sp2010, teams and projects. I can use the search box to search the scopes of All, This Site and People in the sp2010 and the teams web applications. However, I can only search This Site in the projects web app. The other searches - All and People send me to an error page

I have noticed that the url in the teams web app is http://teams/_layouts/OSSSearchResults.aspx?k=hudson&s=All%20Sites after the search completes and the url in the projects web app is http://projects/Search/Results.aspx?k=hudson&s=All%20Sites.

I have checked and all three web apps have the same settings for Site Actions > Site Collection Administration > Search settings.

One other thing I noticed is that the teams and sp2010 web apps do not have the FAST configuration links under the Site Collection Administration but the projects web apps do. Could it be that search is not working for this web app due to the type of site collection it is? It is using the Team Site Template.





this application is not working in FF


it is working ie,crome,safari . but it is not working Firefox.

i think that the problem is here.lstMultipleValues.Attributes.Add("onclick", "FindSelectedItems(this," + txtSelectedMLValues.ClientID + ");");

can i write this code for firefox in different type?

<script type="text/javascript" language="javascript">            
        var timoutID;
        function ShowMList()
            var divRef = document.getElementById("divCheckBoxList");
            divRef.style.display = "block";
            var divRefC = document.getElementById("divCheckBoxListClose");
            divRefC.style.display = "block";
        function HideMList()

ASP.net web application not working after patch update(sp2) on server 2003


Dear All

I have ASP.Net web application server publish with iis6,Resently I install service patch 2 for my server 2003 , after this patchupgrade I cant accsess this application via web browser.I cant see any error massage also. but it can access from firefox and Chrom. then I uninstall this sp2 from my server, then I can access from IE7 and firefox.

But I need to install SP2 on this PC , How can I do it



Microsoft TechNet Forum Bandara

HttpContext.Current.Response.Redirect Not Working for Local Intranet Zone Sites


Hi All,

I have made this a seperate question as the original topic of another user who had a similiar issue was marked answered, however his answer is not mine.

In my infopath form, after the submit event, I am using HttpContext.Current.Response.Redirect(URL, false) to change the page.

I use an XPathNavigator to get the value for URL from a simple text box.

If i type in that text box http://www.google.com or http://www.hotmail.com, for instance, the page redirects perfectly.

However, if I type in a site address like http://intranet.mundaring.wa.gov.au or http://localhost for instance (which I need to), the form simply throws a critical error with no more detail than that.

The only pattern I can see is that the sites that DO work are in the Internet Zone, and all the sites that DO NOT work are all listed as Local Intranet sites.

I cannot change my local intranet sites as they are enforced by policy.

Please could somebody assist me with why this may be doing this. The form is opened from the intranet (a local site) so no zone change is taking place.




How to check whether the current workflow is valid? Is WorkflowDesigner.IsInErrorState() working?


How to check whether the current workflow hosted in a workflowdesigner is valid?

I tried calling WorkflowDesigner.IsInErrorState() everytime WorkflowDesigner. ModelChanged event fires.. but it always return false (ie no error) even though I see the red error sign in the designer!

any idea?

search is not working just for one application



we have almost 10 sharepoint aplications and the issue is search is not working in just one web application. Means, content source has two web applications like http://abc and http://xyz. If i see the crawl logs than i dont see any success for http://abc but i can see the all the sucess for just http://xyz. We have dedicated search serve and i have already rebooted the search server and kick off a full crawl for that content sourece but no luck. 

Please help.


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend