troubleshooting Question

HTTP 400 Bad Request returned only when Java Applet connects to webserver

Avatar of magicdlf
magicdlf asked on
SecurityMicrosoft IIS Web ServerFile Sharing Software
5 Comments1 Solution1150 ViewsLast Modified:

I have a Java applet in my web application for rendering thumbnails. This is always working in most cases. However one of our customer reported that the Applet is not working. They deploy the web application on windows 2008 server. I check the logs and found that when the Java tries to connect to the IIS, I got the following HTTP 400 error:
Data: HTTP/1.1 400 Bad Request\r\nContent-Type: text/html\r\nDate: Thu, 03 Dec 2009 16:17:57 GMT\r\nConnection: close\r\nContent-Length: 20\r\n\r\n<h1>Bad Request</h1>
The url that the Java tried to access to is something like:
Data: GET /App/IrcXmlReq.aspx?Credentials=rxsizb2qnbf5ofddt0ki0zh&What=8&DataSource=CONTENT SERVER

I also tried to visit the url through IE, everything looks OK. I think there's something wrong in the IIS security configuration. Any help or suggestions will be appreciated. Thanks in advance!
private boolean tranSession()
      boolean bRet = false;
      if(sCredentials == null || sTransessionURL == null)
        return false;
      try {
          String tranSessionURLReq = sTransessionURL + "?Credentials=" + sCredentials + "&What=8&DataSource=" + sDataSource;
          URL tranSessionURL = new URL(getCodeBase(), tranSessionURLReq);
          URLConnection con = tranSessionURL.openConnection();
          BufferedInputStream bis = new BufferedInputStream(con.getInputStream());
          ByteArrayOutputStream baos = new ByteArrayOutputStream();
          byte[] buf = new byte[BUF_SIZE];
          int bytesRead = 0;
          while ( (bytesRead = != -1) {
            baos.write(buf, 0, bytesRead);
          String sRet = baos.toString();
          if(sRet.contains("Success") )
            bRet = true;
      catch(Exception e)
      return bRet;
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 5 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros