access sharepoint list

Discussion in 'ASP .Net' started by Paolo opg, Sep 9, 2008.

  1. Paolo opg

    Paolo opg Guest

    hello

    i'm currently developing web pages that should access a sharepoint 2007
    list, insert data into that list and read data from that list.

    that list is a limited access one, with only a couple of users with write
    permission and almost every user without any right on that list, not even
    read access.

    the init code for read and write operations is as follows:

    liste = New Intranet.Lists (intranet = web ref)
    liste.Credentials = New Net.NetworkCredential("user", "pass", "dom")
    liste.Url = "http://intra.net/sites/website/_vti_bin/lists.asmx"
    ..
    ..
    ..

    where 'user' is a user with access to that list.

    with the init code shown above, i perform data insert into the list and
    everything works as expected: user loading the web page DOES NOT have
    access to sharepoint list, but a record is inserted upon interface (aspx
    page) request.

    loading the page containing the read code, i get no result; i try to
    retrieve the row i just lodaded into the list but no data is shown and no
    error is given.
    the row is visibile through sharepoint, so i'm sure the data is there.


    what happens is that during insert operations the code-supplied
    credentials are passed to sharepoint, but while reading, actual user (the
    user that launched IE on client machine) credentials are passed to moss
    server and no data is retrieved.

    any idea about why i get this behaviour or any test to get more infos?

    please note that:
    - server software is iis6 on win2003 server
    - integrated auth is enabled on iis for the virtual dir the pages reside
    in and the correct user is recognized on access
    - all the pages are placed in the same virtual dir
    - no external components, only microsoft .net libraries


    --
    Paolo opg

    BE AWARE that this post uses a fake reply-to address
    to contact me write to:
    janickg ( at ) hotmail ( dot ) com
    --
    Paolo opg, Sep 9, 2008
    #1
    1. Advertising

  2. Paolo opg

    bruce barker Guest

    unless your webserver and sharepoint are the same server this will not work.
    nt credentials can not be forwarded (one hop rule). you can switch to
    kerberos (and enable credential forwarding) or basic (be sure to use ssl).

    -- bruce (sqlwork.com)


    "Paolo opg" wrote:

    > hello
    >
    > i'm currently developing web pages that should access a sharepoint 2007
    > list, insert data into that list and read data from that list.
    >
    > that list is a limited access one, with only a couple of users with write
    > permission and almost every user without any right on that list, not even
    > read access.
    >
    > the init code for read and write operations is as follows:
    >
    > liste = New Intranet.Lists (intranet = web ref)
    > liste.Credentials = New Net.NetworkCredential("user", "pass", "dom")
    > liste.Url = "http://intra.net/sites/website/_vti_bin/lists.asmx"
    > ..
    > ..
    > ..
    >
    > where 'user' is a user with access to that list.
    >
    > with the init code shown above, i perform data insert into the list and
    > everything works as expected: user loading the web page DOES NOT have
    > access to sharepoint list, but a record is inserted upon interface (aspx
    > page) request.
    >
    > loading the page containing the read code, i get no result; i try to
    > retrieve the row i just lodaded into the list but no data is shown and no
    > error is given.
    > the row is visibile through sharepoint, so i'm sure the data is there.
    >
    >
    > what happens is that during insert operations the code-supplied
    > credentials are passed to sharepoint, but while reading, actual user (the
    > user that launched IE on client machine) credentials are passed to moss
    > server and no data is retrieved.
    >
    > any idea about why i get this behaviour or any test to get more infos?
    >
    > please note that:
    > - server software is iis6 on win2003 server
    > - integrated auth is enabled on iis for the virtual dir the pages reside
    > in and the correct user is recognized on access
    > - all the pages are placed in the same virtual dir
    > - no external components, only microsoft .net libraries
    >
    >
    > --
    > Paolo opg
    >
    > BE AWARE that this post uses a fake reply-to address
    > to contact me write to:
    > janickg ( at ) hotmail ( dot ) com
    > --
    >
    bruce barker, Sep 9, 2008
    #2
    1. Advertising

  3. Paolo opg

    Paolo opg Guest

    =?Utf-8?B?YnJ1Y2UgYmFya2Vy?= <>
    wrote in news::

    > unless your webserver and sharepoint are the same server this will not
    > work. nt credentials can not be forwarded (one hop rule). you can
    > switch to kerberos (and enable credential forwarding) or basic (be
    > sure to use ssl).
    >
    > -- bruce (sqlwork.com)
    >
    >


    thank you for your reply.

    your explanation does not fit with actual behaviour of the system.

    insert into sp list DOES work and hard coded credentials are used.
    i'm sure they are used because web client user has no perms on sp list, so
    the operation is performed by a user who has rights on that list.

    read from sp list DOES NOT work and i suppose that's because user
    credentials are used instead of those i hard coded.

    besides that, sharepoint and aspx web pages are on the same web server so
    there should be no credentials forwarding issue anyway.

    the thing i'm trying to understand, is why a 'dangerous' operation (data
    insert) goes fine while an easy one (reading from sp list) fails without
    any error...



    --
    Paolo opg

    BE AWARE that this post uses a fake reply-to address
    to contact me write to:
    janickg ( at ) hotmail ( dot ) com
    --
    Paolo opg, Sep 10, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. George Durzi

    SharePoint WebParts in ASPX Web App

    George Durzi, Nov 14, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    346
    George Durzi
    Nov 14, 2003
  2. Tom
    Replies:
    0
    Views:
    3,807
  3. STom

    IIS5 and Sharepoint 2001

    STom, Feb 26, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    365
  4. apondu
    Replies:
    0
    Views:
    365
    apondu
    Jul 5, 2007
  5. Paul Watson

    SOAP access to SharePoint

    Paul Watson, Mar 11, 2008, in forum: Python
    Replies:
    0
    Views:
    349
    Paul Watson
    Mar 11, 2008
Loading...

Share This Page