FirstData WebService giving error - web-services

My First data web service code is working fine on local machine. Followed Patricker answer here at stackoverflow Link To Code for WebService .Problem is when I deploy it on server I get error.
Am I missing any WebService DLL or dependency because I don't see anything in my deployable file created with VS2010 using Build Deployment Package for upload.
I have noticed onething in the error. Path is C:\Users\Chris\Documents\Visual Studio 2010... which is my local machine and the server is generated on the host server. Whats wrong?
ERROR
An internal error occurred.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Security.Cryptography.CryptographicException: An internal error occurred.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[CryptographicException: An internal error occurred.
]
System.Security.Cryptography.CryptographicException.ThrowCryptographicException(Int32 hr) +33
System.Security.Cryptography.X509Certificates.X509Utils._LoadCertFromFile(String fileName, IntPtr password, UInt32 dwFlags, Boolean persistKeySet, SafeCertContextHandle& pCertCtx) +0
System.Security.Cryptography.X509Certificates.X509Certificate.LoadCertificateFromFile(String fileName, Object password, X509KeyStorageFlags keyStorageFlags) +237
System.Security.Cryptography.X509Certificates.X509Certificate..ctor(String fileName, String password) +80
DataFirstWebWebService.CLinkTransaction.BuildOrderService() in C:\Users\Chris\Documents\Visual Studio 2010\Projects\DataFirstWebWebService\DataFirstWebWebService\CLinkTransaction.cs:120
DataFirstWebWebService.CLinkTransaction.ChargeCreditCard(String cardNumber, String expMonth, String expYear, String ccv, Decimal chargeTotal, Billing billingInfo, CLinkTransResponse transResponse) in C:\Users\Chris\Documents\Visual Studio 2010\Projects\DataFirstWebWebService\DataFirstWebWebService\CLinkTransaction.cs:29
DataFirstWebWebService._default.Button1_Click(Object sender, EventArgs e) in C:\Users\Chris\Documents\Visual Studio 2010\Projects\DataFirstWebWebService\DataFirstWebWebService\default.aspx.cs:38
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563

Related

Sitecore Error: Could not create instance of type: Sitecore.Form.Core.WffmActionHandler. No matching constructor was found

Has anyone ran into the issue below? Basically, I am trying to upgrade the Web forms for Marketers from 8.0-U3 to 8.0-U4(successful) to 8.1-Initial release (not successful).
The error was during the update installation process:
http://upgrade/sitecore/admin/UpdateInstallationWizard.aspx
It says:
The installation has encountered a critical error.
This Sitecore installation cannot be used for either testing or
production purposes until Sitecore support is contacted. Make sure to
download and include the file containing diagnostic information about
your Sitecore installation.
Server Error in '/' Application.
Could not create instance of type: Sitecore.Form.Core.WffmActionHandler. No matching constructor was found.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: Sitecore.Exceptions.ConfigurationException: Could not create instance of type: Sitecore.Form.Core.WffmActionHandler. No matching constructor was found.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ConfigurationException: Could not create instance of type: Sitecore.Form.Core.WffmActionHandler. No matching constructor was found.]
Sitecore.Configuration.Factory.CreateFromTypeName(XmlNode configNode, String[] parameters, Boolean assert) +272
Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) +131
Sitecore.Events.EventSubscribers.Add(String eventName, XmlNode configNode) +545
Sitecore.Events.Event.GetConfigSubscribers() +564
Sitecore.Events.Event.RaiseEvent(String eventName, Object[] parameters) +338
Sitecore.Data.DataProviders.Sql.SqlDataProvider.SetProperty(String parameterName, String value, CallContext context) +259
Sitecore.Data.DataProviders.DataProvider.SetProperty(String name, String value, CallContext context, DataProviderCollection providers) +124
Sitecore.Data.DataManager.SetProperty(String name, String value) +103
Sitecore.Web.Authentication.TicketManager.IsTicketExpired(Ticket ticket, Boolean useProlongation) +330
Sitecore.Web.Authentication.TicketManager.GetTicket(String ticketId, Boolean returnExpired) +93
Sitecore.Web.Authentication.TicketManager.IsTicketValid(String ticketId) +37
Sitecore.Shell.Web.ShellPage.IsLoggedIn(Boolean returnAfterLogin) +409
Sitecore.Shell.Web.UI.SecurePage.OnLoad(EventArgs e) +22
System.Web.UI.Control.LoadRecursive() +68
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4498
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1073.0
I was able to fixed the issue. I reinstalled the update package of WFFM 8.1. But prior to that, I copy and pasted the DLLs and configuration files of WFFM 8.1-Initial release to my instance before undergoing under run of update.
Edited: Root cause, forgot to update the Sitecore.Forms.config with the patch below:
<handler type="Sitecore.Form.Core.WffmActionHandler, Sitecore.Forms.Core" method="OnWffmActionEventFired" >
<param name="actionManager" ref="/sitecore/wffm/wffmActionExecutor" /> </handler>
In my case i had fixed by copying entire DLL from clean-sitecore installation folder, When more dig on it who is black sheep is below they are
Sitecore.Forms.Core.dll
Sitecore.Forms.Custom.dll
Sitecore.Forms.Mvc.dll
Above dll's version differed.

