Code: Select all
// C# + razor code sample
@{
GdPicture12.WEB.DocuVieware docuVieware = new GdPicture12.WEB.DocuVieware
{
ID = "DocuViewareIndexes",
StickySessionsEnabled = MvcApplication.STICKY_SESSION,
Timeout = MvcApplication.SESSION_TIMEOUT,
CacheFolder = MvcApplication.GetCacheDirectory(),
Height = new System.Web.UI.WebControls.Unit("568px"),
Width = new System.Web.UI.WebControls.Unit("100%"),
SinglePageView = false,
ForceScrollBars = false,
AllowedExportFormats = "*",
MaxUploadSize = 52428800,
CollapsedSnapIn = true,
EnableMouseModeButtons = false,
EnableFormFieldsEdition = true
};
docuVieware.RenderControl(Output);
}
// javascript code sample - get url from html, console that url, and load using docuvieware api
$('[id^=carousel-selector-]').click(function () {
var url = $(this).data('url');
$(this).addClass('active');
$(this).siblings().removeClass('active');
console.log(url);
var response = DocuViewareAPI.LoadFromUri('DocuViewareIndexes', url, OnLoadDocumentSuccess, OnLoadDocumentFailure);
console.log(response);
});
var OnLoadDocumentSuccess = function() {
console.log('Carregou');
}
var OnLoadDocumentFailure = function (data) {
console.log('Não Carregou');
}
However, when I publish to my server, I'm getting this error (this is the console from chrome):
However, if I do this same POST request using fiddler (a software which helps debugging APIs, which also captures any requests done by your computer), I get a 200 OK status. In the printscreen below, the first request was made by the browser (using DocuVieware API), which returned a 500 http status code (Internal Server Error). The second was done by fiddler client, using POST as expected, which returned 200:
This same error occurs when loading from any other external link (from google, for example), or even when trying to load from file.
When I try to load from file, this is what happens to the component:
The component stays with this "loading" bar forever.
Please, I have searched a lot about what reasons it could be. I even enable cors, but I've never thought this was the error in the first place, otherwise fiddler would cause error anyway, and the error would occur only when loading from URIs from my server (not from file, for example).
Is this error due to trial license, or because I'm using the server IP instead of a domain? What is the cause of this and how to solve it?
Thanks!!!!
Alisson