Project

General

Profile

Server Error 500 while PUTting a Project

Added by Karsten Heimer over 3 years ago

Hello,

i get an internal server error while trying to put a project. What do i wrong?

This is the XML:

<?xml version=\"1.0\" encoding=\"UTF-8\"?>
 <project>
 <id>2</id>
 <name>Demoprojekt 2</name>
 <description>Das ist die Beschreibung.</description>
 <homepage>https://www.somewhere.de</homepage>
</project>

This ist the Target-URL:

http://kheimer.m.redmine.org/projects/2.xml

This is the C#-Codesnippet

byte[] byteArray = Encoding.UTF8.GetBytes(xml); // Convert XML To Bytearray
MemoryStream stream = new MemoryStream(byteArray); // Convert Bytearray to Memorystream
StreamContent content_xml = new StreamContent(stream); // Convert Memorystream to StreamContent

HttpResponseMessage response = await client.PutAsync(targeturl, content_xml); // Send StreamContent to TargetUrl (Client has a Header with X-Redmine-API-Key)
HttpContent content = response.Content;

string retValue = await content.ReadAsStringAsync();         


Replies (3)

RE: Server Error 500 while PUTting a Project - Added by Karsten Heimer over 3 years ago

No one any idea?

How can i get more detailled info from "500 - Internal Server Error"?

RE: Server Error 500 while PUTting a Project - Added by Go MAEDA over 3 years ago

Probably you can find error messages in log/production.log file.

Maybe someone can help you if you paste the error here.

RE: Server Error 500 while PUTting a Project - Added by Karsten Heimer over 3 years ago

Hello,

thank you for your answer. Unfortunately, i am working with the demoenvironment of redmine und this is why i don't have access to "log/production.log". The error himself is just "500 - Internal Server Error". The complete response contains only the general advice to contact my admin :-) not very helpful in this case...

I think, there is something wrong in my xmlfile, but i'm not sure.

Greetings.

    (1-3/3)