I cannot get webRDP working

1

I tried using webRDP, which is a Java-based (so multi-platform) RDP client that can work as a standalone program (single .jar file) or embedded on a web page.

When I try connecting using it by double clicking the .jar file, I get The server has reset the connection, on both Windows Server 2008 R2 and Windows 7. I tried all sorts of credential combinations with domain names (long and short ways) and without.

When I tried using it from a webpage, I got the following error in the Java Console:

Java Plug-in 1.6.0_26
Using JRE version 1.6.0_26-b03 Java HotSpot(TM) Client VM

load: class com.webinflection.webrdp.MainApplet not found.
java.lang.ClassNotFoundException: com.webinflection.webrdp.MainApplet
    at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Exception: java.lang.ClassNotFoundException: com.webinflection.webrdp.MainApplet

What is causing these problems?

This is the unmodified html page that I am using. I thought I'd try getting it working before I go through the proper configuration:

<html>
<head>
<title>webRDP&#0153;</title>
<meta http-equiv='content-type' content='text/html; charset=iso-8859-1'>
<meta http-equiv='content-style-type' content='text/css'>
<meta http-equiv='expires' content='Wed, 26 Feb 1997 08:21:57 GMT'>
<meta http-equiv='pragma' content='no-cache'>
<!-- Sets margin around applet -->
<style>
body.swproxyBody { margin:4px;; }
</style>
<script type='text/javascript'>
// This method is called after the user logs out of their RDP session. The method name is
a configurable applet parameter.
function rdpOnLogout() {
alert ( ' User has Logged out ' );
}
</script>
</head>
<body class='swproxyBody'>
<!-- Loads the applet and utilizes 100% of browser window width and height. Width and
height could be hard coded to specific values -->
<applet name='rdp' code='com.webinflection.webrdp.MainApplet' archive='webRDP.jar'
width='100%' height='100%'>
<!-- Hostname or IP Address of Terminal Server -->
<!-- This is a required parameter -->
<param name='host' value='10.1.1.25'>
<!-- Port that the Terminal Server -->
<!-- This is a required parameter. -->
<param name='port' value='3389'>
<!-- Username to authenticate to Terminal Server with -->
<!-- Optional SSO Parameter -->
<param name='username' value='joe'>
<!-- Password to authenticate to Terminal Server with -->
<!-- Optional SSO Parameter. If left blank, the Terminal Server will prompt the
user to supply their password.-->
<param name='password' value='cat1dog2'>
<!-- AD Domain name to authenticate to Terminal Server with -->
<!-- Optional SSO Parameter. In some Terminal Server deployments, this
parameter will be required. -->
<param name='domain' value=''>
<!-- Application to start. This value should be url encoded. In this example we are
launching c:\windows\system32\notepad.exe-->
<param name='program' value='c%3A%5Cwindows%5Csystem32%5Cnotepad.
exe'>
<!-- Working directory for Application. This value should be url encoded. In this
example the working directory will be set to c:\windows\system32\ -->
<param name='directory' value='c%3A%5Cwindows%5Csystem32%5C'>
<!-- In this example I used a site ( http://meyerweb.com/eric/tools/dencoder/ ) to
encode the above values -->
<!-- This specifies a javascript method to be called after the user logs out of the
RDP session. This stops the session from hanging is a disconnected state. -->
<param name='onlogout' value='rdpOnLogout'>
</applet>
</body>
</html>

paradroid

Posted 2011-09-15T10:34:31.750

Reputation: 20 970

Answers

1

Problem 1, with the server(s) resetting the connection, odds are you need to set Windows to allow all Remote Desktop Clients. webRDP doesn't currently support NLA or TLS.

Problem 2, with running it from a web page, it would appear the Jar is incomplete or corrupt, or that the browser isn't able to find the Jar, based on how you're referencing it in the code. Without seeing the HTML you're using to embed it, and the files and file permissions, that's the best I can give ya.

peelman

Posted 2011-09-15T10:34:31.750

Reputation: 4 580

Thanks, but I still have problem 2. The md5 checksums are the same, so I am sure that the file is no corrupt. I am using the html webpage from the Configuration Guide, with no modifications (until I get it working). Do you think it could be a file ownership issue? – paradroid – 2011-09-17T13:16:56.103

Possibly, are you doing this all locally from a folder on your machine, or are you actually publishing it to a web server and trying to use it from there? the likelihood of it being a permissions / ownership problem is greater in the latter example. – peelman – 2011-09-18T04:24:48.033

It's being hosted on a Linux server (Debian) running Apache. All the files are owned by the Apache user (www-data). Doesn't it seem like this is the problem in the example html webpage?: <applet name='rdp' code='com.webinflection.webrdp.MainApplet' archive='webRDP.jar' width='100%' height='100%'> – paradroid – 2011-09-18T05:01:10.103

what happens if you try to hit the applet directly from the web browser? and/or change the relative path of the applet to be a fully formed URL? – peelman – 2011-09-18T05:32:45.927

When I use the full path of the applet the browser tries to download it. Using the full URL in the archive= field gave the same error. I am using HTTPS, if that makes any difference. I've added the html webpage to my question. Thanks. – paradroid – 2011-09-18T10:47:40.717

That all looks right to me. I'm out of ideas. If you figure it out, I'd appreciate a post-back about what the problem was. Good luck. – peelman – 2011-09-19T01:54:02.210

Stupid of me not to check before, but in the Apache logs I have this error: File does not exist: /var/www/mydomain.co.uk/rdp/com. So it is looking for a file called com for some reason. I cannot see anything in the html file which seems relevant to this error. – paradroid – 2011-09-19T20:25:31.980

The only difference between your HTML and our functional demo site is we use double quotes and you're using single quotes. Shouldn't be a deal breaker, but i'm not sure. What browser are you using? – peelman – 2011-09-20T00:33:48.317

I have tried using Chrome, Firefox and IE9. I replaced all single quotes with double quotes but still get the error. It's still looking for this 'com' file. – paradroid – 2011-09-20T02:33:51.507

Can you PM me the URL so i can look at it directly? – peelman – 2011-09-20T14:35:04.830

Sure, but how? I cannot see any contact details on your blog. – paradroid – 2011-09-21T14:34:17.467

peelman[at]gmail[dot]com – peelman – 2011-09-21T16:05:00.147