I need to open an CHM file when I click an Image button in a web application. I am keeping the chm file inside a folder called "Help" and trying to open it.
But when i try to open it in my development machine, it is opening directly. But when i publish the website and i try to open the help file from the published url, i am getting the open/save dialog box to open the help chm file.
Is it possible to open an CHM file directly without getting the popup dialog to save it ?
I have changed the settings in IIS 7 to accept the chm files. But still it is not working.
My problem is, Im using the following code to access the chm & to open it. But it is not working when i publish the web application in the web server(different server) and when i access the published url in my machine. The chm file is placed inside a Help
folder in the solution.
Something just dawned on me. You may need to right-click the file in the server's windows explorer and click Properties, then click Unblock. Generally these files are blocked by windows unless you unblock them at the individual file level.
rajendran_13
Member
4 Points
7 Posts
How to open CHM file directly in ASP.Net Application
May 10, 2011 11:48 AM|LINK
I need to open an CHM file when I click an Image button in a web application. I am keeping the chm file inside a folder called "Help" and trying to open it.
But when i try to open it in my development machine, it is opening directly. But when i publish the website and i try to open the help file from the published url, i am getting the open/save dialog box to open the help chm file.
Is it possible to open an CHM file directly without getting the popup dialog to save it ?
Thanks in advance.
Regards,
Rajendran.
bbcompent1
All-Star
32974 Points
8500 Posts
Moderator
Re: How to open CHM file directly in ASP.Net Application
May 10, 2011 01:46 PM|LINK
Raj, I think what you need to do is configure a MIME type in IIS to do this.
rajendran_13
Member
4 Points
7 Posts
Re: How to open CHM file directly in ASP.Net Application
May 11, 2011 05:27 AM|LINK
Hi,
Can you explain more about that. It will be more helpful if you give an example with a link for that ?
Thanks in advance.
Regards,
Rajendran.
bbcompent1
All-Star
32974 Points
8500 Posts
Moderator
Re: How to open CHM file directly in ASP.Net Application
May 11, 2011 11:17 AM|LINK
Sure, this shows how to add mime types in IIS 7.
http://technet.microsoft.com/en-us/library/cc725608(WS.10).aspx
rajendran_13
Member
4 Points
7 Posts
Re: How to open CHM file directly in ASP.Net Application
May 12, 2011 11:05 AM|LINK
Hi,
I have changed the settings in IIS 7 to accept the chm files. But still it is not working.
My problem is, Im using the following code to access the chm & to open it. But it is not working when i publish the web application in the web server(different server) and when i access the published url in my machine. The chm file is placed inside a Help folder in the solution.
string filepath = Server.MapPath(@"/Help/NMRGHelp.chm");
Process.Start(filepath);
<div style="left: -10000px; overflow: hidden; width: 1px; position: absolute; top: 0px; height: 1px;" id="_mcePaste" class="mcePaste"></div>I just want to know what is wrong in accessing the path of the file in webserver.
Thanks in advance,
Rajendran.
bbcompent1
All-Star
32974 Points
8500 Posts
Moderator
Re: How to open CHM file directly in ASP.Net Application
May 12, 2011 05:45 PM|LINK
Something just dawned on me. You may need to right-click the file in the server's windows explorer and click Properties, then click Unblock. Generally these files are blocked by windows unless you unblock them at the individual file level.