Re: Put document and FileName
- From: Mike Walsh <englantilainen@xxxxxxxxxxx>
- Date: Fri, 11 Apr 2008 19:11:58 +0300
You are still not in the Programming newsgroup.
If you want to write in Spanish, post SharePoint questions to microsoft.public.es.sharepoint. (I hope that is the correct name)
Mike Walsh
Berrocoso wrote:
On 11 abr, 14:19, Mike Walsh <englantilai...@xxxxxxxxxxx> wrote:.Post programming questions instead to the Programming newsgroup at
microsoft.public.sharepoint.development_and_programming
which is where the programming experts are.
Say there that you are using WSS 2.0 (rather than "sharepoint 2003"
which could also mean SPS 2003.
Mike Walsh
WSS FAQhttp://www.wssv3faq.com/http://wss.collutions.com
no private e-mail questions please
Berrocoso wrote:Hello,- Mostrar texto de la cita -
I'm using a .net Framework 2.0 application for upload document with
sharepoint 2003 "Put Document" method. The problem is when the
application try to upload a file with character like "á, é, í, ó, ú,
[. ]". The excepcion returns the folowing error:
Error al procesar fichero : System.Net.WebException: Se ha terminado
la conexión: La conexión ha terminado de forma inesperada.
en System.Net.HttpWebRequest.GetResponse()
en
SipaAdmElectIntegracion.SharePointFileUploader.SendRequest(String uri,
Byte[] postBody, Int64 postLength)
en
SipaAdmElectIntegracion.SharePointFileUploader.SendRequest(String uri,
String postBody)
en
SipaAdmElectIntegracion.SharePointFileUploader.UrlToWebUrl(String uri,
String& webUrl, String& fileUrl)
en
SipaAdmElectIntegracion.SharePointFileUploader.PutDocument(String uri,
Byte[] bFichero, String metaInfo)
Can someone help me??
thanks- Ocultar texto de la cita -
Im sorry, im from spain and my english isn't the best. and is the
first time that i write in this google group. My application is .net
framework 2.0 but i use the put document method because the sharepoint
portal is 2003. I put the files without errors. I only have errors
when the file name is with this characters. I don't know if exits any
parameters in put document method that i could use to normalize or
convert in any codification the file name. this is the code:
public void PutDocument(string uri, byte[] bFichero, string metaInfo)
{
Uri myUri = new Uri(uri);
string webUrl, fileUrl;
UrlToWebUrl(uri, out webUrl, out fileUrl);
if (null == metaInfo)
metaInfo = "";
string postBody = String.Format(
"method=put
+document&service_name=&document=[document_name={0};meta_info=[{1}]]&put_option=overwrite&comment=&keep_checked_out=false
\n",
HttpUtility.UrlEncode(fileUrl),
metaInfo);
UTF8Encoding encoding = new UTF8Encoding();
MemoryStream stream = new MemoryStream();
stream.Write(encoding.GetBytes(postBody), 0,
postBody.Length);
stream.Write(bFichero, 0, bFichero.Length);
SendRequest(myUri.GetLeftPart(UriPartial.Authority) +
webUrl + "/_vti_bin/_vti_aut/author.dll", stream.GetBuffer(),
stream.Length);
stream.Close();
}
- References:
- Put document and FileName
- From: Berrocoso
- Re: Put document and FileName
- From: Mike Walsh
- Re: Put document and FileName
- From: Berrocoso
- Put document and FileName
- Prev by Date: Next page location for OK and Cancel - Sharepoint Form
- Next by Date: Re: Autofill in WSS3 lists
- Previous by thread: Re: Put document and FileName
- Next by thread: No more than one event at the same time in Wss 3.0
- Index(es):
Relevant Pages
|