OneNote page exist but resource link from OneNote API is expired - office365api

I'm build OneNote add-in and I need some export feature.
From my search, I found only I could use is OneNote API with preAuthenticate param.
It gave me html content and I confirmed it rendered properly with images within in browser. But after a few mins, resource links giving below error and I have to re-fetch content html with above API.
{
#api.url: "http://aka.ms/onenote-errors#C20130",
code: "20130",
message: "No HTTP resource was found that matches the request URI Resource not found, perhaps the public link has expired. Try a new public page content call.."
}
So, my question is
Is there any way to get html content of OneNote page without resource expiration?
Is there any add-in or OneNote API to export OneNote page as pdf file?
Thanks in advance!

No - you'd have to download the image, upload it somewhere else, and reference it from there
Unfortunately, also no. We only expose HTML, so you'd need to convert the HTML returned to PDF

Related

Access to a PDF File in a http with dinamyc variables

Hello everyone (sorry for bad English), i'm getting crazy with this problem... i'm working on a project with NiFi expecting to download PDF files from a public Goverment page. The main problem it's that the page you request in a web browser shows the correct page like this
Asking the same page in NiFi (also testing in postman) shows that the session has expire, then looking at the HTTPS POST with the development tools in chrome i notice that there are multiple headers that contain dynamic variables
Is there any form to replicate web browser behaviour on NiFi?

All Invalid Random Paths in the URL Return The Normal Web Page Instead of 404 Not Found Page

I have a website:
https://www.includekarabuk.com
For instance this url contains an article:
https://www.includekarabuk.com/kategoriler/genel/Siber-Guvenlikte-Dusuk-Seviye-Aciklik-Nedir.php
But when I add invalid path to the existing url, page is still being showed.
https://www.includekarabuk.com/kategoriler/genel/Siber-Guvenlikte-Dusuk-Seviye-Aciklik-Nedir.php/test123343242314321423423423/
https://www.includekarabuk.com/kategoriler/genel/Siber-Guvenlikte-Dusuk-Seviye-Aciklik-Nedir.php/sdfdsfdsfsdfdsfsdfsdfsdfsdsdfdsfsdfd/
https://www.includekarabuk.com/kategoriler/genel/Siber-Guvenlikte-Dusuk-Seviye-Aciklik-Nedir.php/132432432/
But because css and javascript file locations will be invalid due to added extra path, page is displayed as broken.
I want to stop this. When the web server receives invalid path as with above, it should respond as 404 not found page coming from web server. How can I do that? I am using Apache web server and php scripting language.
Note: I am not using any MVC framework.

How can I block certain urls from my website

In my website, I load some files and for example one of them is index.js
If I type in google https://mywebsite.com/index.js and then it shows the code of that javascript file.
How can I block this kind of actions and for example show a 404 page?
Thanks

How to upload a page to web and shows the page when url is given in browser?

I have designed a page using photoshop and illustrator for my product.Actually its the first page of our website, construction is not over yet.But I want to upload that one page to web now just for publicity.The thing is that i want to get that page open when the user types url in browser.
So, What i have to do to upload page to web and shows my page whenever the url is written in browser??Please help...
Is your page still in an image format or have you converted it to HTML?
If you have converted to HTML, upload it to your server and give the link of the HTML to users to check out the page.
It's not clear what your problem is but:
Register a domain with a provider
Name your html file index.html and upload it to the root folder of your web space.

MVC .Net Redirect to remote unhosted html file

I am trying to redirect to an unhosted html file in an MVC action. The page returns with corrupted content error. I am trying to redirect like this:
return Redirect("file:///C:/test/mytestfile.html");
This of course works fine if the file is on a web server:
return Redirect("http://myserver/mytestfile.html");
Is it even possible to use the file protocol when redirecting in MVC? I've also tried:
return new RedirectResult("file:///C:/test/mytestfile.html");
and
Response.Redirect("file:///C:/test/mytestfile.html");
The project I'm doing this in is a bridge solution to overcome some shortcomings in a vendor solution, so unfortunately I can't just move the target files to web server. I really need to redirect to the file on the share where it lives.
This is not supported and is not a limitation of ASP.NET MVC, it is how web browsers work. You cannot redirect to the file:/// protocol if the web application is hosted on a web server (http://). You can only redirect to file:/// if the page that is redirecting is also hosted on file:///.
More info on the subject can be found here and the rules are defined here.
You could possibly have the website do a file read on the HTML file and then output the file to the page. This might be a start. You would end up with a wrapper "page" on your site that mirrored the remote HTML file.

Resources