Uploading file to onprem Sharepoint hangs in WPF .net 6 application
Open
@jansenbe is already working on this.
Since Mar 17, 2022.
area: other 🎁
question
- Dominant language
- C#
- Stars
- 259
- Forks
- 161
- Avg merge
- 10h 33m
- Merged PRs (30d)
- 1
Description
'ello
The following code just hangs on the ExecuteQuery() - it does not thows an error, it just never returns.
The exact same code works fine in a WinForms .net 6 application
` public partial class App : Application
{
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
var filePath = @"C:\temp\raw Material Receipts\RMR_20220224062549.pdf";
var fs = new FileStream(filePath, FileMode.Open);
var x1 = new AuthenticationManager();
var ctx = x1.GetOnPremisesContext("https://docs.namibmills.com.na/");
var lib = ctx.Web.Lists.GetByTitle("Raw Material Receipts");
var newFileInfo = new FileCreationInformation
{
ContentStream = fs,
Url = $"{Path.GetFileName(filePath)}",
Overwrite = true
};
var file = lib.RootFolder.Files.Add(newFileInfo);
ctx.Load(file);
ctx.ExecuteQuery();
}
}`
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.