Meyer Denney
Meyer Denney

Reputation: 846

401 Unauthorized error when trying to access schema

I am getting a 401 Unauthorized error when trying to import a schema.

<xsd:import namespace="http://niem.gov/niem/structures/2.0" schemaLocation="http://yak/NSI_FCS_Bin/niem-constrained/structures/2.0/structures.xsd"/>

I have uploaded the schema and the correct folder structure using a module. However, when the parent schema tries to import this schema (and all others) I get a 401 Unauthorized error. But if I type the exact same url into a web browser, I can view/download the file just fine. I made sure that I was logged into my sharepoint site before executing the code. Anyone have any ideas?

Upvotes: 1

Views: 1115

Answers (1)

Meyer Denney
Meyer Denney

Reputation: 846

One work around for this problem is to add the schemas to your Template\Layouts folder and call the schema from there. I am still unsure why I was getting the unauthorized errors, but I did not get those errors when calling the schemas from the Template\Layouts folder. Hope this helps!

Upvotes: 1

Related Questions