Web Browser Control on MFC View will crash application when view is destroied after loading XML file

This is a multi-part message in MIME format.

------=_NextPart_000_0006_01C61216.9AE57FB0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Dynamically create an web browser control and put it on a view in a MDI =
application. Navigate the control to a XML file on the local machine, =
with style sheets in the same directory. Then, after closing the view, =
the application will crash in about 2 minutes. And it consistantly =
throws an exception at this line in wincore.cpp

// call original wndproc for default handling

if (bCallDefault)

lResult =3D CallWindowProc(oldWndProc, hWnd, nMsg, wParam, lParam);

------=_NextPart_000_0006_01C61216.9AE57FB0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2802" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Dynamically create an web browser =
control and put=20
it on a view in a MDI application. Navigate the control to a XML file on =
the=20
local machine, with style sheets in the same directory. Then, after =
closing the=20
view, the application will crash in about 2 minutes. And it consistantly =
throws=20
an exception at this line in wincore.cpp</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>
<P><FONT face=3DArial size=3D2>// call original wndproc for default=20
handling</FONT></P>
<P><FONT face=3DArial size=3D2>if (bCallDefault)</FONT></P>
<P><FONT face=3DArial size=3D2>lResult =3D CallWindowProc(oldWndProc, =
hWnd, nMsg,=20
wParam, lParam);</FONT></P></DIV></BODY></HTML>

------=_NextPart_000_0006_01C61216.9AE57FB0--

0
dennisz1 (7)
1/5/2006 9:39:32 PM
vc.mfc 33608 articles. 0 followers. Follow

5 Replies
808 Views

Similar Articles

[PageSpeed] 43

Hi Dennis,
Welcome to MSDN Newsgroup!

This issue will basically occurs whenever a WebBrowser App shut down when 
an xml page is not completely loaded. So it will affect many customers 
using MSXML with WebOC. A workaround for  this issue is to wait for the xml 
file to finish loading before shut down. 

If you have any questions or concerns, please let me know. I am standing by 
to help you. 

Best Regards,

Terry Fei [MSFT] 
Microsoft Community Support
Get Secure! www.microsoft.com/security

0
v-terryf (64)
1/6/2006 2:26:13 AM
Terry,

Thanks for you response.

There are more to this problem than what I had posted.

First, this ONLY happens if the web control is put on the MFC view. If we 
put the web control on an dialog, with the same xml file, this problem does 
not happen.

Second, I tried to load another set of xmls from another group in our 
company and strangely this problem does not happen either.

In the first case, even if I wait for a LONG time and I can actually view 
all the contents of the pages in the web control, it will still crash after 
I close the view (not the application).

I am wondering if there is a bug with the control, and somehow these 
particular XML files we are trying to access manifested this bug.

Any suggestions?

Thanks.

Dennis.

""TerryFei"" <v-terryf@online.microsoft.com> wrote in message 
news:z%23jiXimEGHA.1236@TK2MSFTNGXA02.phx.gbl...
> Hi Dennis,
> Welcome to MSDN Newsgroup!
>
> This issue will basically occurs whenever a WebBrowser App shut down when
> an xml page is not completely loaded. So it will affect many customers
> using MSXML with WebOC. A workaround for  this issue is to wait for the 
> xml
> file to finish loading before shut down.
>
> If you have any questions or concerns, please let me know. I am standing 
> by
> to help you.
>
> Best Regards,
>
> Terry Fei [MSFT]
> Microsoft Community Support
> Get Secure! www.microsoft.com/security
> 


0
dennisz1 (7)
1/6/2006 10:13:11 PM
Hi Dennis,
Thanks for your response!

In this scenario, I hope you could send us a simplified sample and the 
detailed steps to repro this issue. This will hep us to debug it on our 
side and get closer to this issue, so I appreciate your time in performing 
them. If you have any questions or concerns, please let me know. I am 
standing by to help you.

Best Regards,

