Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi all,
I am working on automatization of some administrative tasks like creating folders for users that want to have their own space on premise server and specifying appropriate permissions on the folder. Using PowerShell scripts $Proxy.CreateFolder($FolderName, $RsFolder, $null) | Out-Null.
This script works only if I am creating folders on the root of the server ($RsFolder = '/')
If I want to create a folder as a sub folder of another folder this script does not work. ($RsFolder = '/USERS/' $FolderName='John'). USERS folder exists on the root of the server.
I am getting following error:
Exception occurred while creating folder! Exception calling "CreateFolder" with "3" argument(s):
"System.Web.Services.Protocols.SoapException: The path of the item '/USERS/' is not valid. The full path must be less than
260 characters long; other restrictions apply. If the report server is in native mode, the path must start with slash. --->
Microsoft.ReportingServices.Diagnostics.Utilities.InvalidItemPathException: The path of the item '/USERS/' is not valid.
The full path must be less than 260 characters long; other restrictions apply. If the report server is in native mode, the
path must start with slash.
at Microsoft.ReportingServices.Library.ReportingService2010Impl.CreateFolder(String Folder, String Parent, Property[]
Properties, CatalogItem& ItemInfo)
at Microsoft.ReportingServices.WebServer.ReportingService2010.CreateFolder(String Folder, String Parent, Property[]
Properties, CatalogItem& ItemInfo)"
At C:\PowerBI\Tools\ReportingServicesTools-master\ReportingServicesTools\Functions\CatalogItems\New-RsFolder.ps1:88 char:13
+ throw (New-Object System.Exception("Exception occurred while creatin ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (:) [], Exception
+ FullyQualifiedErrorId : Exception occurred while creating folder! Exception calling "CreateFolder" with "3" argument(
s): "System.Web.Services.Protocols.SoapException: The path of the item '/USERS/' is not valid. The full path must be le
ss than 260 characters long; other restrictions apply. If the report server is in native mode, the path must start with
slash. ---> Microsoft.ReportingServices.Diagnostics.Utilities.InvalidItemPathException: The path of the item '/USERS/'
is not valid. The full path must be less than 260 characters long; other restrictions apply. If the report server is i
n native mode, the path must start with slash.
at Microsoft.ReportingServices.Library.ReportingService2010Impl.CreateFolder(String Folder, String Parent, Property[
] Properties, CatalogItem& ItemInfo)
at Microsoft.ReportingServices.WebServer.ReportingService2010.CreateFolder(String Folder, String Parent, Property[]
Properties, CatalogItem& ItemInfo)"
Any idea why?
thanks in advance
Dejan
Solved! Go to Solution.
Are you using /users for the Path parameter (without the slash at the end)?
We have a unit tests that validates that scenario , you can use it as a example (check the test Context "Create a subfolder")
Are you using /users for the Path parameter (without the slash at the end)?
We have a unit tests that validates that scenario , you can use it as a example (check the test Context "Create a subfolder")
Thanks jtarquino,
i was assigning '/' programaticaly to the end of the path in my code - that was the reason it didn't work for me.
Regards
Dejan
@mgmeyer@jtarquino Do you have ideas about this issue? I don't have much knowledge about developer section.
Best Regards,
Qiuyun Yu
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
6 | |
4 | |
3 | |
3 |
User | Count |
---|---|
15 | |
9 | |
6 | |
3 | |
3 |