Skip to content

Uploading file to sharepoint online using .net standard 2.0 in Asp.net core 3.1 application #7433

@kinunga

Description

@kinunga

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

💥 SharePoint Framework

Developer environment

Windows

What browser(s) / client(s) have you tested

  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)

Additional environment details

  • browser version
  • SPFx version
  • Node.js version
  • etc

Describe the bug / error

I used CSOM for .NET Standard to upload a file on sharepoint in my web application (ASP.net core 3.1).
The upload is working well on my dev. environment (Windows/Visual studio 2019). But when i deploy my app on linux server (ubuntu). The upload doesn't working, it shows me this message error: Server relative urls must start with SPWeb.ServerRelativeUrl has anyone got an idea on why am I getting this error ?

Steps to reproduce

1.Using CSOM for .NET Standard to upload a file on Sharepoit in a Web application (ASP.net Core 3.1)
2.Test the upload on dev. Environment (Windows / Visual Studio 2019). In my case, this is working well
3.Deploy the app on linux server (ubuntu). The upload doesn't work, shows this message error: Server relative urls must start with SPWeb.ServerRelativeUrl

Expected behavior

File uploaded on sharepoint for both envirnoment (dev.environment "Windows / Visual Studio 2019" and on linux server "ubuntu")

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:csom/rest/apiCategory: SharePoint Client Side Object Model SDK / REST APItype:archive-old-issueIssues which are closed as tool old for active work

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions