Stimulsoft pdf export exceed cookie size - asp.net

I'm trying to export my report into PDF.
I'm using ASP.NET as my backend and the problem happens after I pass the report to a controller method.
I get this error:
$exception {"The value size of the cookie is '..........'. This
exceeds the configured maximum size, which is
'4096'."} System.Net.CookieException
right here:
I've used chrome debug mode for cookie and I get this :
StiMobileDesignerDictionarySettings={"createFieldOnDoubleClick":false,"createLabel":false,"useAliases":false};
StimulsoftMobileDesignerLastTabOnPropertiesPanel=Properties;
formSerializeArray=[{"name":"Id","value":""},{"name":"Region","value":""},{"name":"Name","value":""},
{"name":"Address","value":""},{"name":"Plaque","value":""},{"name":"Phone","value":""},
{"name":"PostalCode","value":""},{"name":"BuildingType","value":""},
{"name":"Area","value":""},{"name":"Height","value":""},
{"name":"HeightCode","value":""},
{"name":"CrossingPosition","value":""},
{"name":"PermanentEquipment","value":""},
{"name":"SafetyEquipment","value":""}, {"name":"Branches","value":""},
{"name":"WC","value":"null"},
{"name":"SafetyAndSecuritySystem","value":""},
{"name":"ApprovedUsage","value":""},
{"name":"TypeOfGoodStored","value":""},
{"name":"Category","value":""}, {"name":"Type","value":""},
{"name":"AverageMonthlyInputCapacity","value":""},
{"name":"AverageNumberOfVisitsPerDay","value":""},
{"name":"AverageNumberOfVisitsPerMonth","value":""},
{"name":"PersonOrCompany","value":""},
{"name":"NationalCode","value":""}, {"name":"Fname","value":""},
{"name":"LName","value":""}, {"name":"FatherName","value":""},
{"name":"BirthCertificateNumber","value":""},
{"name":"BirthCertificateSerial","value":""},
{"name":"City","value":""}, {"name":"From_BirthDate","value":""},
{"name":"To_BirthDate","value":""},
{"name":"MaritalStatus","value":"null"},
{"name":"Gender","value":"null"}, {"name":"NationalId","value":""},
{"name":"CoName","value":""}, {"name":"CompanyType","value":""},
{"name":"EconomicCode","value":""},
{"name":"InsuranceWorkshopCode","value":""},
{"name":"BusinessLicenseNumber","value":""},
{"name":"WorkRecord","value":""},
{"name":"CompanyActivityContext","value":""},
{"name":"CompanyActivityCategory","value":""},
{"name":"CompanyMainActivity","value":""},
{"name":"From_CompanySabtDate","value":""},
{"name":"To_CompanySabtDate","value":""},
{"name":"From_CompanyLicenseValidityFromDate","value":""},
{"name":"To_CompanyLicenseValidityFromDate","value":""},
{"name":"From_CompanyLicenseValidityToDate","value":""},
{"name":"To_CompanyLicenseValidityToDate","value":""},
{"name":"FK_UserId","value":""}, {"name":"FK_RoleId","value":""},
{"name":"From_RegDate","value":""}, {"name":"To_RegDate","value":""},
{"name":"LastModifiedFK_UserId","value":""},
{"name":"LastModifiedFK_RoleId","value":""},
{"name":"From_LastModifiedDate","value":""},
{"name":"To_LastModifiedDate","value":""}];
StimulsoftWebViewerExportSettingsOpeningGroups={"SavingReportGroup":true,"PageRangeGroup":true,"SettingsGroup":false};
ASP.NET_SessionId=ccrez4wdqv12gesmy1p4pv4s;
RequestVerificationToken=ofuyh7BLdQpVCUL6WRVfoptviEKrAIAYtx5zQKxBhPXKzXYUxUGv2JfBOAgDSCeKCVqtcL1yWkoe2kFaikKugahyNYE_wQ0h1eQWD5E3dzU1;
.AspNet.ApplicationCookie=2JlL0YaAFAVnpf_hmLJRmxhAFkpHbgymFgnegwPX1brf4_Mr6YZP8n2-2hZf0GsDbmLHjZXY6J0wiivyM4Cxl41n8nd9FHcc68Qn2G40iaa2t7XjYMdLbwP9ltbzwfl
UAMF5zSabhpIHCevtsmDysf45kNf9UxQ0IOu1QW7fj4Uib3qzIg560BThS9XUD9tLeNGfHXdwRfaqREnlaJ0NgBzkoL8scWiFNRpDmUbsKL5NUnH93ZwZKWrZAmPtp09Hni3fR8If4kn
LtjSctwAgwzxBTCUN1EW3o2qANDxVfwts7tDZ6kDRZA4it7umeDmwPP7qLiL_QiEEzC7bkVJq-WlcNRtsbTlyoHJROC79o6p6vFcNL1skDfF9snFb3Jm5lsY7Ol1A8r5slqj-
f6opbfJVfM2W5Zswg0p_zAaVhTE6AQUgDdPJeUOGu54k4DvnoIZ80IGEHTL7Yn4WL_SOJAxvNIPIrxjyqYjh9WF8c318eyROqAUqpQYbPuPg3KNCGM_n3vBaz-
3CCIyps1ijH994avhYmWlr4UCenxuy9mTUiXpjqrgRLW9SAd_4ycdIjtrL032E99Rq7GAgTYSgBRuA1ytDaGYSr4PdQcod-MsMOpR_fLM9I2vpgZqzOFoqUvbol6kf0G_
kyl6aWJoW982JB8N7Qz2bbY1Pxksrb3uf0jTBm5Nvwz5vyDoSPQcSeiJD-q7RNjXDRrCYk-lExCeSBGZkxYLC8sImOUfTr_
1CwZ2OGIln_rKrFcTQBbRRYgFk1JzhzkT9FQLVgqfdn4FBZNdRztAn8XyK9RBx4IkajDXyMvmowRDwd_bxH2QXA_wQRIcv-
WXwoB-MMVKvkfsHI3hTshROGtsy_aebaRby2D912Zssn33Y_BFvAypcb4JygQu5KbPaCD4GauQQGZ7DyPCDBBj1_GhwjmihgEs3EV6Owhm_yz--1ZQ-hpmoKzlLdoS4P7k1owKlcxA7wQ_67SFFsrGDUf_Yjewkk;
StimulsoftWebViewerExportSettingsPdf={"PageRange":"All","ImageResolution":"100","ImageCompressionMethod":"Jpeg",
"ImageQuality":"0.75","EmbeddedFonts":true,"ExportRtfTextAsImage":false,"PdfACompliance":false,"OpenAfterExport":false,
"AllowEditable":"No","PasswordInputUser":"","PasswordInputOwner":"","KeyLength":"Bit40","UseDigitalSignature":false,
"GetCertificateFromCryptoUI":false,"UserAccessPrivileges":"PrintDocument,
ModifyContents, CopyTextAndGraphics, AddOrModifyTextAnnotations"}
and check it inside this site https://www.javainuse.com/bytesize it returns :
Edit: I've checked again and this error also happen for any type of export :

Related

How to minimize an HTTP POST request?

https://www.ncbi.nlm.nih.gov/pubmed
On the above URL, if I put "disease" in the search box, then click search. The I select "PMID List" to the right of "Format" ("Summary" is the original option).
Then, I get a list like
30929330
30929328
30929327
30929322
30929319
30929318
30929317
30929314
30929313
30929312
30929308
30929289
30929282
30929260
30929256
30929252
30929235
30929234
30929230
30929224
The body of the corresponding HTTP POST request according to postman is the following. But I am not sure how to reduce the request to the simplest.
CitationManagerCustomRange:false
CitationManagerStartIndex:1
CollectionStartIndex:1
EmailCheck1:
EmailCheck2:
EntrezSystem2.PEntrez.DbConnector.Cmd:displaychanged
EntrezSystem2.PEntrez.DbConnector.Db:pubmed
EntrezSystem2.PEntrez.DbConnector.IdsFromResult:
EntrezSystem2.PEntrez.DbConnector.LastDb:pubmed
EntrezSystem2.PEntrez.DbConnector.LastIdsFromResult:
EntrezSystem2.PEntrez.DbConnector.LastQueryKey:4
EntrezSystem2.PEntrez.DbConnector.LastTabCmd:
EntrezSystem2.PEntrez.DbConnector.LinkName:
EntrezSystem2.PEntrez.DbConnector.LinkReadableName:
EntrezSystem2.PEntrez.DbConnector.LinkSrcDb:
EntrezSystem2.PEntrez.DbConnector.QueryKey:
EntrezSystem2.PEntrez.DbConnector.TabCmd:
EntrezSystem2.PEntrez.DbConnector.Term:disease
EntrezSystem2.PEntrez.PubMed.Pubmed_Facets.BMFacets:
EntrezSystem2.PEntrez.PubMed.Pubmed_Facets.FacetSubmitted:false
EntrezSystem2.PEntrez.PubMed.Pubmed_Facets.FacetsUrlFrag:filters=
EntrezSystem2.PEntrez.PubMed.Pubmed_PageController.PreviousPageName:results
EntrezSystem2.PEntrez.PubMed.Pubmed_PageController.SpecialPageName:
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.EmailTab.Answer:
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.EmailTab.Email:
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.EmailTab.EmailCount:
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.EmailTab.EmailFormat:
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.EmailTab.EmailHID:16gQ_jkjclApXw89-veCbHLjYX7grDUT9i4D2P3WVBMdCXEkWMCK0J4zPSHf4DW8SDEsE0P1NBR0ZceMk9rQdg7Yo_M0ZMZQJ
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.EmailTab.EmailQueryKey:
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.EmailTab.EmailReport:
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.EmailTab.EmailSort:
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.EmailTab.EmailStart:
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.EmailTab.EmailSubject:
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.EmailTab.EmailText:
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.EmailTab.Holding:
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.EmailTab.HoldingFft:
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.EmailTab.HoldingNdiSet:
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.EmailTab.Key:
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.EmailTab.OToolValue:
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.EmailTab.QueryDescription:
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.EmailTab.SubjectList:
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.Pubmed_DisplayBar.FFormat:docsum
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.Pubmed_DisplayBar.FSort:
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.Pubmed_DisplayBar.FileFormat:docsum
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.Pubmed_DisplayBar.FileSort:
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.Pubmed_DisplayBar.Format:text
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.Pubmed_DisplayBar.LastFormat:
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.Pubmed_DisplayBar.LastPageSize:20
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.Pubmed_DisplayBar.LastPresentation:docsum
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.Pubmed_DisplayBar.LastSort:
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.Pubmed_DisplayBar.PageSize:20
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.Pubmed_DisplayBar.Presentation:uilist
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.Pubmed_DisplayBar.PrevPageSize:20
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.Pubmed_DisplayBar.PrevPresentation:docsum
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.Pubmed_DisplayBar.PrevSort:
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.Pubmed_DisplayBar.Sort:
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.Pubmed_DisplayBar.email_count:20
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.Pubmed_DisplayBar.email_sort:
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.Pubmed_DisplayBar.sPageSize:20
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.Pubmed_DisplayBar.sPresentation:uilist
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.Pubmed_DisplayBar.sSort:none
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.Pubmed_Pager.CurrPage:1
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.Pubmed_Pager.cPage:1
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.Pubmed_Pager.cPage:1
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.Pubmed_ResultsController.ResultCount:4276777
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.Pubmed_ResultsController.RunLastQuery:
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.TimelineAdPlaceHolder.BlobID:NCID_1_35744195_130.14.18.97_9001_1554136263_544865890_0MetA0_S_MegaStore_F_1
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.TimelineAdPlaceHolder.CurrTimelineYear:
citman_count:20
citman_start:1
coll_start:1
email_add_text:
email_address:
email_format:docsum
email_start:1
email_subj:disease - PubMed
p$a:EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.Pubmed_DisplayBar.sPresentation
p$l:EntrezSystem2
p$st:pubmed
term:disease
When I reduce it to the following, the return result is still the same.
EntrezSystem2.PEntrez.DbConnector.Cmd:displaychanged
EntrezSystem2.PEntrez.DbConnector.Db:pubmed
EntrezSystem2.PEntrez.DbConnector.LastQueryKey:4
EntrezSystem2.PEntrez.PubMed.Pubmed_ResultsPanel.Pubmed_DisplayBar.Presentation:uilist
But if I remove this line, the result will be completely different. It seems that the website somehow remembers the history.
EntrezSystem2.PEntrez.DbConnector.LastQueryKey:4
Could anybody show me how to get the minimal request so that I can use curl do download the list.

file_get_html() not working for the only webpage

I want to call a simple DOM file
I tested with another links and it works, but with this url it's not working.
My code is:
$bnadatos = file_get_html("http://www.rofex.com.ar/cem/FyO.aspx");
foreach($bnadatos->find('[#id="ctl00_ContentPlaceHolder1_gvFyO"]') as $i){
echo "datos:";
echo $i->innertext;
}
Response is a blank page.
What's wrong?
i solved with
$arrContextOptions=array(
"ssl"=>array(
"verify_peer"=>false,
"verify_peer_name"=>false,
),
);
$response = file_get_html("https://www.rofex.com.ar/cem/FyO.aspx", false, stream_context_create($arrContextOptions));
foreach($response->find('[#id="ctl00_gvwDDF"]/tbody/tr[2]/td[2]') as $i){
echo $i->innertext;
}
thank you #maio290 for light my road
This is just a guess, but do you have your error reporting on?
Out of the box, this is not working with the simple-html-dom library:
Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in /var/www/html/dom.php on line 83
Warning: file_get_contents(): Failed to enable crypto in /var/www/html/dom.php on line 83
Warning: file_get_contents(http://www.rofex.com.ar/cem/FyO.aspx): failed to open stream: operation failed in /var/www/html/dom.php on line 83
Fatal error: Call to a member function find() on boolean in /var/www/html/test.php on line 11
A fix for this can be found here - with that in place, I still get a blank page, which is due to a wrong answer (301 Moved Permanently) - for this to fix, you need to modify
'follow_location' => false
to
'follow_location' => true
so, now we get the proper site content - you can modify the selector to $html->find('#ctl00_ContentPlaceHolder1_gvFyO'); this will find all element which id=ctl00_ContentPlaceHolder1_gvFyO - see the documentation as reference.

Resource 7bed8adc-9ed9-49dc-b15e-6660e2fc3285 transitioned to failure state ERROR when use openstacksdk to create_server

When I create the openstack server, I get bellow Exception:
Resource 7bed8adc-9ed9-49dc-b15e-6660e2fc3285 transitioned to failure state ERROR
My code is bellow:
server_args = {
"name":server_name,
"image_id":image_id,
"flavor_id":flavor_id,
"networks":[{"uuid":network.id}],
"admin_password": admin_password,
}
try:
server = user_conn.conn.compute.create_server(**server_args)
server = user_conn.conn.compute.wait_for_server(server)
except Exception as e: # there I except the Exception
raise e
When create_server, my server_args data is bellow:
{'flavor_id': 'd4424892-4165-494e-bedc-71dc97a73202', 'networks': [{'uuid': 'da4e3433-2b21-42bb-befa-6e1e26808a99'}], 'admin_password': '123456', 'name': '133456', 'image_id': '60f4005e-5daf-4aef-a018-4c6b2ff06b40'}
My openstacksdk version is 0.9.18.
In the end, I find the flavor data is too big for openstack compute node, so I changed it to a small flavor, so I create success.

erlang-sqlite3 sqlite3:table_info error

I tried to extract table info from sqlite database using sqlite3:table_info/2 function and got an error message.
{ok,Pid} = sqlite3:open(db3).
Sql = <<"CREATE TABLE test (
id INTEGER PRIMARY KEY,
ts TEXT default (datetime('now')),
key TEXT,
val TEXT
);">>.
sqlite3:sql_exec(db3,Sql).
Check table list:
sqlite3:list_tables(db3).
[test]
Try to get table info:
sqlite3:table_info(db3,test).
And now error message:
`=ERROR REPORT==== 1-Mar-2015::19:37:46 ===
** Generic server db3 terminating
** Last message in was {table_info,test}
** When Server state == {state,#Port,
[{file,"../tmp/db3.sqlite"}],
{dict,0,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],[],[],
[],[],[]},
{{[],[],[],[],[],[],[],[],[],[],[],[],[],
[],[],[]}}}}
** Reason for termination ==
** {function_clause,[{sqlite3,build_constraints,
[["INTEGER","PRIMARY","KEY"]],
[{file,"src/sqlite3.erl"},{line,1169}]},
{sqlite3,build_table_info,2,
[{file,"src/sqlite3.erl"},{line,1166}]},
{sqlite3,handle_call,3,
[{file,"src/sqlite3.erl"},{line,833}]},
{gen_server,try_handle_call,4,
[{file,"gen_server.erl"},{line,607}]},
{gen_server,handle_msg,5,
[{file,"gen_server.erl"},{line,639}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,237}]}]}
** exception exit: function_clause
in function sqlite3:build_constraints/1
called as sqlite3:build_constraints(["INTEGER","PRIMARY","KEY"])
in call from sqlite3:build_table_info/2 (src/sqlite3.erl, line 1166)
in call from sqlite3:handle_call/3 (src/sqlite3.erl, line 833)
in call from gen_server:try_handle_call/4 (gen_server.erl, line 607)
in call from gen_server:handle_msg/5 (gen_server.erl, line 639)
in call from proc_lib:init_p_do_apply/3 (proc_lib.erl, line 237)
Any ideas?
I've fixed the problem with INTEGER PRIMARY KEY. The default is harder to support, but I've added a fallback so it doesn't crash, at least. As #CL mentions, this parsing is unreliable anyway (since SQLite unfortunately doesn't expose any way to use its own parser).

Can´t set threshold in configuration file

Thus far I´ve managed to create a Log4Qt configuration file and load it with PropertyConfigurator. Everything seems to work fine, I can set loggers, appenders, assign levels etc.
The only thing that doesn´t work is setting a threshold for an appender.
This is how i set up my configuration file:
void createNewLoggerConfigurationFile(QString fileName)
{
QSettings settings(fileName, QSettings::IniFormat);
settings.setValue("log4j.appender.A1", "org.apache.log4j.FileAppender");
settings.setValue("log4j.appender.A1.file", "C:/Users/Fujitsu/Desktop/LogOutput.txt");
settings.setValue("log4j.appender.A1.layout", "org.apache.log4j.TTCCLayout");
settings.setValue("log4j.appender.A1.layout.DateFormat", "ISO8601");
settings.setValue("log4j.appender.ADataManager", "org.apache.log4j.FileAppender");
settings.setValue("log4j.appender.ADataManager.file", "C:/Users/Fujitsu/Desktop/DataManagerLogOutput.txt");
settings.setValue("log4j.appender.ADataManager.layout", "org.apache.log4j.TTCCLayout");
settings.setValue("log4j.appender.ADataManager.layout.DateFormat", "ISO8601");
settings.setValue("log4j.appender.ADataManager.threshold", "DEBUG");
settings.setValue("log4j.rootLogger", "ALL, A1");
settings.setValue("log4j.logger.DataManager", "ALL, ADataManager");
}
The resulting error message (from Log4Qt, I guess) reads as follows:
10 [] ERROR Log4Qt::Factory - Cannot convert to type 'Level' for property 'threshold' on object of class 'Log4Qt::FileAppender' (Log4Qt::Factory::CONFIGURATOR_UNKNOWN_TYPE_ERROR, 29)
Any ideas?

Resources