none
Error al cargar archivo a biblioteca - Web Service RRS feed

  • Pregunta

  • Tengo el siguiente error:

     Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Net.WebException: The request failed with the error message:
    --
    <html><head><title>Object moved</title></head><body>
    <h2>Object moved to <a href="%2flogin.aspx%3fReturnUrl%3d%252f_vti_bin%252fcopy.asmx">here</a>.</h2>
    </body></html>

    --.

    Server Error in '/' Application.

    The request failed with the error message:
    --
    <html><head><title>Object moved</title></head><body>
    <h2>Object moved to <a href="%2flogin.aspx%3fReturnUrl%3d%252f_vti_bin%252fcopy.asmx">here</a>.</h2>
    </body></html>

    --.

     

    El mismo se genera al implementar una webpart que tiene como parte de código el siguiente (el error salta cuando hace la penultima sentencia)

    using

     

    (DownloadSharePointDocument.Copy copyService = new DownloadSharePointDocument.Copy

     

    @"http://www...com.ar/_vti_bin/copy.asmx"

     

     

    string[] DestinationUrl = { "http://www...com.ar/Biblioteca%20HTML/"

     

    string strSource = @"C:\Users\cry\Desktop\Informa100.html"

     

    CopyResult FirstResult = new DownloadSharePointDocument.CopyResult

     

    CopyResult SecondResult = new DownloadSharePointDocument.CopyResult

     

    CopyResult

     

    FieldInformation fFiledInfo = new DownloadSharePointDocument.FieldInformation

     

    "Description"

     

    FieldType

     

    "This is the test description"

     

    FieldInformation

     

    FileStream objStream = new FileStream(strSource, FileMode.Open, FileAccess

     

    byte[] Contents = new Byte

     

    byte[] r = new Byte

     

    int Read = objStream.Read(Contents, 0, Convert

     

     

     

    uint copyresult = copyService.CopyIntoItems(strSource, DestinationUrl, fFiledInfoArray, Contents, out

     

    saben que es lo q esta mal? segui el error, lo busque en internet pero ninguna solucion aún tengo!

     

     

    ArrayOfResult);

     

    TextBox1.Text = copyresult.ToString();

    }

     

     

    .ToInt32(objStream.Length));

    objStream.Close();

     

    [objStream.Length];

     

     

    [objStream.Length];

     

     

    .Read);

     

     

    [] fFiledInfoArray = { fFiledInfo };

     

     

    ;

    DownloadSharePointDocument.

     

    .Text;

    fFiledInfo.Value =

     

    ;

    fFiledInfo.Type = DownloadSharePointDocument.

     

    ();

    fFiledInfo.DisplayName =

     

    [] ArrayOfResult = { FirstResult, SecondResult };

    DownloadSharePointDocument.

     

    ();

    DownloadSharePointDocument.

     

    ();

    DownloadSharePointDocument.

     

    ;

    DownloadSharePointDocument.

     

    };

     

     

    ;

    ())

     

    {

    copyService.Url =

    • Editado ce_ lunes, 21 de noviembre de 2011 19:05
    lunes, 21 de noviembre de 2011 19:04

Todas las respuestas