[fixed] [4378] Issues accessing network share using the service (2 Viewers)

Oxan

Retired Team Member
  • Premium Supporter
  • August 29, 2009
    1,730
    1,124
    Home Country
    Netherlands Netherlands
    You should thank @ollienator, I just linked the code he wrote ;)
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,562
    3,944
    Lehmden
    Home Country
    Germany Germany
    Hi.
    Any chance to get binaries (can't compile myself)?
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,562
    3,944
    Lehmden
    Home Country
    Germany Germany
    Hi.
    Tested it. Imported some series from NAS. Working without any issues so far. MP2 Client (to configure Server settings, add and remove shares,...) on another PC than MP2 Server and NAS is a third PC...
    Will do some more tests during the weekend, but I think this issue is solved. Great.
     

    MJGraf

    Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,478
    1,385
    Finally found the time to test this branch. Unfortunately, for me it doesn't seem to be solved.

    Situation as follows:
    2 PCs: one htpc running MP2-Server as service, one laptop running MP2-Client
    Both have the same user with the same password
    Using a build from @morpheus_xx's branch
    Completely clean installation for both, server and client. No global or local shares yet.

    What I did:
    Start the server as service on htpc
    start the client on the laptop
    Tried to add a global share using the client
    Chose NetworkNeighbourhoodResourceProvider

    Result:
    I saw the green circle for a while and then no network resource at all was shown - not a single computer although at least three are on the network (including the laptop and the htpc).

    The Server Error log doesn't show anything, the server-log shows:
    [2013-05-22 22:29:40,612] [109443 ] [34 ] [WARN ] - DvArgument: Error serializing argument value
    MediaPortal.Utilities.Exceptions.InvalidDataException: UPnPDtResourcePathMetadataEnumeration: Invalid null value
    bei UPnP.Infrastructure.Common.UPnPExtendedDataType.SoapSerializeValue(Object value, Boolean forceSimpleValue, XmlWriter writer) in c:\_MP\Quellcode\MediaPortal-2\MediaPortal\Source\Core\UPnP\Infrastructure\Common\UPnPExtendedDataType.cs:Zeile 137.
    bei UPnP.Infrastructure.Dv.DeviceTree.DvExtendedDataType.SoapSerializeValue(Object value, Boolean forceSimpleValue, XmlWriter writer) in c:\_MP\Quellcode\MediaPortal-2\MediaPortal\Source\Core\UPnP\Infrastructure\Dv\DeviceTree\DvExtendedDataType.cs:Zeile 72.
    bei UPnP.Infrastructure.Dv.DeviceTree.DvArgument.SoapSerializeArgument(Object value, Boolean forceSimpleValue, XmlWriter writer) in c:\_MP\Quellcode\MediaPortal-2\MediaPortal\Source\Core\UPnP\Infrastructure\Dv\DeviceTree\DvArgument.cs:Zeile 136.
    What the heck does this have to do with the NetworkNeighbourhoodResourceProvider? Or is this just because the server doesn't find any computers on the network and tries to transport an empty struct over UPnP?

    The result is exactly the same for both settings: "Use Credentials of interactive session" and "use username and password" (of course with the correct credentials entered).

    I'll try to do some debugging, but this will take some time so if somone has an idea, any help is appreciated.
    Michael
     

    MJGraf

    Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,478
    1,385
    ok, got it...

    As mentioned above, I had EITHER "Use Credentials of interactive session" checked OR "use username and password".

    When I check BOTH options, it works as it should. This behaviour is reproducible for me - @Lehmden, could you be so kind and try if you can reproduce this?

    I'll have a look into the code - if I still have enough beer in my fridge, I may spot something ;)

    Michael
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,562
    3,944
    Lehmden
    Home Country
    Germany Germany
    Hi
    try if you can reproduce this?
    I've tried but can't reproduce this error. It works like a charm as long as I have at least one of those two credential- options marked, no matter which one. Only with non of them marked I've got "illegal path" on all shares from other PC than the MP2 server itself. So for me it's working perfect now...
     

    MJGraf

    Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,478
    1,385
    This is really strange...
    Let me try to explain my problem with some Pictures:

    1st Scenario: Both options checked
    Using these network credential settings:
    Network Credentials_1.jpg
    I go to
    Settings->Shares->Shares Configuration->Add Share->Global Share->Continue->Network Neighborhood Resource Provider->Continue
    And I see all my computers in the Network:
    Adding a share_1.jpg
    (htpc_ffm runs MP2 Server, vaio_tt runs MP2 Client and NL is a fritzbox share)
    I can add a share and when I go back to shares configuration it looks like this:
    Shares configuration_1.jpg

    2nd Scenario: Only username and password checked
    i.e. using these network credential settings:
    Network Credentials_2.jpg
    I can now go to the shares configuration page and I still see the share I added in the first scenario:
    Shares configuration_2.jpg
    But when I try to add another global share with the network resource provider (Settings->Shares->Shares Configuration->Add Share->Global Share->Continue->Network Neighborhood Resource Provider->Continue) it looks like this:
    Adding a share_2.png
    The conclusion for me is that the NetworkNeighborhoodResourceAccessors still work for an existing share. But it seems like it doesn't work for the "root"-Accessor, which is supposed to list all the computers in the network. @Lehmden: Thanks a lot for testing, but may I ask what exactly you did to test? I suppose you went to the Shares Configuration to see whether the share is still displayed correctly (which is the case for me as well). Could you test to add another share and see if your computers are listed?

    3rd Scenario: Only interactive session:
    using these network credential settings:
    Network Credentials_3.jpg
    my shares configuartion looks like this:
    Shares configuration_3.jpg
    This is the strange part since for you, Lehmden, I understand that your share is still displayed correctly - for me apparently not.
    Trying to add a share looks exactly the same as in the 2nd scenario above.

    The 4th scenario (having none of the two options checked) results in the same behaviour as in the 3rd scenario.

    Conclusion:
    After all I think there are still more than one bug in the NetworkNeighborhoodResourceAccessor.
    The first one for me has to do with the "root"-NetworkNeighborhoodResourceAccessor, which for me is only able to list the Computers in the network, if both options are checked.

    The second bug has to do with the "use credentials from interactive session". By the way: In scenario 3 above there of course was an interactive session while I was testing. I was logged on as Administrator. But I still can't believe that this is supposed to work at all. If this really works, the whole security of Win7 doesn't make any sense. If MP2-server runs as a Service under the local Service account and was then able to "steal" the credentials from another process (in this case the administrator account!) with just some lines of code, the whole MS-security-concept is screwed...

    Maybe @morpheus_xx can shed some light on this...

    Michael
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,562
    3,944
    Lehmden
    Home Country
    Germany Germany
    Hi.
    Just as proof:
    Zwischenablage-5.jpg


    Zwischenablage-6.jpg


    Zwischenablage-7.jpg


    Zwischenablage-8.jpg

    This works exactly the same with Username and password only checked. Or if I check both.

    And without any of the Credentials set it looks like:
    Zwischenablage-10.jpg


    Zwischenablage-11.jpg


    Zwischenablage-12.jpg



    My Network is configured as follows:
    Sulu is MP2 Server (and MP1 TV Server), Kirk (or Pille) is a MP2 Client, Spock is NAS. I have them all running with the same user and the same password, all in the same workgroup (Sternenflotte as you can imagine ;) ). My Router is a cheap (aprox 30€) Edimax 3G Router. I don't run any AV Soft or Firewall aside of the hardware firewall on the router. All PC have UAC and IPv6 disabled, fixed IP(v4) adresses also DHCP is enabled in Router (needed for smartphone and guest PC). All running Windows 7 Ultimate excerpt the NAS which is running on FreeNAS 8.3 (Linux)...
     

    MJGraf

    Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,478
    1,385
    ok, again one of those situation, which in theory cannot exist - taking your naming scheme into account I would say "fascinating" ;)
    Can you tell me under what credentials your MP2 Server Service is running? The following command run on any of your computers should show the Information:
    sc \\Sulu qc "MP2 Server Service"

    My Service runs as "NT AUTHORITY\NetworkService" (Information is shown as "SERVICE_START_NAME")

    Thanks again, Lehmden, for your help!
     

    Users who are viewing this thread

    Top Bottom