NReco.PdfGenerator 1.1.7 does not work in hosted environment

I have invested some hours in creating a set of reports to be generated by PdfCreator. I liked the idea to define the content in HTML and then generate it into PDF files that can be used in both WPF client and MVC site.
It works excellent locally. But when publishing the website to hosted environment the PDF generation suddenly crashes ... Why!!?
The error output on the webpage is not very helpful:
(exit code: -1073741701)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: NReco.PdfGenerator.WkHtmlToPdfException: (exit code: -1073741701)
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[WkHtmlToPdfException: (exit code: -1073741701)]
NReco.PdfGenerator.HtmlToPdfConverter.CheckExitCode(Int32 exitCode, String lastErrLine, String outputFilePath) +123
NReco.PdfGenerator.HtmlToPdfConverter.GeneratePdfInternal(String[] htmlFiles, Byte[] inputBytes, String coverHtml, String outputPdfFilePath, Stream outputStream) +2481
[Exception: Cannot generate PDF: (exit code: -1073741701)]
NReco.PdfGenerator.HtmlToPdfConverter.GeneratePdfInternal(String[] htmlFiles, Byte[] inputBytes, String coverHtml, String outputPdfFilePath, Stream outputStream) +2819
NReco.PdfGenerator.HtmlToPdfConverter.GeneratePdf(String htmlContent, String coverHtml, Stream output) +87
NReco.PdfGenerator.HtmlToPdfConverter.GeneratePdf(String htmlContent, String coverHtml) +42
SongService.Report.DomainServices.ReportCompiler.GeneratePdf(String templateName, T model) +704
SongServiceWeb.Controllers.PresentationController.GetReport(Guid presentationId) +261
lambda_method(Closure , ControllerBase , Object[] ) +122
System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +14
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +156
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +27
System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) +22
System.Web.Mvc.Async.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult) +29
System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +32
System.Web.Mvc.Async.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d() +50
System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +225
System.Web.Mvc.Async.<>c__DisplayClass33.<BeginInvokeActionMethodWithFilters>b__32(IAsyncResult asyncResult) +10
System.Web.Mvc.Async.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) +10
System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +34
System.Web.Mvc.Async.<>c__DisplayClass2b.<BeginInvokeAction>b__1c() +26
System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +100
System.Web.Mvc.Async.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) +10
System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +27
System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +13
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +36
System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +54
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +39
System.Web.Mvc.Controller.<BeginExecute>b__15(IAsyncResult asyncResult, Controller controller) +12
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +28
System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +54
System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +29
System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +21
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +36
System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +54
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +31
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9651796
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
This question had an interesting suggestion: NReco.PdfGenerator in ASP.NET stoped working on server
In the version history of NReco.PdfGenerator it says that 1.1.6 had a new deployment that is dependant upon C++ package.
Quote from Nuget:
v.1.1.6 changes: WkHtmlToPdf tool upgraded to version 0.12.2.1 (released January 19, 2015). NOTE: this version of wkhtmltopdf requires Visual C++ Redistributable package for VS 2013 (x86). WkHtmlToPdf tool upgraded to version 0.12.2.1 (released January 19, 2015). NOTE: this version of wkhtmltopdf requires Visual C++ Redistributable package for VS 2013 (x86).
Even if my error was different I tried to add the missing files. I included msvcp120.dll and msvcr120.dll but it made no difference. Just to be sure I added vccorlib120.dll and wkhtmltopdf.exe as well. Still no difference.
My next idea was that I needed to point out a temporary directory with write permission, that could be used during internal work. But I don't find any reference to that in the documentation.
EDIT:
I found a property on HtmlToPdfConverter named TempFilesPath. That looked really promising! So I quickly created a directory and set needed write permission.
converter.TempFilesPath = HttpContext.Server.MapPath(#"~/_temp");
I verified that this directory is readable and writable from code on host. But the error from PdfCreator is still the same ...
Regarding system requirements I found a passage on this page http://www.nrecosite.com/pdf_generator_net.aspx saying:
PdfGenerator works fine with Azure Web Role / Worker Role / usual VM.
Azure Web Sites is NOT supported because of GDI WinAPI limitations that prevent WkHtmlToPdf from working.
I guess this might apply to my situation as well. I am not running in Azure, but still in a "cloud service" environment, so it is likely they have the same limitations of GDI WinAPI.
This is really sad. The idea was excellent: Same reports in web and client. But in this setting it didn't work.
We had similar error saying:Cannot generate PDF: (exit code: -1073741819)
I am putting our solution here if anyone needs. Execute wkhtmltopdf.exe from console and check the error. In our case it was saying some dll's are missing like api-ms-win-core-localization-l1-2-0.dll, api-ms-win-core-timezone-l1-2-0.dll and so on. I dont know why these dll's were not on server. According to operating system, we found correct places under system32 or sysWOW64 folders and copy these dlls to these folders and problem has solved.
For example how to fix api-ms-win-core-timezone-l1-2-0.dll problem, below link will help: https://www.youtube.com/watch?v=s5N0jmYyy34

Why do I get an error in Firefox when uploading an image to the sitecore media library?

Every time I try to upload an image to the Media Library using Firefox, I get a pop up error that says "An error occured while uploading a file". Upon examination of the sitecore logs, I see the following in the stacktrace:
288 11:29:27 ERROR Application error.
Exception: System.ArgumentException
Message: Illegal characters in path.
Source: mscorlib
at System.Security.Permissions.FileIOPermission.HasIllegalCharacters(String[] str)
at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList)
at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList)
at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String[] pathList, Boolean checkForDuplicates, Boolean needFullPath)
at System.IO.File.GetLastWriteTimeUtc(String path)
at Sitecore.Resources.Media.MediaData.get_MediaId()
at Sitecore.Resources.Media.MediaCache.CanCache(Media media, MediaOptions options)
at Sitecore.Resources.Media.MediaCache.GetStream(Media media, MediaOptions options)
at Sitecore.Resources.Media.Media.GetStream(MediaOptions options)
at Sitecore.Resources.Media.MediaRequestHandler.DoProcessRequest(HttpContext context, MediaRequest request, Media media)
at Sitecore.Resources.Media.MediaRequestHandler.DoProcessRequest(HttpContext context)
at Sitecore.Resources.Media.MediaRequestHandler.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute ()
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute ()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Heartbeat 11:30:04 WARN Memory usage exceeded the MemoryMonitor threshold.
Heartbeat 11:30:04 WARN Memory usage: 1,680,764,928
Heartbeat 11:30:04 WARN Number of suppressed logs due to the minimum time between log entries: 10
I can tell there is some kind of illegal character exception, but I don't know where to look from here. What could be the cause of this issue and how might I fix it? Is there somewhere to configure the file path in sitecore?
I am using Sitecore 6.5
I had this problem also on Firefox and Safari.
Please change setting Upload.Classic to true.
It will be :
<setting name="Upload.Classic" value="true" />

Unsupported Operation. A document processed by the JRC engine cannot be opened in the C++ stack [duplicate]

This question already has answers here:
A document processed by the JRC engine cannot be opened in the C++ stack
(15 answers)
Closed 8 years ago.
when i deploy my asp.net website on windows server 2003 with oracle 10g database in backend.I am using sap crystal report version 13.0.2000.0
It gives error as
Unsupported Operation. A document processed by the JRC engine cannot be opened in the C++
stack.Description: An unhandled exception occurred during the execution of the current web request.
Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: Unsupported Operation. A document processed by the JRC engine cannot be opened in the C++ stack.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[COMException (0x80041811): Unsupported Operation. A document processed by the JRC engine cannot be opened in the C++ stack.]
CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options) +0
CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options) +95
CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +270
[CrystalReportsException: Load report failed.]
CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +333
CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob) +877
CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename) +84
WEBPAGES_srccustomerbill2.setdatasource() +2270
WEBPAGES_srccustomerbill2.Page_Load(Object sender, EventArgs e) +233
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +91
System.Web.UI.Control.LoadRecursive() +74
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
If you have a Web Application
you have to modify the properties for the .rpt files:
Change Build Action to "Content" ("Embedded Resource" by default).
Change Copy to Output to "Copy always" ("Do not copy" by default).
If you don't want to change properties for each file, there's an easy way to default build action for non-default file-types.
If you have a Web Site
you have to flag "Allow this precompiled site to be updatable" inside "Publish WebSite" menu
In both Web Application and Web Site
you can, instead of doing previous steps
Not publish the report using the publish option, just copy them manually in publish folder.
and you must
Check if the reports exist and are accessible by the application (permissions, filepath,)
Good luck!
You will need to modify two properties in the .rpt files:
Build Action is set to "Embedded Resource" by default. Change it to "Content".
Copy to Output is set to "Do not copy" by default. Change it to "Copy always".
Rebuild, Build deployment package and Publish. Done!
I have got this same error message and have tried Googling and Googling and yet found the solution.
First, you have to check your ReportPath if is correct.
If you're using C#, this code might help:
//declare new report
ReportDocument rpt = new ReportDocument();
//load your report
rpt.Load(Server.MapPath("crMembers.rpt"));
//set your datasource
rpt.Database.Tables[0].SetDataSource(m.GetReportSource());
//set your report for the viewer
crviewer.ReportSource = rpt;
//refresh the viewer
crviewer.RefreshReport();
After try all above solution i got final solution is just copy your Crystal Report folder( where you save all crystal report into single directory) directly into location where you host you website. In my case it is c:/inetpub/www/xyz here xyz is publish folder.
Re-install the "Crystal report engine" to the server and Build Action set to "Content"..

