Im getting error: Invalid URI: The Uri string is too long. Help ! any ideas why ? I have api key im trying to translate 750kb text file from english to german

595 views
Skip to first unread message

Daniel Lipman

unread,
Oct 24, 2011, 2:43:18 AM10/24/11
to google-tra...@googlegroups.com
System.UriFormatException was unhandled
  Message=Invalid URI: The Uri string is too long.
  Source=System
  StackTrace:
       at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
       at System.Uri..ctor(String uriString)
       at System.Net.WebRequest.Create(String requestUriString)
       at Google_Translator_V2.Form1.Translate(String url) in D:\C-Sharp\Google_Translator_V2\Google_Translator_V2\Google_Translator_V2\Form1.cs:line 65
       at Google_Translator_V2.Form1..ctor() in D:\C-Sharp\Google_Translator_V2\Google_Translator_V2\Google_Translator_V2\Form1.cs:line 30
       at Google_Translator_V2.Program.Main() in D:\C-Sharp\Google_Translator_V2\Google_Translator_V2\Google_Translator_V2\Program.cs:line 18
       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.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:

John McMillion

unread,
Oct 29, 2011, 5:58:01 AM10/29/11
to google-tra...@googlegroups.com
Believe this is a browser limitation, 2000 characters on a get, 5,000 on a post.  Believe you need to chunk it to fit withing those constraints.
Reply all
Reply to author
Forward
0 new messages