I have a Java applet that was working fine in a browser hosted in an ASP.NET application. I then added Forms Authentication to my application and have an access rule that denies Anonymous users to the directory the Java applet and page that hosts it live in. The applet no longer loads and when I look at the Java console it looks like it is trying to load the source of my login page(from the root folder) and then says it can’t find the jnlp (obviously, because it’s not on that page).
When I load the applet from a directory that doesn’t have any access rules it loads with no problem.
Example:
Folder structure:
Root Application/JavaApplet (with access rules to the JavaApplet directory) -> Applet doesn’t load
Root Application/JavaAppletNoAccessRules -> Applet loads with no problem
Anyone have any tips on how I can get the applet loading in a directory that has access rules? It would be nice to use the ASP.NET Authentication to deny access to the applet directory.
The web.config content that restricts anonymous users to the Java applet directory:
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
Thanks.
It seems that the Java applet isn’t getting the permission it needs when put in a directory with access rules denying anonymous users. As a workaround I put the applet in the root directory and kept the aspx page in the limited access directory, then just updated the “applet” tag to point to the root directory to retrieve the applet.
This worked for what I needed (users cannot get to the page with the applet unless they are logged in) but is really more of a workaround than a solution. I’m going to wait a couple of days to see if I get a solution I can accept, otherwise I’ll accept this answer because it did solve my problem.