Terry Fei [MSFT] 
Microsoft Community Support
Get Secure! www.microsoft.com/security

0
v-terryf (64)
1/9/2006 6:54:51 AM
I am experiencing a similar issue, albeit in a VB6 MDI application. I have an 
application which loads XML/XSLT (served from IIS/asp.net application server) 
documents in a webrowser control on an MDI child form.  On loading the 
documents the application crashes with a memory refernce error.  Pure HTML 
works fine.  The application works fine on NT 4.0 (IE6.0) in the same 
scenario.  I have a consistent method of reproducing the problem however it 
also intemitently crashes at other times, again when loadind XML into the 
webbrowser control.  

Additionally the IDE crasshes in a similar way.  This is a production app, 
which is about to be moved on to XP. If I need to do the transform on the 
serverside then I need to know soon. 

(Incidently XML spy 5 crashes intermittently on XP with an error in MSXML.dll)

-- 
Mark Compton
Autumn Consulting


""TerryFei"" wrote:

> Hi Dennis,
> Thanks for your response!
> 
> In this scenario, I hope you could send us a simplified sample and the 
> detailed steps to repro this issue. This will hep us to debug it on our 
> side and get closer to this issue, so I appreciate your time in performing 
> them. If you have any questions or concerns, please let me know. I am 
> standing by to help you.
> 
> Best Regards,
> 
> Terry Fei [MSFT] 
> Microsoft Community Support
> Get Secure! www.microsoft.com/security
> 
> 
0
Compo (2)
1/19/2006 5:20:03 PM
I have found that this only happens if the XML file contains a XSL:INCLUDE 
statement - possibly to do with security on temporary internet files and 
SHDOCVW.DLL ??
-- 
Mark Compton
Autumn Consulting


"Compo" wrote:

> I am experiencing a similar issue, albeit in a VB6 MDI application. I have an 
> application which loads XML/XSLT (served from IIS/asp.net application server) 
> documents in a webrowser control on an MDI child form.  On loading the 
> documents the application crashes with a memory refernce error.  Pure HTML 
> works fine.  The application works fine on NT 4.0 (IE6.0) in the same 
> scenario.  I have a consistent method of reproducing the problem however it 
> also intemitently crashes at other times, again when loadind XML into the 
> webbrowser control.  
> 
> Additionally the IDE crasshes in a similar way.  This is a production app, 
> which is about to be moved on to XP. If I need to do the transform on the 
> serverside then I need to know soon. 
> 
> (Incidently XML spy 5 crashes intermittently on XP with an error in MSXML.dll)
> 
> -- 
> Mark Compton
> Autumn Consulting
> 
> 
> ""TerryFei"" wrote:
> 
> > Hi Dennis,
> > Thanks for your response!
> > 
> > In this scenario, I hope you could send us a simplified sample and the 
> > detailed steps to repro this issue. This will hep us to debug it on our 
> > side and get closer to this issue, so I appreciate your time in performing 
> > them. If you have any questions or concerns, please let me know. I am 
> > standing by to help you.
> > 
> > Best Regards,
> > 
> > Terry Fei [MSFT] 
> > Microsoft Community Support
> > Get Secure! www.microsoft.com/security
> > 
> > 
0
Compo (2)
1/26/2006 9:54:54 AM
Reply:

Similar Artilces:

file will not save
One of my excel files will not save. it seems to work ok, but when i try to save it, i get a "document not saved" message. the file cannot be closed unless i agree not to try to save it. any ideas why i cannot save this file? #1. Are you working off a floppy? If yes, then don't do this. Use windows explorer to copy from floppy to harddrive and work from there (and save there). Then use windows explorer to copy back to floppy. #2. You're saving to a location that you don't have permission to save to. #3. Your diskdrive is out of space??? missionary wrote...

Missing File Day 3 No resolution ?
No. Is this file something that can be sent to me? -----Original Message----- From: "Diane Poremsky" <info@cdolive.com> Sent: 4/12/2004 8:15:04 PM Subject: Re: Missing file still.... did you have different versions or suites of office installed? -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com "Kyle" <anonymous@discussions.microsoft.com> wrote in mess...

