I'm trying to pull a JSON file from sharepoint and importing it into Oracle. When I put the JSON file in my C Drive and use this file path C:\json\jsonfile.json it loads perfectly. When I switch to my Sharepoint path it does not upload.
Here is the script I am using. Any ideas on how to get it to pull from sharepoint? Works perfectly when the file is on my c drive but not when I use my sharepoint file path.
String jsonFileContent = File.ReadAllText(@"\\sharepoint.site.gov\sites\pagename\folder\jsonfilen.json");
JavaScriptSerializer js = new JavaScriptSerializer();
js.MaxJsonLength = Int32.MaxValue;
List<Data> datas = js.Deserialize<List<Data>>(jsonFileContent);
foreach(Data data in datas)
Here is the error message that I get:
"A Device attached to the system is not functioning."
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, >Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost) at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost) at System.IO.File.ReadAllText(String path) at ScriptMain.CreateNewOutputRows() at UserComponent.PrimeOutput(Int32 Outputs, Int32[] OutputIDs, PipelineBuffer[] Buffers, OutputNameMap OutputMap) at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.PrimeOutput(Int32 outputs, Int32[] outputIDs, PipelineBuffer[] buffers)