environment.UserName works for some users but not all - InfoPath Dev
in

InfoPath Dev

environment.UserName works for some users but not all

Last post 06-18-2007 06:07 AM by jweir. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 06-08-2007 08:46 AM

    • jweir
    • Not Ranked
    • Joined on 12-14-2006
    • USA
    • Posts 15

    environment.UserName works for some users but not all

    I think I know the problem here; just want to know if I am correct or not.

     
    This form is published to Share point  form library  and then  each user in our group can go and fill out the form. Simple. Now I have manage code using VS 2003 and Info path 2003 SP2. Form works fine for myself and one other user that has the form copied locally to computer, others that do not have form copied locally are having problems with form. One user does not get any information back from environment.UserName and the other receive an error message from running the form.

    I have seen and read that manage code does not work over internet well and was hoping I could get this to work over the internet. I know I could use the scripting side to get the same thing, but my clients may not have ActiveX function in their browsers. 

    So am I correct or not.. I hoping there is a solution for this using manage code

     

     

     

     

    InfoPath 2003 SP2
    Office 2003 SP2
    SharePoint 2003
    VS 2003

    Jim Weir
  • 06-14-2007 12:15 AM In reply to

    Re: environment.UserName works for some users but not all

    Hi Jim,

    Good to see you in our forum! The managed code permissions only work if the form is running in Local Intranet. If the users experiencing errors have the site in Full Trust, it won't work. Check IE security. If the site is not in Local Intranet it could also be an issue. IF you are working across the internet, they will have to be joined to the domain and have the site in their local intranet. Then it will work. Granted, this is a hassle, but it's one solution.

    Patrick Halstead
    Project Manager at Qdabra
  • 06-18-2007 06:07 AM In reply to

    • jweir
    • Not Ranked
    • Joined on 12-14-2006
    • USA
    • Posts 15

    Re: environment.UserName works for some users but not all

    Patrick,

    For Full Trust to work

    • I need to install the form on each group member computer
    • or have digitally signed certificate made for the form

    This would take care of the problem or

    For Domain to work

    • the site needs to be in Local Intranet and
    • the site needs to be in the trusted sites

    The root of the share point site is in both Local Intranet and Trusted sites. Https:\\SharePointMainSite\.. or does the site that form is on need to be in trusted as well.. Example.. https:\\SharePointMainSite\MainGroup\Subgroup1\TeamGroup\MyInforPathForm/Form/allitems.aspx does this site need to be in the local intranet and trusted sites. If the form site needs to be changed I would have to find a different solution, we (myself and users) can not change these setting in IE.

     Now.. sorry.. next question if I redo the form to not to use managed code and use the scripting object to get network logon would this be a better solution to my problem

     

    InfoPath 2003 SP2
    Office 2003 SP2
    SharePoint 2003
    VS 2003

    Jim Weir
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.