Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 183671

when trying to upload an iso file, getting Internal Server Error 500 in debug

$
0
0

Hi

 

I am trying to upload a media to the cloud using the UploadMedia when method is called, it gives error 500 internal server error. Can someone help me and let me know what is wrong that i am doing.

 

using ASP.NET 4.0 with vCloud API. As of now i am just providing the path of the file statically.

 

My Code:

 

        string medianame = null;

        string mediaDesc = null;
        ImageType imType = new ImageType();
        imType = ImageType.ISO;
        string localMediaFile = null;
        ReferenceType vdcStorageProfileRef = null;
        ReferenceType catalogRef = null;
        Media media = null;
        Vdc vdc = null;
        medianame = TextBox1.Text;
        mediaDesc = TextBox2.Text;
        localMediaFile = "C:\\Users\\dsukhiya\\Desktop\\Test.iso";
        System.Windows.Forms.MessageBox.Show(localMediaFile);
        vdc = ImpCalls.getVdc(DropDownList1.SelectedValue);
        vdcStorageProfileRef = ImpCalls.getVdcStorageProfileRef(vdc.Reference.name, DropDownList3.SelectedValue);
        catalogRef = ImpCalls.getCatalogRef(DropDownList2.SelectedValue);
        media = vdc.UploadMedia(medianame, mediaDesc, imType, localMediaFile, vdcStorageProfileRef, catalogRef);

 

Debug log:

 

ClientAppTrace Information: 0 : POST URL - https://10.109.0.121/api/catalog/e3fe1fe5-f8c9-4d35-8bc2-02adf8bbf96d/catalogItems

ClientAppTrace Information: 0 : POST Request Body - <?xml version="1.0" encoding="utf-8"?><CatalogItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="yrt" xmlns="http://www.vmware.com/vcloud/v1.5"><Entity href="https://10.109.0.121/api/media/81bce382-ec9f-4585-b6fb-cb9474cb6328" id="urn:vcloud:media:81bce382-ec9f-4585-b6fb-cb9474cb6328" type="application/vnd.vmware.vcloud.media+xml" name="yrt" /></CatalogItem>

ClientAppTrace Information: 0 : POST Request Content Type - application/vnd.vmware.vcloud.catalogItem+xml

ClientAppTrace Information: 0 : Status Code - 201

ClientAppTrace Information: 0 : Status - Created

ClientAppTrace Information: 0 : Response - <?xml version="1.0" encoding="UTF-8"?>

<CatalogItem xmlns="http://www.vmware.com/vcloud/v1.5" name="yrt" id="urn:vcloud:catalogitem:144f2205-3c48-45d6-a7e1-405386bc1e24" type="application/vnd.vmware.vcloud.catalogItem+xml" href="https://10.109.0.121/api/catalogItem/144f2205-3c48-45d6-a7e1-405386bc1e24" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5http://10.109.0.121/api/v1.5/schema/master.xsd">

    <Link rel="up" type="application/vnd.vmware.vcloud.catalog+xml" href="https://10.109.0.121/api/catalog/e3fe1fe5-f8c9-4d35-8bc2-02adf8bbf96d"/>

    <Link rel="down" type="application/vnd.vmware.vcloud.metadata+xml" href="https://10.109.0.121/api/catalogItem/144f2205-3c48-45d6-a7e1-405386bc1e24/metadata"/>

    <Link rel="edit" type="application/vnd.vmware.vcloud.catalogItem+xml" href="https://10.109.0.121/api/catalogItem/144f2205-3c48-45d6-a7e1-405386bc1e24"/>

    <Link rel="remove" href="https://10.109.0.121/api/catalogItem/144f2205-3c48-45d6-a7e1-405386bc1e24"/>

    <Entity type="application/vnd.vmware.vcloud.media+xml" name="yrt" href="https://10.109.0.121/api/media/81bce382-ec9f-4585-b6fb-cb9474cb6328"/>

</CatalogItem>

 

ClientAppTrace Information: 0 : GET URL - https://10.109.0.121/api/media/81bce382-ec9f-4585-b6fb-cb9474cb6328

ClientAppTrace Information: 0 : GET URL - https://10.109.0.121/api/media/81bce382-ec9f-4585-b6fb-cb9474cb6328

ClientAppTrace Information: 0 : GET URL - https://10.109.0.121/api/media/81bce382-ec9f-4585-b6fb-cb9474cb6328

ClientAppTrace Information: 0 : Status Code - 200

ClientAppTrace Information: 0 : Status - OK

ClientAppTrace Information: 0 : Response - <?xml version="1.0" encoding="UTF-8"?>

<Media xmlns="http://www.vmware.com/vcloud/v1.5" size="65536" imageType="iso" status="-1" name="yrt" id="urn:vcloud:media:81bce382-ec9f-4585-b6fb-cb9474cb6328" type="application/vnd.vmware.vcloud.media+xml" href="https://10.109.0.121/api/media/81bce382-ec9f-4585-b6fb-cb9474cb6328" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5http://10.109.0.121/api/v1.5/schema/master.xsd">

    <Link rel="up" type="application/vnd.vmware.vcloud.vdc+xml" href="https://10.109.0.121/api/vdc/c9e821e0-d878-4cd1-af8f-c3b7f5786a1b"/>

    <Link rel="remove" href="https://10.109.0.121/api/media/81bce382-ec9f-4585-b6fb-cb9474cb6328"/>

    <Description>yr</Description>

    <Tasks>

        <Task status="error" startTime="2013-03-26T02:33:44.217-07:00" serviceNamespace="com.vmware.vcloud" operationName="vdcUploadMedia" operation="Imported Media File yrt(81bce382-ec9f-4585-b6fb-cb9474cb6328)" expiryTime="2013-06-24T02:33:44.217-07:00" endTime="2013-03-26T02:33:46.543-07:00" cancelRequested="false" name="task" id="urn:vcloud:task:dffe0103-6dde-4060-9301-2156902fd866" type="application/vnd.vmware.vcloud.task+xml" href="https://10.109.0.121/api/task/dffe0103-6dde-4060-9301-2156902fd866">

            <Owner type="application/vnd.vmware.vcloud.media+xml" name="yrt" href="https://10.109.0.121/api/media/81bce382-ec9f-4585-b6fb-cb9474cb6328"/>

            <Error minorErrorCode="INTERNAL_SERVER_ERROR" message="Internal Server Error" majorErrorCode="500"/>

            <User type="application/vnd.vmware.admin.user+xml" name="admin" href="https://10.109.0.121/api/admin/user/b2d8dfc4-2fdc-499d-b749-cc77f74d7931"/>

            <Organization type="application/vnd.vmware.vcloud.org+xml" name="BITS" href="https://10.109.0.121/api/org/e0fa8a56-ac5b-45df-a23e-bee975e56edc"/>

            <Progress>100</Progress>

            <Details>  Internal Server Error</Details>

        </Task>

    </Tasks>

    <Owner type="application/vnd.vmware.vcloud.owner+xml">

        <User type="application/vnd.vmware.admin.user+xml" name="admin" href="https://10.109.0.121/api/admin/user/b2d8dfc4-2fdc-499d-b749-cc77f74d7931"/>

    </Owner>

    <VdcStorageProfile type="application/vnd.vmware.vcloud.vdcStorageProfile+xml" name="*" href="https://10.109.0.121/api/vdcStorageProfile/092ed047-3848-4a0b-83f2-db25c59f1db5"/>

</Media>

 

 

Any help will be great.

Regards
Deepak


Viewing all articles
Browse latest Browse all 183671

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>