views:

1146

answers:

3

I'm developing an asp.net application which has Windows Authentication enabled(anonymous access disabled). I've created a sub directory called 'Mobile' containing the pages that need to be accessible from a black berry mobile device. These pages contain read only text and a few buttons for performing some actions(no AJAX, no javascript). Most of the devices are running on version 4.2 or 4.5 of the Blackberry OS/browser

I've also downloaded the Mobile Device Browser File(MDBF) and included it as outlined in that link.

Here are some questions I have:

1) Is there a way to have the BES(BlackBerry Enterprise Server) server authenticate the
user/device(possibly an AD lookup)and pass on the NT credentials of the authenticated user to IIS? i.e perform integrated authentication

2) By using the MDBF does ASP.NET send back HTML formatted for rendering based on the
capabilities of the incoming browser/device, if not in this case is there any value in using MDBF, I don't intend to write device/browser specific code by looking at the device capabilities exposed through Request.Browser.

3) I have a stlesheet that I would like to have applied when these pages are viewed on the black berry.If I view the pages on the desktop, I can see the styles being applied correctly, but the styles are not being applied when viewing these pages on the blackberry.Is there anything in particular that needs to be set in the markup/codebehind /config
to enable support for CSS.

A: 

for this to work, you may need to turn off windows authentication for the mobile portion of the site then you would have to create an html form, displayable by the blackberry browser, and authenticate using Active Directory. once authenticated they can browse as normal.

Russ Bradberry
How would you get the user identity if windows auth is off,? Using Forms Auth is not an option since we don't want to force enterprise users to enter credentials every time they hit the page.Enabling anonymous auth won't give us the identity either
Abhijeet Patel
just enable anonymous auth for the mobile pages. you can still use forms authb with active directory as provided in the link above.
Russ Bradberry
You can't use 2 different auth mechanism for the same asp.net application can you?In web.config I need to have the authentication mode set to 'Windows' and this applies to the entire application, unless there is a way to control the auth mechanims on a per sub folder basis so that forms auth applies to the 'Mobile' sub-folder and Windows auth applies to the rest of the app.
Abhijeet Patel
You are correct, you will need to split the application up. In IIS you can make the mobile folder into it's own application. Then it will have it's own web.config.
Russ Bradberry
A: 

I was able to get around items 1 & 2 as indicated in the comments of the original question. For item 3 I decided to leverage the fact that MDS caches the user supplied credentials and uses that to re-authenticate the client on future visits to the same site, the cache expiration policy can be set in the BES to force expiration if desired, also if the user's NT password is changed, the cached credentials are invalidated and the user is presented with a challenge response to re-authenticate once again.

Abhijeet Patel
A: 

Regarding Item 3 and stylesheets. Review what css is supported by BB version 4.2 Padding and margins are not. I had to use a border with the color the same as the background to space my elements out.

Kyle