WebSupergoo ABCpdf10 PDF Exception Failed to add HTML - pdf-generation

We are getting following exception. It is working fine on local. Can anyone provide any suggestion?
9528 19:15:28 ERROR EDComponents > EDPDFGenerator Exception
Exception: WebSupergoo.ABCpdf10.Internal.PDFException
Message: Failed to add HTML: Page load failed. The specified file is unavailable. This could be related to network or permission issues, or OnLoadScript evaluation error.
Source: ABCpdf
at WebSupergoo.ABCpdf8.Doc.AddUrlHtml(String urlOrHtml, Boolean isHtml, Boolean paged, Int32 width, Boolean disableCache)
at WebSupergoo.ABCpdf8.Doc.AddImageUrl(String url, Boolean paged, Int32 width, Boolean disableCache)
at WebSupergoo.ABCpdf8.Doc.AddImageUrl(String url)
at K2Intelligence.Web.UI.Controllers.BioController.GenerateDefautPDF()
Nested Exception
Exception: WebSupergoo.ABCpdf10.Internal.PDFException
Message: Page load failed. The specified file is unavailable. This could be related to network or permission issues, or OnLoadScript evaluation error.
Source: ABCpdf
at WebSupergoo.ABCpdf10.Internal.Gecko.GeckoWorker.AddImageUrl(String url, Double pageWidthMm, Double pageHeightMm, AddImageUrlOptions options, IProgressStreamEx stream)

Related

Unhandled exception thrown: read access violation. _Scary was 0x30

i got an issue with specific error Unhandled exception thrown: read access violation.
_Scary was 0x30.
i m trying to load a terrain with a model loaded from assimp and i keep getting this exception
const auto _Scary = _Get_scary();
_Tree_find_result<_Nodeptr> _Result{{_Scary->_Myhead->_Parent, _Tree_child::_Right}, _Scary->_Myhead};
_Nodeptr _Trynode = _Result._Location._Parent;

Error while reading dump file in DebugDiag Analysis

