Authentication when using local "Preview in Browser"

Hi there,I’m developing a lot of stuff “off-line” so I’m using Preview in Browser on localhost. Officially it doesn’t support HTTP authentication… however nHTTP is very much the same as on the server (?) so by ammending the personal NAB authentication should (???) work. The question: would it work and what to ammend (which views, fields, forms, documents etc needed).

:slight_smile: stw

Subject: Authentication when using local “Preview in Browser”

local preview does not use the local NAB - it uses defaulted entries. So customizations to your client-side NAB will have no effect…

Maureen Leland

IBM

Subject: RE: Authentication when using local “Preview in Browser”

That’s not quite true.

You can’t use session authentication but simple name & password will work if you replace design of local names.nsf with Domin Directory template

  1. Replace design of local names.nsf with Domino Directory template

  2. Copy users (with http passwords) from Company’s DD

  3. Do some preview to start nhttp.exe process

  4. Set anonymous access in yourapp.nsf to No Access

  5. In browser’s addrss bar enter http://localhost/yourapp.nsf

the same worked in R5

Preview from designer will not work (with anonymous=no access) but you can always type your URLs manually or make bookmarks

good luck.

Subject: Full design Replace works, how abour a partial?

Hi Andrey,

thx for the reply. Local Preview indeed behaves differently depending on wether you started with “Preview in Browser” or you launched nHTTP from the command line.

The big question: I’m very sure that you do not need the whole Public Directory Design. I asume you only need a) the needed fields in the Person Document (HTTPPassword, Fullname) and some views. But which one? Do u have any idea?

:slight_smile: stw

Subject: RE: Full design Replace works, how abour a partial?

I had to get this working, and it took a few hours, so I thought I would share the effort :wink:

This is what you need to do to get local authentication working:

  1. take a normal local address book (ie based on pernames.ntf)

  2. copy some forms into it from pubnames.ntf:

  • (Virtual Server)

  • Server

  1. copy some views into it from pubnames.ntf:
  • ($Servers)

  • ($ServersLookup)

  • ($ServerParameters)

  • ($ServerConfig)

  • Server\Web Configurations

  • Server\Servers

  1. Copy a real server document into it from a real public address book.

  2. Edit the server document to use your own name as the server name, fully qualified (so mine is called Jim Cantor/Netforce/AU)

  3. Edit the server document to ensure that the " Load Internet configurations from Server\Internet Sites documents" is Disabled.

  4. Edit the server document to set the old R5-type of configuration: you want to disable sesion authentication (Internet Protocols / Domino Web Engine). And make the HTTP home url appropriate.

  5. copy the person document from your real server’s address book into your local address book. This will contain a shortname and internet password. Make sure that the shortname is NOT the name of your renames server document (ie in my case, anything other than ‘Jim Cantor’ as a shortname).

  6. Set your testing database to have ‘Anonymous’ = No Access and Unspecified usertype.

  7. Open a database that has Anonymous access, and preview it in a browser.

  8. Go to your testing database URL (eg http://localhost/MyApp.nsf) and you should be able to log in.

Best of luck…

  1. if you get no decent response from http://localhost, it could be that some other program has hijacked port 80. You could probably try (ie I didn’t!) another port (eg 81) (in the server document) and then use http://localhost:81/myapp.nsf, or stop the other program. To hunt this down, run the windows command netstat -a and look to see if http is in the list. In my case, Skype was holding it open. Now, that’s a whole other can of worms!

Jim.

Subject: Needs reboot

Missing from the above instructions is that you must reboot your machine for this to work. Stopping and starting Notes is not enough