stack72 / TeamCitySharp

No Longer Maintained - please use https://github.com/mavezeau/TeamCitySharp
Other
200 stars 165 forks source link

Can't create subprojects under a specific project. #105

Open disarisi opened 8 years ago

disarisi commented 8 years ago

Can't create subprojects under a specific project.

I can create subprojects using the UI under a specific project. But when i try to do it with TeamcitySharp it doesn't work.

It generates the following error:

EasyHttp.Infrastructure.HttpException was unhandled HResult=-2146233088 Message=Forbidden Error: Forbidden HTTP: Forbidden URL: http://teamcityServerUrl/httpAuth/app/rest/projects/ Error has occurred during request processing (Forbidden). Error: jetbrains.buildServer.serverSide.auth.AccessDeniedException: You do not have "Create subproject" permission in project with internal id: _Root Access denied. Check the user has enough permissions to perform the operation. Source=TeamCitySharp StatusDescription=Error: Forbidden HTTP: Forbidden URL: http://teamcityServerUrl/httpAuth/app/rest/projects/ Error has occurred during request processing (Forbidden). Error: jetbrains.buildServer.serverSide.auth.AccessDeniedException: You do not have "Create subproject" permission in project with internal id: _Root Access denied. Check the user has enough permissions to perform the operation. StackTrace: at TeamCitySharp.Connection.TeamCityCaller.ThrowIfHttpError(HttpResponse response, String url) in I:\work\workroom\tcClient1\ConsoleApplication1\TeamCitySharp-master\src\TeamCitySharp\Connection\TeamCityCaller.cs:line 236 at TeamCitySharp.Connection.TeamCityCaller.MakePostRequest(Object data, String contenttype, String urlPart, String accept) in I:\work\workroom\tcClient1\ConsoleApplication1\TeamCitySharp-master\src\TeamCitySharp\Connection\TeamCityCaller.cs:line 202 at TeamCitySharp.Connection.TeamCityCaller.Post(Object data, String contenttype, String urlPart, String accept) in I:\work\workroom\tcClient1\ConsoleApplication1\TeamCitySharp-master\src\TeamCitySharp\Connection\TeamCityCaller.cs:line 171 at TeamCitySharp.Connection.TeamCityCaller.Post[T](String data, String contenttype, String urlPart, String accept) in I:\work\workroom\tcClient1\ConsoleApplication1\TeamCitySharp-master\src\TeamCitySharp\Connection\TeamCityCaller.cs:line 149 at TeamCitySharp.ActionTypes.Projects.Create(String projectName) in I:\work\workroom\tcClient1\ConsoleApplication1\TeamCitySharp-master\src\TeamCitySharp\ActionTypes\Projects.cs:line 45 at ConsoleApplication1.Program.CreateBuildConfigs(String targetUrl, String targetUser, String targetPass, String projectName) in I:\work\workroom\tcClient1\ConsoleApplication1\ConsoleApplication1\Program.cs:line 33 at ConsoleApplication1.Program.Main(String[] args) in I:\work\workroom\tcClient1\ConsoleApplication1\ConsoleApplication1\Program.cs:line 24 at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() InnerException: