I am attempting to open the iframe in my sharepoint provider hosted app as a modal using a MVC razor view. When I open the app I get a 0x80070005 - JavaScript runtime error: Access is denied. in sp.ui.dialog.js and my js scripts are never loaded but the html displays in the modal. When I use the same code with the HostWebDialog set to false so it opens its own page, everything loads correctly. It also loads correctly as a modal if I put my view into an aspx page instead a razor view.

I have looked at




which seemed to be my issue at first, but debugging my code is showing that the access denied error is occurring when the modal is called and before any of my code is run.

If anyone has an idea as to why this is failing in razor but not in the aspx page, I would appreciate it.

Edit: This is happening when its run in IE10 which is a requirement. When I run the app in chrome I do not get the access denied error, but my scripts still do not load

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.