Access denied opening XML attachment
A user on my network cannot open an xml attachment in Outlook 2003. It works fine in previous versions. It says "access denied. Error processing resource." If the file is saved to a drive, then it opens without a problem. Is there some security configuration that would cause this behavior? I have tested on multiple machines and multiple users to rule out profile or other causes. I have also checked security on the tmp folder the file is trying to open from. Any insight would be helpful. -Paul ...

view additional mailboxes offline in outlook
Using Outlook 2003 - We have stup a user to be able to share a mailbox, with another account. When the account is online then the user can see the mailbox and it's contents. When the user is offline they can see the mailbox, but if they click onn it they get an error message saying that the server is unavailable. The shared mailbox is setup for caching. Is there a way to see this mailbox offline? A user needs to be online to see other mailboxes. -- PATRICK REED [Outlook - MVP]~~~~~~ -Microsoft Certified Professional (MCP) -Have you checked http://www.slipstick.com? -Please...

Xml Seralization Ignore attribute
Hey I have having a problem Deserializing a dataset. When I try to deserialize it (See below for my test code) I get the following exception {"Item has already been added. Key in dictionary: \"NextSyncPhase\" Key being added: \"NextSyncPhase\"" } But if I remove either msdata:NextSyncPhase="Hello" or msprop:NextSyncPhase="Hello" (see below) it works fine! Can anyone explain why XmlIgnore doesn't impact anything and why this is happening and how to fix it Thanks P.S. I also tried the following to no affect. XmlAttributeOverrides xOver...

Combo Box List Content Control
I want both the code and corresponding English translation to appear in the dropdown box. The codes are in col A, and the translations are in col B. Under Properites, ListFillRange I have entered: Jobs!A2:B200. Only column A is shown in the dropdown box. Also, when I select one of the dropdown options I get a VB error with my "Jobs!A2:B200" displayed in the VB code. Please tell me what I'm doing wrong. Thanks. Did you change the columncount property to 2? Be aware that the both columns will appear when you click on the dropdown arrow, but only one value will appear in ...

Unable to add custom field to a view/preview
I added a new attribute to the Quote and I am able to add this attribute to the form but the new attribute does not appear in the list of fields when I create a new view. Further, the new field does not appear in the list of fields if I try to add it to the quote preview. I am able to store and retrieve the value of the new field using the API. Thanks for any info. I figured it out. JohnE wrote: > I figured it out. Hi John! How do you solve the problem? Publish and IIS reset don't help. I don't see custom fields in "Customize views", but i can see custom fields ...

ProbleM: when I restore a mailbox using Exmerge with a pst file, nothing is transferred.
Hi, I am practising Exmerge for a big remote site migration in a couple of weeks. One thing I dont understand is that I can backup one test mailbox fine using Exmerge (I know this works, as I have opened the mailbox pst file within outlook and everything is there), but when I perform the restore using the pst file, nothing happens. There is no error messages, and Emerge goes through the motions (though it finishes supsiciously quick), but when I open the mailbox, no emails have been restored. Although it is great that Exmerge is working for the backup part of the stage, I am disappointed it i...

Importing ofx file
I'm using Money 2004 Premium and I was downloading my bank account information in ofx format directly in Money; recently this stopped working and I have to manually import the file into money. Not a big deal, but an annoyance just the same. Does anyone have a suggestion as to a fix for this? tia dennisd In message <QK3kl.3776$rt3.617@newsfe15.iad>, dennis <djd@home.net> writes >I'm using Money 2004 Premium and I was downloading my bank account >information in ofx format directly in Money; recently this stopped working >and I have to manually import the fi...

sending web pages
My Outlook (2003)does not allow me to send a webpage or the link to a page as it says it is because it may have a potential virus. How do I resolve this? Thank you Copy/paste the link instead. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. After searching google.groups.com and finding no answer: David Davidson <ddavidson@adelphia.net> asked: | My Outlook (2003)does not allow me to send a webpage or | the link to a page as it says it is because it may have a | potential virus. How do I resolve this? Thank you ...

error when opening .accdb file
I don't think this is a new issue but I can't seem to find the resolution... I get an error when opening my Access 2007 formatted database stating that the file could not be found, though at the same time the file opens successfully. -- Error is intermittent. On occasions where the error does not occur, the file opens normally (I have never had an occasion where the file did not open at all) -- I have only seen the error happen when I have a 'Display Form' set in the Application Options for the 'Current Database' -- The database contains macros, VBA m...

New CRM Database Views
I am need of creating a new CRM view to handle some report requirements. I have read that views that use views are supported and I have read that I need to create a new database adjacent to the CRM database. How are any of youh hanlding New CRM Database Views? If you scroll down the CRM tables in OrganizationName_MSCRM database then you will see the ffiltered views of table. I have created Reports in Business intelligence by using existing views of CRM . These views correspond to the security role of crm users. /Aamir Hello there, It's a good practice to create a new database to hol...

CRM 3.0 Web client performance questions
Hello - I seem to have a bit of a connundrum here and was wondering if anyone else has experienced a simmilar issue. We've currently got CRM 3.0 up and working but I have gotten some questions regarding performance from some of my users that access CRM using the web client on a WAN link. They are overseas and the server is located in the US. They've got a 512kb connection and we've got a full t-1 connection. They are stating that it can take them anywhere from 30 seconds to 2 min to load a page. So, I had them do some investigating and testing with some other machines ...

MFC Registry Access in Automation Servers (EXE)
I have written a MFC server application (MFC automation server). Some configuration settings are saved with WriteProfileInt /WriteProfileString to the registry. I used SetRegistryKey("Mycompany") for the registry path. The application works fine under different users. Now this application is started as embedded server via my ASP code from the IIS. The machine is a Windows 2003 Web Edition Server. For this case the DCOM and IIS settings uses a predefined user for the ASP code and the COM server. If I start the app per hand now under this user everything is going well. But if the app ...

Default Folder for PST files?
I have a slightly different question relating to the above: I already have my current & archive pst files stored in my own personal folders. When I want to open my archive folder I right-click Outlook Today & select 'Open Outlook Data File'. Everytime, Outlook defaults to its own path (Documents & Settings\User\Local Settings\Application Data\Microsoft\Outlook\) This is really annoying & I would like it to default to opening a customised path, such as C:\Mail\ Any suggestions? -- Cheers, James Goodman Hi James, if you want to displace your pst file, please ...

Change default view of Activies to Service Activities.
When clicking on any "Activities" tab, CRM shows list of activities of the object, and it's the view: "Open Activity Associated View". Can we customize so that the view "Open Service Activity Associated" will be shown instead? Only show the Service Activities. Hi, Here is something for your interest. Thanks to Michael. http://www.stunnware.com/crm2/topic.aspx?id=JS11 -- PLEASE do click on Yes or No button if this post is helpful or not for our feedback. uMar Khan :: CRM Freelance Consultant Email :: imumar at gmail dot com Blog :: http://umarkhan.word...

new...delete not work in MFC ? Why ?
Hi, Check out the following code char* t=new char[1000]; t="sdfsdf"; delete t; at delete t; statement , MSVC 6.0 MFC application generates Abort: Unhandled exception Why? Help ! sandSpiderX > Hi, > > > Check out the following code > char* t=new char[1000]; > t="sdfsdf"; > delete t; > > The rule is simple, if you use "new [...] then you must use delete []" and if you use new ... then simply call delete ... In your case you need to do delete [] t; ....but that's not the end of your problems. "char * t&...

