<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12
      代碼改變世界

      SharePoint System.Net.WebException:“遠程服務器返回錯誤: (414) REQUEST URI TOO LONG。”

      2024-12-26 20:35  四毛的家  閱讀(69)  評論(0)    收藏  舉報

      SharePoint CSOM執行下面代碼時報錯:

      string fileServerRelativeUrl = "/xxxx/2003249_98.RXE";

      using (var fileInfo = Microsoft.SharePoint.Client.File.OpenBinaryDirect(ctxOriginal, fileServerRelativeUrl))
      using (var reader = new StreamReader(fileInfo.Stream))
      {
          Microsoft.SharePoint.Client.File.SaveBinaryDirect(
          //Client Context
          ctxTarget,
          // Server relative url of the document
          //listTarget.RootFolder.ServerRelativeUrl + file.ServerRelativeUrl.Replace(libraryServerRelativeUrlOriginal,""),//新路徑
          fileServerRelativeUrlTarget,
          // Content of the file
          reader.BaseStream,
          // Overwrite file if it's already exist
          true);
          ctxTarget.ExecuteQuery();
      }

       

      報:

      嘗試修改web.config如下

      在Web.config文件中添加以下配置。

      1. <system.web>
      2. <httpRuntime maxRequestLength="102400" maxQueryStringLength="102400"/>
      3. </system.web>
      1. <system.webServer>
      2. <security>
      3. <requestFiltering>
      4. <requestLimits maxAllowedContentLength="102400" maxQueryString="102400" />
      5. </requestFiltering>
      6. </security>
      7. </system.webServer>

      未能解決。

      經過各種嘗試,一篇來自stackoverflow的帖子提醒了我,

      “It was a permission problem. The IIS user did not have read-rights to the folder. Changed to use application pool identity instead and now its working.”

      我的賬號權限足夠。經過查詢原來是SharePoint管理中心設置“被禁止的文件類型”導致的。讀取的文件是Rxe類型,被禁止了。

       

      參考:

      https://blog.csdn.net/qq_38974638/article/details/108500973

      https://stackoverflow.com/questions/46190612/the-page-was-not-displayed-because-the-request-uri-is-too-long

      ----------------------------------------------------

      • 文字少的博文不允許投稿到該網站分類 (以下內容跟本文主題無關)

      ---------------------------------------------------------

      https://learn.microsoft.com/en-us/answers/questions/636509/csom-how-to-copy-a-document-from-one-document-libr

      CSOM: How to copy a document from one document library to another documents library?

       

      I have a requirement to copy documents that meets a certain criteria ( i.e once a document's approval status = approved) to an Archived documents library. I am looping through all the sites and using CAML query to filter out the documents with approved status but I have no idea how to copy the document to a different library location using CSOM C# after checking this condition. Also, I need the document to be replaced in case it is already present in the archived library.

      Note: The archived library is in a different site collection.

      Any help is greatly appreciated. Thank you in advance.

      var bookname = item.DisplayName;  
      string bookLocation = $"{rootFolder.ServerRelativeUrl}/{bookname}";                                  
      var absoluteUrl = new Uri(ctx.Url).GetLeftPart(UriPartial.Authority) + bookLocation;  
      var srcUrl = absoluteUrl;  
      var destUrl = "https://abc.sharepoint.com/sites/Archive";  
      var srcLibrary = "Documents";  
      var destLibrary = "Records";  
      
      ClientContext destContext = new ClientContext(destUrl);  
      ClientContext srcContext = new ClientContext(srcUrl);  
      destContext.Credentials = SPAuth.GetSPOnlineCredentials();  
      srcContext.Credentials = SPAuth.GetSPOnlineCredentials();                                 
      Web srcWeb = srcContext.Web;  
      List srcList = srcWeb.Lists.GetByTitle(srcLibrary);                                 
      Web destWeb = destContext.Web;  
      destContext.Load(destWeb);  
      
      destContext.ExecuteQuery();  
      try  
      {  
          Microsoft.SharePoint.Client.File file1 = srcContext.Web.GetFileByServerRelativeUrl(bookLocation);  
          srcContext.Load(file1);  
          srcContext.ExecuteQuery();  
          string location = destWeb.ServerRelativeUrl.TrimEnd('/') + "/" + destLibrary.Replace(" ", "") + "/" + file1.Name;  
          FileInformation fileInfo = Microsoft.SharePoint.Client.File.OpenBinaryDirect(srcContext, file1.ServerRelativeUrl);  
          Microsoft.SharePoint.Client.File.SaveBinaryDirect(destContext, location, fileInfo.Stream, true);  
      }  
      
      catch (Exception ex)  
      {  
          telemetry.TrackException(new Exception("Failed to copy the book to archive library", ex));  
      }                                

      文-字-少-的-博-文-不-允-許-投-稿-到-該-網-站-分-類,真*惡*心

      文-字-少-的-博-文-不-允-許-投-稿-到-該-網-站-分-類,真*惡*心

      文-字-少-的-博-文-不-允-許-投-稿-到-該-網-站-分-類,真*惡*心

      文-字-少-的-博-文-不-允-許-投-稿-到-該-網-站-分-類,真*惡*心文-字-少-的-博-文-不-允-許-投-稿-到-該-網-站-分-類,真*惡*心

      文-字-少-的-博-文-不-允-許-投-稿-到-該-網-站-分-類,真*惡*心

      文-字-少-的-博-文-不-允-許-投-稿-到-該-網-站-分-類,真*惡*心

      文-字-少-的-博-文-不-允-許-投-稿-到-該-網-站-分-類,真*惡*心

      文-字-少-的-博-文-不-允-許-投-稿-到-該-網-站-分-類,真*惡*心

      文-字-少-的-博-文-不-允-許-投-稿-到-該-網-站-分-類,真*惡*心

      文-字-少-的-博-文-不-允-許-投-稿-到-該-網-站-分-類,真*惡*心

      文-字-少-的-博-文-不-允-許-投-稿-到-該-網-站-分-類,真*惡*心

      文-字-少-的-博-文-不-允-許-投-稿-到-該-網-站-分-類,真*惡*心

      文-字-少-的-博-文-不-允-許-投-稿-到-該-網-站-分-類,真*惡*心

      文-字-少-的-博-文-不-允-許-投-稿-到-該-網-站-分-類,真*惡*心

      主站蜘蛛池模板: 高清无码18| 99re6在线视频精品免费下载| 日本三级香港三级三级人妇久 | 亚洲男人的天堂久久香蕉| 视频一区视频二区在线视频| 午夜人成免费视频| 亚洲一区二区三区十八禁| 又爽又黄又无遮掩的免费视频| 国产高清色高清在线观看| 亚洲成色av网站午夜影视| 成人嫩草研究院久久久精品| 国产h视频在线观看| 耒阳市| 精品精品国产国产自在线| 亚洲欧美日韩在线码| 色AV专区无码影音先锋| 久久国产精品伊人青青草| 日本中文字幕不卡在线一区二区| 制服丝袜人妻有码无码中文字幕| 临泉县| 亚洲人妻精品一区二区| 免费观看日本污污ww网站69| 人妻少妇不满足中文字幕| 97久久久亚洲综合久久| 久久婷婷成人综合色| 国产精品一级久久黄色片| 国产美女被遭强高潮免费一视频| 亚洲色大成网站WWW尤物| 免费无遮挡无码视频网站| 国产高清精品在线91| 一个色综合亚洲热色综合| 亚洲中文字幕日产无码成人片| 中文字幕日韩有码国产| 四虎女优在线视频免费看| 国产AV影片麻豆精品传媒| 少妇人妻av毛片在线看| 亚洲人妻av伦理| 少妇人妻偷人精品系列| 亚洲香蕉伊综合在人在线| 中文字幕少妇人妻精品| 男女猛烈激情xx00免费视频|