Trying to display an HTML report page

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
3/18/2010 5:45:00 AM
Gravatar
Total Posts 22

Trying to display an HTML report page

From my mojoportal feature I am allowing a user to generate a report in pdf, excel or html format which I am then showing them with an open/save dialog. This is the code I am using for the PDF

Response.ContentType = "application/pdf";
Response.AppendHeader("Content-Disposition", string.Concat("attachment; filename=", FileName));
Response.TransmitFile(FileName);
Response.End();

It works like a charm for the PDF and the EXCEL format but when I try to do the same for the HTML version I get problems.  I get an htmlfile unknown runtime error when I debu which is coming from the fixurl.js script file at this point

If (b) {b.innerhtml=a};

This eventually results in the user seeing the standard page not found message.  I just want to let the user open or save the HTML version of my report but I'm guessing, that because it's an HTML page mojoportal is trying to do something clever with the url.  Is there any way to bypass this so that I can just display the HTML page?  The code I am using is:

Response.ContentType = "text/html";
Response.AppendHeader("Content-Disposition", string.Concat("attachment; filename=", FileName));
Response.TransmitFile(FileName);
Response.End();

Please help if you can - thanks.

Suzy

5/13/2010 5:53:54 PM
Gravatar
Total Posts 9

Re: Trying to display an HTML report page

I'm getting this same error trying to open any admin page in my new install on Godaddy.  I've tried v2.3.4.3 and v2.3.4.2 - I get this same error in fixurl.js for both builds.  Has anyone found a solution?

5/13/2010 6:03:03 PM
Gravatar
Total Posts 9

Re: Trying to display an HTML report page

Update:  the error goes away if I set <add key="EnableGoogle404Enhancement" value="false" /> to false.  the reason it was being called at all is that my admin folder was missing.  So, root cause (admin folder missing) is fixed, but still, can't use the Google404Enhancement...not sure why.

5/14/2010 11:03:48 AM
Gravatar
Total Posts 18439

Re: Trying to display an HTML report page

Hi,

The Google404Enhancement is used on the page not found error to help find a page.

I don't know anything about fixurl.js where does that come from?

One thing I can mention that I discovered today is that if an error occurs when trying to load a UserControl that is missing it also results in a page not found error which is not intentional. The issue is that we are using part of the error text to detect a page not found error because it doesn't throw a specific exception but a generic HttpException. So what happens is the File doesn't exist text also exists in the error when a UserControl is not found. So for example on my local machine I had moved things around after we moved our source code to Codeplex and I had a page on my local machine with a custom module that was not under source control and did not exist on disk in the new location I was working from. So the page containing the missing Module was returning a page not found error even though the page does exist, because the error message about the missing UserControl is so similar to the error message when a page is really missing. I'm looking into a fix for this. It is a shame that the runtime doesn't have a more specific exception than HttpException when a page is not found, it makes it difficult to trap the error.

Best,

Joe

You must sign in to post in the forums. This thread is closed to new posts.