Importing Contract from .csv file is not working
Hi, I m new to CRM. I have two column in my .CSV file. name and phone number i am trying to imort them to CRM contact Module. Everything happen smooth, i mean mapping of fields. But it does not Import the Contact in to CRM , instead the task goes and sits into the Buld Import Activity. And shows the Status as "Pending". I am using CRM Client and all the services are running..... Please let me know what could be the problem.. Labhesh Shrimali Bangalore - India MCP. Hi you have to change the Log on account for the Workflow Service on the CRM Server Regards, Dirk F ...

Tab Control Records
I have placed a Tab Control on my form. The Form is linked to a master table that assignes an ID. I have 6 tabs and each tab has a subform (The subforms link to the Score Table and the score table links back to the Master Table) with option buttons for the user to choose. The problem I am having is that when the user clicks on the next tab it creats a new record in the Score Table. I would like to have one record per Master table ID. any help would be greatful. Vincent ...

Pivot Table Wizard causes crash
Hello, I'm using Excel 2003(11.8316.8221) SP3 When I use the Pivot Table Wizard and press the "back" button to redefine the range of data. Excel crashes. I've tried with no other files open. I can use the wizard to create now pivot tables, but not redefine this existing PT. The file is about 1 meg. Thanks in advance. Mike Just after posting this I found a reference to the problem being the result of having "frozen windows" on the sheet with the PT. I "unfroze" the windows and everything works just fine. Mike "mike in...

Changing of Cell protections after saving Excel File (2002)
This problem occurs when I protect a document using a macro 4.0 function: =PROTECT.DOCUMENT(TRUE,,,TRUE,TRUE). When I use the function within a macro4.0 macro, on an original file, everything works fine. The sheet has unlocked cells, and when the sheet is protected, it allows me to access those cells. But if I save the file, or save.as another name, then the fun begins. The enable selection of the sheet( view codes) has gone from 0-xlNoRestrictions to -4142- xlNoSelection. This locks me out of doing anything in the sheet. When I unprotect and then re-protect the sheet using the T...

Access 2007 Application title
Ok this is really silly, how do I get the file name of the currently open db in the title bar above the ribbon? Going to access options current database, if I select overlapping windows the title disappears, seems to only work with tabbed documents(I'm not overly fond of tabbed documents)? I am often working on more than one db..this title helps me keep track of which db I'm in. Is there some other setting I'm missing or am going to have to bite the bullet and get to like tabbed documents. Thanks ...

Change the anchor property of a control.
Hello. How can I capture the event, when changing the anchor property of the control ? I.e : myPanel.anchor = AnchorStyles.Left & AnchorStyles.Bottom .... How can I know, when the Anchor property is changed (which event?) ? Thanks :) Am 12.06.2010 23:46, schrieb Mr. X.: > Hello. > How can I capture the event, when changing the anchor property of the > control ? > > I.e : > myPanel.anchor = AnchorStyles.Left & AnchorStyles.Bottom > .... > How can I know, when the Anchor property is changed (which event?) ? Like I said, about once o...

Bad File Name
I'm getting the Error #52, Bad File Name or Number. FileCopy "C:\PROSERV\DB\Restore.mdb", "C:\PROSERV\BU\Format(Date,""yyyymmdd"") & "".mdb" The file defintely exisits. Could it be the format part thats not right. Thanks DS DS wrote: >I'm getting the Error #52, Bad File Name or Number. > >FileCopy "C:\PROSERV\DB\Restore.mdb", >"C:\PROSERV\BU\Format(Date,""yyyymmdd"") & "".mdb" Hard to tell without knowing what file name you are looking for. Is this the same ...

Dynamics RMS HQ Client keeps crashing
Hi everyone, We have an issue at the moment with Dynamics RMS HQ Client crashing while attempting to process a 401 Upload Data worksheet. I tried manually creating one and moving the from date back 30min with each one, but it gets to a point where it just crashes. As the day continues this time keeps advancing so it seems as if its something to do with the amount of data it is trying to upload. It does normally upload a lot more and thus I don't really understand why it is crashing now. Debugging has been switched on and it is crashing at the "Sending Worksheet ...