Intranet v. Internet - InfoPath Dev
in

InfoPath Dev

Intranet v. Internet

Last post 09-01-2005 01:49 PM by Patrick Halstead. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 09-01-2005 09:10 AM

    Intranet v. Internet

    I searched high and low for a possible solution to creating an easy way to authenticate a user, and to grab a simple token to check against programmatically in InfoPath, when not on the local domain. Namely due to the lack of support InfoPath SP1 has for security (read as none) in regards to user tokens, it tooks some research to finally come up with a solution.

    When InfoPath makes requests to authenticated sites, it will prompt you as IE would. Unfortunately, they don't expose such a model (that I know of). This prompt works great, but what if you had to run logic locally on a given user? On a domain, this is easily done with WindowsIdentity. On a WAN, it just doesn't work. No model is exposed. So I came up with this solution that others might find helpful.

    I used an ASP.NET page that uses authentication, and returns a simple xml node:

    <User id="DOMAIN\user" name="Full Name" />

    After this, add this as a datasource, and the attributes become exposed. Pull this from your dataobjects collection (depending on the order, in this case, it was the second, so [1]), and then you can easily check either value. The advantage here is that it continues to use the authentication token that InfoPath first used to access the form from the site. Obviously, this isn't nearly 100% cut and dry, working with SharePoint, and ensuring it's in the right location, but I figured the short of it would be enough information.

    If anyone is seriously looking for a full walkthrough, I'd be more than happy to build one up.

    I apologize if this seems a bit, rough, but I'm in a hurry this morning, and thought this should suffice for now.

    Enjoy! :)
  • 09-01-2005 01:49 PM In reply to

    Hi SRayBell and welcome to the forum!

    I like your approach of using ASP.NET to do Basic Auth and then returning the info. That's cool. What does the ASP.NET code look like?

    If you are VPN'ed into the server, then Active Directory Web service is a better way to do this, but that requires Windows Auth.


    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.