I have installed DebugDiag Tool to monitor high CPU usage at the windows server.
https://www.microsoft.com/en-us/download/details.aspx?id=58210
I am getting following error while analysing dump files generated by DebugDiag Collection tool.
No report file was generated
An error occurred while generating the analysis report
Exception: Type: COMException
Message: Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
StackTrace: at DebugDiag.DbgLib.DbgControlClass_Legacy.OpenDump(String DumpPath, String SymbolPath, String ImagePath, Object pProgress)
at DebugDiag.DotNet.NetDbgObj.OpenDump(String dumpPath, String symbolPath, String imagePath, Object pProgress, Boolean throwOnBitnessMismatch, Boolean loadClrRuntime, Boolean loadClrHeap)
at DebugDiag.DotNet.NetDbgObj.GetDumpFileType(String dumpFile, String symbolPath)
at DebugDiag.DotNet.NetAnalyzer.AddDumpFile(String dumpFile, String symbolPath)
at DebugDiag.DotNet.NetAnalyzer.AddDumpFiles(List`1 dumpFiles, String symbolPath)
at DebugDiag.Analysis.AnalyzerClient.RunAnalysisAsyncInternal(NetProgress progress, String symbolPath, String imagePath, List1 dumpFiles, List1 analysisRules, String reportFileDirectoryOrFullPath, Boolean IncludeSourceAndLineInformationInAnalysisReports, Boolean SetContextOnCrashDumps, Boolean DoHangAnalysisOnCrashDumps, Boolean IncludeHttpHeadersInClientConns, SynchronizationContext synchContext, Boolean ExcludeIdenticalStacks, Boolean IncludeInstructionPointerInAnalysisReports)

handle some errors in Global.asax

I have a web application on .NET4 and MVC3 (razor) .
I want to handle my application errors in Global.asax. I have created application_error function.
I have noticed and found some errors.
one of them returns this string in Application_Error when I am trying to add break point on line Response.Clear(); and that error is generic.
how can I find which codes or part of my codes makes it?
my code:
protected void Application_Error()
{
var exception = Server.GetLastError();
var httpException = exception as HttpException;
Response.Clear();
Server.ClearError();
}
error on httpException:
{System.Web.HttpException (0x80004005): File does not exist.
at System.Web.StaticFileHandler.GetFileInfo(String virtualPathWithPathInfo, String
physicalPath, HttpResponse response)
at System.Web.StaticFileHandler.ProcessRequestInternal(HttpContext context, String
overrideVirtualPath)
at System.Web.DefaultHttpHandler.BeginProcessRequest(HttpContext context,
AsyncCallback callback, Object state) at
System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionSt
ep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously)}
i found the solution
string errorLocation = Request.Path;
this syntax in Application_Error() tel you where is the problem :)
Just to state my experience with this exception, in my case the reason was that there was no webpage specified as the start page for the site.

ServiceStack : How to catch errors before written to response

I develop a Rest Service by using ServiceStack.
My model contains a DateTime property and the problem start with it.If a client post/get wrong formatted date value as string , ServiceStack fires an exception "String was not recognized as a valid DateTime."
Stack Trace:
[FormatException: String was not recognized as a valid DateTime.]
System.DateTime.Parse(String s, IFormatProvider provider, DateTimeStyles styles) +6364458
ServiceStack.Text.Common.DeserializeBuiltin`1.<GetParseFn>b__b(String value) in C:\src\ServiceStack.Text\src\ServiceStack.Text\Common\DeserializeBuiltin.cs:58
ServiceStack.ServiceModel.Serialization.StringMapTypeDeserializer.PopulateFromMap(Object instance, IDictionary`2 keyValuePairs) in C:\src\ServiceStack\src\ServiceStack.Common\ServiceModel\Serialization\StringMapTypeDeserializer.cs:79
[SerializationException: KeyValueDataContractDeserializer: Error converting to type: String was not recognized as a valid DateTime.]
ServiceStack.ServiceModel.Serialization.StringMapTypeDeserializer.PopulateFromMap(Object instance, IDictionary`2 keyValuePairs) in C:\src\ServiceStack\src\ServiceStack.Common\ServiceModel\Serialization\StringMapTypeDeserializer.cs:95
ServiceStack.ServiceHost.RestPath.CreateRequest(String pathInfo, Dictionary`2 queryStringAndFormData, Object fromInstance) in C:\src\ServiceStack\src\ServiceStack\ServiceHost\RestPath.cs:319
ServiceStack.WebHost.Endpoints.RestHandler.GetRequest(IHttpRequest httpReq, IRestPath restPath) in C:\src\ServiceStack\src\ServiceStack\WebHost.Endpoints\RestHandler.cs:104
ServiceStack.WebHost.Endpoints.RestHandler.ProcessRequest(IHttpRequest httpReq, IHttpResponse httpRes, String operationName) in C:\src\ServiceStack\src\ServiceStack\WebHost.Endpoints\RestHandler.cs:80
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +625
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +270
I know its an error and I know it must be catches but I want to implement it with my error codes and error descriptions(human friendly).
Any advice could be very helpful about how to catch an exception before its written to response itself on (DebeugMode=true) or the service fires an exception to client.
Thnx
Add your Custom Request Binder (or more advanced option is to implement IRequiresRequestStream on your DTOs) to by-pass ServiceStack's deserialization with your own.
More information about this is contained in ServiceStack's wiki documentation

Windows Azure: Error 300 Ambiguous Redirect when creating a blob container

I followed a tutorial on creating a blob on windows azure. But when I do that, I get an exception error:
Error while creating containerThe server encountered an unknown failure: The remote server returned an error: (300) Ambiguous Redirect.
The code is:
private void SetContainersAndPermission()
{
try
{
// create a container
var CloudAccountStorage = CloudStorageAccount.FromConfigurationSetting("BlobConnectionString");
cloudBlobClient = CloudAccountStorage.CreateCloudBlobClient();
CloudBlobContainer blobContainer = cloudBlobClient.GetContainerReference("documents");
blobContainer.CreateIfNotExist();
// permissions
var containerPermissions = blobContainer.GetPermissions();
containerPermissions.PublicAccess = BlobContainerPublicAccessType.Container;
blobContainer.SetPermissions(containerPermissions);
}
catch(Exception ex)
{
throw new Exception("Error while creating container" + ex.Message);
}
}
Can anyone tell me How to solve this problem....
I would guess the connection string is somehow wrong? Can you share the connection string? (X out your shared key...)
You could also install Fiddler (debugging HTTP proxy) and see what the HTTP request looks like. That may make the issue more obvious.
I also faced the same issue. I am not sure if this is the workaround for it. I modified the container name value in ServiceConfiguration.csfg from "Photograph" to "photograph" and it worked.
I think you can not give upper case letters in queue, table or blob name. The name should have only lower case characters.

Resources