I’m trying to wrap up an article series for The View (www.eview.com) on developing Sencha Touch applications for IBM Lotus Domino and ran into a problem that I can’t seem to find a solution for – can you help me out? Please?

I’ve created a simple competitive information database in Notes and exposed it to mobile devices using several methods. I first built a Rhodes application (www.rhomobile.com) that synchronized data with the Domino server and wrote a series of articles about it. You can see a sample screen shot of the Rhodes application in Figure 1.

Figure 1

Next I did the same thing using Sencha Touch (www.sencha.com); you can see the application in Figure 2.

Figure 2

As you can see, I finally got around to populating the application with more interesting content.

Anyway, as I worked through the Rhodes application, I discovered that by default, the Domino server was blocking HTTP PUT and DELETE requests, so I had to put the following line in the server’s notes.ini file:

HTTPEnableMethods=PUT,DELETE

Once I did that, the Domino server stopped blocking my requests and everything worked out great.

Yesterday, I was working on the Sencha Touch application and read and create worked great, but as soon as I started editing records in the database I started getting the following error on the server:

04/10/2013 07:47:48 AM HTTP Web Server: The HTTP method is not allowed for the specified URL [/view/compete.nsf/(rest2)?openagent/2035EE2523E794D785257B4900086A2C&_dc=1365594468245] Anonymous

I looked in the Domino log and saw that the problematic URL was:

PUT /view/compete.nsf/(rest2)?openagent/2035EE2523E794D785257B4900086A2C&_dc=1365592049449 HTTP/1.1

You can see the complete Domino log entry in Figure 3.

Figure 3

I’ve searched and searched and can’t seem to find the solution to this problem.

Nothing’s changed on the server and there’s only a few references I can find about that HTTPEnableMethods ini parameter. Most of the stuff I can find on the 405 error all relates to configuring a Domino server to use WebDAV (which I’m not using in this case [am I?]). This was working just fine for my Rhodes application but now fails for the Sencha Touch application and they’re both essentially using the same RESTful service.

Can anyone help me understand more about this problem and hopefully (although hope is not a strategy) fix it?

In a side note, I wanted to take a look at the server’s notes.ini file and remember that I’d written a utility (back in 1996) called Configuration Manager for Lotus Notes that allowed me to work with a sorted version of the notes.ini . So funny that a utility I wrote 19 years ago is still useful. What fun!

Figure 4

I wonder if I should do an update (the DRCC ini reference link isn’t working anymore). You can see the application in Figure 4. I just looked and Wolcott Systems Group has pulled the link to this utility from their web site. No surprise, but sad.

Update Apr 11, 2013

I'm getting more convinced that I'm not having a Domino server config problem but instead I'm having an authentication problem. Notice in figure 3 that it lists the authenticated user as '-'. I've been poking around in the ACL and have tried setting Anonymous to 'No Access' in order to force a login and even setting Anonymous to Manager - still doesn't allow me to do a PUT to the server.

Overall Rating (0)

0 out of 5 stars

Post comment as a guest

Attachments

Location

Share:
Rate this article :
0

People in this conversation

  • Guest - Rick Gerdes

    Sorry dude, haven't touched lotus in almost as long as your app. 1997? When did 'The Phantom Menace' come out? We watched the trailer online during a training session...

    Short URL:
  • Guest - Jack Ratcliff

    so both apps use the same exact url for the PUT request? But the Sencha Touch app gets a 405 error?

    Short URL:
  • Guest - John M. Wargo

    Jack, <br /><br />No, sorry - I made a mistake. I'd forgotten that in the Rhodes article I changed the app from using GET, POST, DELETE and so on to passing the command (create, edit, delete) on the URL in REST fashion. So, it's only the Sencha article that's using PUT and Delete.<br /><br />So, I thought with the ini parameter I'd configured the server to allow PUT and DELETE. That's apparently not working, what do I need to do to fix this? I saw something about a web configuration document - but I don't know anything about it.

    Short URL:
  • Guest - Brian Moore

    405 is method not allowed. Does Anonymous have the ability to delete in your database? If not, that would explain the 405. Try changing the ACL to allow it, then run your REST DELETE again. If it deletes, that's your solution. I've found http://restclient.net/ and https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo useful<br /><br />Cheers,<br />Brian

    Short URL:
  • Guest - John M. Wargo

    Yes, Anonymous has the ability to delete in the database. I've played around with the settings - setting up anonymous with no access and forcing the web app to login. Interesting that when I do that, the error message still indicates that it's the anonymous user. I've given Anonymous editor access and I've even gone into the agent settings and played around with the different settings:<br /><br />1. Run as web user<br />2. Run as (selecting me as the user)<br />3. all of the other settings that affect security.<br /><br />After playing around with it, I'm more certain that something else is going on. The server is not recognizing that the logged-in user is running the REST agent. I don't think it's a PUT or DELETE are blocked problem, but that the Domino server isn't recognizing the user. Hmmm. still need help!

    Short URL:
  • Guest - Michael Dudding

    Have you tried configuring a separate Internet Sites document for your application? See http://www-01.ibm.com/support/docview.wss?uid=swg21201202

    Short URL:
  • Guest - Tom Verleysen

    You could try to configure an internet site because that allows you to controll the http methods (PUT is disabled by default). This might be more successful then configuring the ini parameters directly.<br /><br />To enable internet site documents you need to perform to steps:<br />1. Enable "Load Internet Configurations from Internet Site Documents (Server Doc/Basics Tab)<br />2. Create an internet site document (Web\Internet Sites view and click the Add Internet Site\Web button)<br />3. Make sure that this configuration document works as a default site (cover all requests) in case you do not have any other internet site documents configured (click yes on Basics tab)<br />4. Select your allowed methods on the configuration tab<br />5. restart at least your http task<br /><br />Hope it helps!

    Short URL:
  • Guest - Tom Verleysen

    You could try to configure an internet site because that allows you to controll the http methods (PUT is disabled by default). This might be more successful then configuring the ini parameters directly.<br /><br />To enable internet site documents you need to perform to steps:<br />1. Enable "Load Internet Configurations from Internet Site Documents (Server Doc/Basics Tab)<br />2. Create an internet site document (Web\Internet Sites view and click the Add Internet Site\Web button)<br />3. Make sure that this configuration document works as a default site (cover all requests) in case you do not have any other internet site documents configured (click yes on Basics tab)<br />4. Select your allowed methods on the configuration tab<br />5. restart at least your http task<br /><br />Hope it helps...

    Short URL:
  • Guest - John M. Wargo

    Michael and Tom - that seemed to work, it removed the error from the server's console, but didn't fix the problem.<br /><br />So, what I think is happening is that with this change, the Domino server is no longer blocking the PUT and DELETE requests, but I'm having an authentication problem.<br /><br />When I implement restrictions in the ACL and access the agent from a browser, I'ts a multiple pass process as the server denies access and the browser sends the credentials. In the Sencha Proxy, that interaction doesn't seem to be happening and the Domino server thinks the requestor is anonymous. <br /><br />I either have to figure out how to enable ANY user to do PUT and DELETES to the server or figure out how to get the Sencha proxy to deliver the appropriate credentials. Ugh. <br /><br />30 minutes of searching and I can't find the solution. The Sencha Proxy has a withCredentials property you can set with the Proxy, but that doesn't seem to be fixing the problem.

    Short URL: