Skip to main content
replaced http://sharepoint.stackexchange.com/ with https://sharepoint.stackexchange.com/
Source Link

It could be a problem of SPUtility.GetFullUrl not being able to work with layouts URLs (since they are shared between all sites in your farm, and not site specific)

Try if

string fullPath=SPUtility.ConcatUrls(SPContext.Current.Site.Url, webUrl)

works better.

Don't really now why you are trying to get a file from the virtual directory layouts though! Check for example here of how to read from this directory: How to read a file from a folder in _Layouts?How to read a file from a folder in _Layouts?

If possible, you should consider to deploy the file into a library in SharePoint instead. That way you could do CRUD on it just like any other file in SharePoint

It could be a problem of SPUtility.GetFullUrl not being able to work with layouts URLs (since they are shared between all sites in your farm, and not site specific)

Try if

string fullPath=SPUtility.ConcatUrls(SPContext.Current.Site.Url, webUrl)

works better.

Don't really now why you are trying to get a file from the virtual directory layouts though! Check for example here of how to read from this directory: How to read a file from a folder in _Layouts?

If possible, you should consider to deploy the file into a library in SharePoint instead. That way you could do CRUD on it just like any other file in SharePoint

It could be a problem of SPUtility.GetFullUrl not being able to work with layouts URLs (since they are shared between all sites in your farm, and not site specific)

Try if

string fullPath=SPUtility.ConcatUrls(SPContext.Current.Site.Url, webUrl)

works better.

Don't really now why you are trying to get a file from the virtual directory layouts though! Check for example here of how to read from this directory: How to read a file from a folder in _Layouts?

If possible, you should consider to deploy the file into a library in SharePoint instead. That way you could do CRUD on it just like any other file in SharePoint

deleted 1 character in body
Source Link
Robert Lindgren
  • 24.5k
  • 12
  • 53
  • 79

It could be a problem of SPUtility.GetFullUrl not being able to work with layouts URLs (since they are shared between all sites in your farm, and not site specific)

Try if

string fullPath=SPUtility.CombineUrlConcatUrls(SPContext.Current.Site.Url, webUrl)

works better.

Don't really now why you are trying to get a file from the virtual directory layouts though! Check for example here of how to read from this directory: How to read a file from a folder in _Layouts?

If possible, you should consider to deploy the file into a library in SharePoint instead. That way you could do CRUD on it just like any other file in SharePoint

It could be a problem of SPUtility.GetFullUrl not being able to work with layouts URLs (since they are shared between all sites in your farm, and not site specific)

Try if

string fullPath=SPUtility.CombineUrl(SPContext.Current.Site.Url, webUrl)

works better.

Don't really now why you are trying to get a file from the virtual directory layouts though! Check for example here of how to read from this directory: How to read a file from a folder in _Layouts?

If possible, you should consider to deploy the file into a library in SharePoint instead. That way you could do CRUD on it just like any other file in SharePoint

It could be a problem of SPUtility.GetFullUrl not being able to work with layouts URLs (since they are shared between all sites in your farm, and not site specific)

Try if

string fullPath=SPUtility.ConcatUrls(SPContext.Current.Site.Url, webUrl)

works better.

Don't really now why you are trying to get a file from the virtual directory layouts though! Check for example here of how to read from this directory: How to read a file from a folder in _Layouts?

If possible, you should consider to deploy the file into a library in SharePoint instead. That way you could do CRUD on it just like any other file in SharePoint

Source Link
Robert Lindgren
  • 24.5k
  • 12
  • 53
  • 79

It could be a problem of SPUtility.GetFullUrl not being able to work with layouts URLs (since they are shared between all sites in your farm, and not site specific)

Try if

string fullPath=SPUtility.CombineUrl(SPContext.Current.Site.Url, webUrl)

works better.

Don't really now why you are trying to get a file from the virtual directory layouts though! Check for example here of how to read from this directory: How to read a file from a folder in _Layouts?

If possible, you should consider to deploy the file into a library in SharePoint instead. That way you could do CRUD on it just like any other file in SharePoint