1

Closed

'The remote server returned an error: (500) Internal Server Error.'

description

This module shows promise for being able to export information to a PDF from within DNN.

For testing purposes, we installed this to our development server. The URL is only accessible from the internal network.

On my page, I have the content in the bottom content pane and the Export to PDF button in the top conent pane.

When I click on the button as a subscriber logged-in user, it states:
"A critical error has occurred. An unexpected error has occurred"

When logged in with a Host account, the error states:
"A critical error has occurred. The remote server returned an error: (500) Internal Server Error."

And the event log show:
Method:System.Net.WebClient.DownloadDataInternal
Message:
DotNetNuke.Services.Exceptions.PageLoadException: The remote server returned an error: (500) Internal Server Error. ---> System.Net.WebException: The remote server returned an error: (500) Internal Server Error.
at System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request)
at System.Net.WebClient.DownloadString(Uri address)
at Aspose.Modules.AsposeDotNetNukeContentExport.View.PdfExportButton_Click(Object sender, EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
--- End of inner exception stack trace ---

Please advise.
Closed Aug 9, 2014 at 12:39 PM by asposemarketplace

comments

spook_man wrote Jul 24, 2014 at 4:03 PM

Also have this error first prior to the one above:
InnerException:Unhandled Error:
Method:DotNetNuke.Professional.Authentication.ActiveDirectory.HttpModules.AuthenticationModule.OnAuthenticateRequest
Message:
System.Exception: Unhandled Error: ---> System.NullReferenceException: Object reference not set to an instance of an object.
at DotNetNuke.Professional.Authentication.ActiveDirectory.HttpModules.AuthenticationModule.OnAuthenticateRequest(Object s, EventArgs e)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
--- End of inner exception stack trace ---

Why is your module trying to authenticate via the ActiveDirectory Authentication module? We have is installed, but on the development server, it's not being used.

asposemarketplace wrote Jul 26, 2014 at 6:25 PM

Hi,

I hope you are well. Thank you for your interest in Aspose. We are sorry for the inconvenience.

Regarding the Issue No. 1, we are testing the module based on the error details you provided. Since the module dynamically generates the URL and then requests the current page to get its content therefore the URL is important for us to debug. Can you please share the DNN version and page URL of your DNN development site which gives this error? I know the URL is not accessible publicly but if we know the URL we can setup the same/similar URL on our development machine to test the module better.

Regarding Issue No. 2, We will be able to provide a better answer after completing our testing for Issue No. 1 but the module is definitely not explicitly trying to authenticate at all as you can see from its Source Code https://asposednn.codeplex.com/SourceControl/latest

Thank you for your cooperation and patience.

spook_man wrote Jul 28, 2014 at 12:17 PM

Is there some kind of Aspose server install needed?

Thanks..

spook_man wrote Jul 28, 2014 at 4:30 PM

Here's an example of the URL which is for the page:
http://devdnnv7/Personal-Logs/Export-PDF-Test?pid=15&disasterID=5265&username=SampleUser I'm using a XMod Pro template on the bottom of the page to gather information and display it on a page. XMod Pro uses the URL variables to look-up the proper information about what I'm querying and then display.

Below is what the sample HTML code which is generated and displayed by XMod Pro.

Thank you for your time and attention..
<div class="DNNModuleContent ModXModProC" id="dnn_ctr14612_ModuleContent">
    <h2>Personal logs for Sample Export (5265)</h2>
    <div style="font-family:arial;">
      <div style="color:#0000ff; font-size:32px; font-weight:bold; text-align:center; padding:10px;">
        Sample Export (5265)
      </div>
      <div style="font-size:14px; text-align:center;">
        Personal Logs of: <strong>SampleUser</strong>
      </div>
    </div>

    <div style="font-family:arial;font-size:14px; text-align:center; padding:0 0 5px 0; margin-top:5px;">
      <span style="color:green; font-weight:bold;">Last Updated:</span> September 28, 2010 8:40 AM
    </div>

    <hr class="style-two">

    <div style="font-family:arial; font-size:12px;">
        <div>
          <span style="font-weight:bold; color:#000080;">Tuesday, September 28, 2010</span>
        </div>
        <div style="display:inline-block; width:10%; float:left; text-align:right; padding:2px 0 0 20px;">
          <span style="font-weight:bold; color:#000080;">8:28:42 AM</span>
        </div>
        <div style="display:inline-block; float:left; text-align:center; padding:2px 5px 0 5px;">
          -
        </div>
        <div style="display:inline-block; float:left; padding:2px 0;">
          New Log opened at: Tuesday, September 28, 2010 8:28:42 AM
        </div>
        <br>
        <hr style="margin:10px 0;" class="style-two">
      
        <div>
          <span style="font-weight:bold; color:#000080;">Tuesday, September 28, 2010</span>
        </div>
        <div style="display:inline-block; width:10%; float:left; text-align:right; padding:2px 0 0 20px;">
          <span style="font-weight:bold; color:#000080;">8:29:19 AM</span>
        </div>
        <div style="display:inline-block; float:left; text-align:center; padding:2px 5px 0 5px;">
          -
        </div>
        <div style="display:inline-block; float:left; padding:2px 0;">
          Sample Log Entry One
        </div>
        <br>
        <hr style="margin:10px 0;" class="style-two">
      
        <div>
          <span style="font-weight:bold; color:#000080;">Tuesday, September 28, 2010</span>
        </div>
        <div style="display:inline-block; width:10%; float:left; text-align:right; padding:2px 0 0 20px;">
          <span style="font-weight:bold; color:#000080;">8:39:53 AM</span>
        </div>
        <div style="display:inline-block; float:left; text-align:center; padding:2px 5px 0 5px;">
          -
        </div>
        <div style="display:inline-block; float:left; padding:2px 0;">
          Tuesday, September 28, 2010 8:39:50 AM - 
        </div>
        <br>
        <hr style="margin:10px 0;" class="style-two">
      
        <div>
          <span style="font-weight:bold; color:#000080;">Tuesday, September 28, 2010</span>
        </div>
        <div style="display:inline-block; width:10%; float:left; text-align:right; padding:2px 0 0 20px;">
          <span style="font-weight:bold; color:#000080;">8:40:16 AM</span>
        </div>
        <div style="display:inline-block; float:left; text-align:center; padding:2px 5px 0 5px;">
          -
        </div>
        <div style="display:inline-block; float:left; padding:2px 0;">
          Sample Log Entry Two
        </div>
        <br>
        <hr style="margin:10px 0;" class="style-two">
  
    </div>
</div>

spook_man wrote Jul 28, 2014 at 4:34 PM

Also, this is running on DotNetNuke (Evoq) Professional Edition version 7.3.1.

asposemarketplace wrote Jul 28, 2014 at 7:07 PM

Hi,

Thank you for your feedback. No the Module is standalone package and does not require anything else to be installed on the server.

We will test the module based on the information you have provided and get back to you as soon as possible.

Thank you very much for your cooperation.

asposemarketplace wrote Jul 30, 2014 at 6:14 AM

Hi,

Thank you for your patience. Although we were not able to produce the issue with the same URL and similar DNN version but we have changed the way the content is fetched for Exporting to Word/PDF which should fix the exception for you as well.

Please download and try the version 1.0.1 of the module from the link below. The exported Word/PDF file is also now saved in PortalSettings.HomeDirectory\AsposeExport folder.
https://www.dropbox.com/s/1g6qikxjtojgfoc/AsposeDotNetNukeContentExport_1.0.1_Install.zip

If this version of the module works for you then we will upload its install package and source code to this project so that everyone can use it. I look forward to hear your feedback with any issues or suggestion you may have.

Kind Regards

spook_man wrote Jul 30, 2014 at 12:28 PM

Hello..
This latest version works as it should; I don't get any errors in the event logs and my webpage is being exported to PDF. Thank you.

The first top line is showing Evaluation Only. Created with Aspost.Words. Copyright 2003-2014 Apose Pty Ltd. in red.

When I click on the button, it's exporting everything on the page; header, menu, export buttons, and the footer area. It would be nice if we could select a content pane, or the full content area just to export; sort of a selective export feature. I'll open this later suggestion in a new issue, etc.

Thanks again for everything..

asposemarketplace wrote Aug 4, 2014 at 4:59 AM

Hi there,

Thank you for your enquiry.

Please note, the Word and PDF Export module is using Aspose. Words for .NET which is a commercial product, evaluation versions with time restricted limitations are available for use with this plug-in. Terms and conditions apply. If you want to continue to evaluate the product I recommend you to get the temporary license to testing out and the free trial period is 30 days. Here is the link to get the temporary license http://www.aspose.com/corporate/purchase/temporary-license.aspx

Please let us know if you have any more questions.

Best regards