0

I have a simple static HTML web page that had its extension renamed from HTML to ASPX, in order for it to be viewable via SharePoint, OneDrive or Teams.

This is the HTML test file I used:

<!DOCTYPE html>
<html>
<body>
<h1>This is a Heading</h1>
<p>This is a paragraph.</p>
<p>This is a paragraph <br> with a line break.</p>
<img src="https://picsum.photos/1000" alt="Sample Image">
</body>
</html>

In Windows, viewing this HTML file as ASPX page works fine when opened from OneDrive, from SharePoint or from Teams, both when opening the file directly, or when using one of the two links #1 or #2 below.

However, when shared via OneDrive, the second link #2 does not work on Android. It produces the error message "Operation is not valid due to the current state of the object":

Operation is not valid due to the current state of the object

Only link #2 from SharePoint is displayed correctly in Android, for example pinned as a tab in Teams, or directly in a browser. While theoretically I could use link #2, for organizational reasons it is important to use link #1 from OneDrive instead.

(the links are highlighted with different colors to make it easier to see the structure of the links)

Link structure with color-coding

What could be the reason that link #1 works everywhere except on Android, and how can I get that ASPX file to also work on Android?

1 Answer 1

0

I faced similar error before, I don't remember exactly how I sove it,

I believe that the aspx page generated from a SharePoint Shared link and enhanced in Link#1 won't work because it will generate some parts that are not supported in Android (just an Hypothesis),

Meanwhile, what I have done, I recreated the link for the file in OneDrive, it will give you the same link but the page should get rid of the aspx parts that are not supported in Android (specially if you Android version is old),

I created a simple static HTML web page that had its extension renamed from HTML to ASPX. It works fine even for iOS

Best regards.

1
  • Yes that's right, but note that I already created the link from OneDrive, not SharePoint. Nonetheless, the OneDrive link does not work in Android.
    – David.P
    Commented Nov 21, 2022 at 13:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.