System.Security.SecurityException when calling SharePoint Web Service (_vti_bin/Lists.asmx) from InfoPath form (VSTA)

I have ended up with an exception when calling the GetListItems(...) web service method. I am using Visual Studio Tools for Applications as I am customizing an InfoPath form. This is creating .NET 2.0 code.
I am sitting on my host computer, and querying the SharePoint WFE. This has been working nicely before I switched from InfoPath 2010 and InfoPath 2007. After I switched over to InfoPath 2007, VSTA was reinstalled an probably caused som funky issues. Anyone got an idea on how to solve this?
I have modified both my local web.config for .net 2.0, and my .net framework configuration 2.0 to allow full trust on the strong name of my application.
Any tips?
The full stacktrace:
System.Security.SecurityException was unhandled by user code
Message="Request for the permission of type 'System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."
Source="mscorlib"
StackTrace:
at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessPermission.Demand()
at System.Net.HttpWebRequest..ctor(Uri uri, ServicePoint servicePoint)
at System.Net.HttpRequestCreator.Create(Uri Uri)
at System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase)
at System.Net.WebRequest.Create(Uri requestUri)
at System.Web.Services.Protocols.WebClientProtocol.GetWebRequest(Uri uri)
at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebRequest(Uri uri)
at System.Web.Services.Protocols.SoapHttpClientProtocol.GetWebRequest(Uri uri)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at Sjekkliste2.SharePointLists.Lists.GetListItems(String listName, String viewName, XmlNode query, XmlNode viewFields, String rowLimit, XmlNode queryOptions, String webID)
at Sjekkliste2.FormCode.EnhetExists(String lokasjon)
at Sjekkliste2.FormCode.ddLokasjon_Validating(Object sender, XmlValidatingEventArgs e)
at Microsoft.Office.InfoPath.Internal.XmlEventHost.GenericProxy(Object genericDelegate, DataDOMEvent dataDOMEvent, InfoPathEvents type)
at Microsoft.Office.InfoPath.Internal.XmlEventHost.ValidatingProxy(DataDOMEvent dataDOMEvent)
at Microsoft.Office.Interop.InfoPath.SemiTrust._DataDOMEventSink_SinkHelper.OnValidate(DataDOMEvent pDataDOMEvent)
According to the stack trace, your application doesn't have WebPermission while running the code. This can be caused because your code isn't set as full trust at your host site (and yes, this could be caused by new install).
Check the security settings for your code at the host - your code can't create WebRequests now.