Forum  General Visual ...  Visual WebGui v...  HtmlBox don’t show files inside of browser any more in VWG6.4
Previous Previous
 
Next Next
New Post 12/15/2011 6:32 AM
  ruifrazao
583 posts
www.e-grou.com
1st Level Poster


HtmlBox don’t show files inside of browser any more in VWG6.4 

Hi,

I have a dialog with an HtmlBox inside with the purpose of show files inside of browser.
In VWG6.3 the same code works well for most of file formats like for example pdf files, after upgrade to VWG6.4 this don’t show anymore pdf files inside.
I have tested in IE and Firefox and the behavior are the same for both bownser: when compile code in VWG6.3 shows pdf files inside of IE or FF, but when compile the same code in VWG6.4 pdf files are not showed any more inside of the browser.
There are needed some code changes when upgrade to VWG6.4?
Thanks & Regards,
Rui
 
e-grou Free Edition, your free document management online. Click here to subscribe e-grou Free Edition.
 
New Post 12/17/2011 9:22 AM
  palli
14298 posts
1st Level Poster




Re: HtmlBox don’t show files inside of browser any more in VWG6.4 

Hi Rui,

I can't remember any details at the moment that you need to do differently in 6.4 compared to what you did in 6.3. For testing, I downloaded the "sample gateway listing folders ..." codesample linked from our Gateway article here and tested both in 6.3 and 6.4 and I am unable to see any different behaviour.

I even added a new form with a button that would open the original form in a dialog, and it still shows the PDF inside my IE9.

I would advice a full clear of caching on your 6.4 project and if that does not work for your, please create the most minimal reproducing sample application, clean it, zip it and email it to the support email address (see my signature) along with the full Http reference to this thread. Please also post here when you have sent the email.

I think it's a good idea that you include the PDF document(s) that you have problems with in case your problem has any relation to the contents of the PDF, although that should in general not be the case.

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
New Post 12/19/2011 5:53 AM
  ruifrazao
583 posts
www.e-grou.com
1st Level Poster


Re: HtmlBox don’t show files inside of browser any more in VWG6.4 

Hi Palli,

Thanks for the reply.
It is solved now. The problem was not related with VWG6.4.
We have changed our function to get mime string directly from registry, but I don’t know why .pdf mime definition string does not exist in my Windows7 computer.
It is solved now by correcting the function to get mime.
Anyway I will post here the function, maybe could be useful to others:
public static string m_GetMimeFromFile(string file
{
 string mime = "application/octetstream";
 string ext = System.IO.Path.GetExtension(file).ToLower();
 
  Microsoft.Win32.RegistryKey rk = Microsoft.Win32.Registry.ClassesRoot.OpenSubKey(ext);
  if (rk != null && rk.GetValue("Content Type") != null)
      mime = rk.GetValue("Content Type").ToString();
 
  return mime;
}
 
Thanks & Regards,
Rui
 
e-grou Free Edition, your free document management online. Click here to subscribe e-grou Free Edition.
 
 
New Post 12/20/2011 11:27 AM
  palli
14298 posts
1st Level Poster




Re: HtmlBox don’t show files inside of browser any more in VWG6.4 

Hi Rui,

Glad you got it sorted out. Thanks for the update and sharing,

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
Previous Previous
 
Next Next
  Forum  General Visual ...  Visual WebGui v...  HtmlBox don’t show files inside of browser any more in VWG6.4
.NET HTML5 Web, Cloud and Mobile application delivery | Sitemap | Terms of Use | Privacy Statement | Copyright © 2005-2012 Visual WebGui®       Visual WebGui weblog on ASP.NET Gizmox Blog Visual WebGui Group on LinkedIn Visual WebGui updates on Twitter Visual WebGui Page on Facebook Visual WebGui YouTube Channel Visual WebGui Platform News RSS