Acces files on remote server - problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • benoit

    Acces files on remote server - problem

    Hi,

    on a fileserver I have several images en xml-files that I need to access.
    In web.config I have this section
    <appSettings>
    <add Key="Remote" value="//000.000.000.000 " />
    </appSettings>


    In my codebehind, there is this code
    strRemote = ConfigurationMa nager.AppSettin gs["Remote"];


    Without any problem I can browse, consult, read and open all files on my
    remote server. But I cannot write to it. So no files can be updated...


    this is the error I get
    "unauthorizedac cesException"
    "Access to the path '\\000.000.000. 000\myFile.xml' is denied."

    Yet I have added the correct rights to the server(ASP.NET machine account,
    Guest Account for Internet acces - IUSR_myPc)
    So there should be something else
    but what

    anyone?


  • Patrice

    #2
    Re: Acces files on remote server - problem

    There is also a permission on the share itself... Have you checked this one
    ?

    --
    Patrice

    "benoit" <benoit@discuss ions.microsoft. coma écrit dans le message de news:
    A37E50FA-60D1-4BE9-AA48-913D4FFC4D0C@mi crosoft.com...
    Hi,
    >
    on a fileserver I have several images en xml-files that I need to access.
    In web.config I have this section
    <appSettings>
    <add Key="Remote" value="//000.000.000.000 " />
    </appSettings>
    >
    >
    In my codebehind, there is this code
    strRemote = ConfigurationMa nager.AppSettin gs["Remote"];
    >
    >
    Without any problem I can browse, consult, read and open all files on my
    remote server. But I cannot write to it. So no files can be updated...
    >
    >
    this is the error I get
    "unauthorizedac cesException"
    "Access to the path '\\000.000.000. 000\myFile.xml' is denied."
    >
    Yet I have added the correct rights to the server(ASP.NET machine account,
    Guest Account for Internet acces - IUSR_myPc)
    So there should be something else
    but what
    >
    anyone?
    >
    >

    Comment

    • Patrice

      #3
      Re: Acces files on remote server - problem

      Is this is an existing file (in particular accessed before you try to
      overwrite it ?). If yes try to see if creating a brand new file would work
      (file used by IIS are AFAIK locked for a short period of time after their
      use i.e. you might not be able to delete a file you just have displayed
      through the web site)...

      Double check also under which identity your web app is running to make sure
      (are you using just anonymous authentication ?, also the default account is
      not the same under IIS5/IIS6)...

      Good luck.

      --
      Patrice

      "benoit" <benoit@discuss ions.microsoft. coma écrit dans le message de news:
      E9D3C90D-0D3A-4D99-89A0-F3758C453B8D@mi crosoft.com...
      Yes I did..
      I think i checked every possible access posibility and gave a lot of
      rights
      strange thing is that if i try this on my local machine, by using the IP
      of
      my computer it wil not work, but if I use "C:\mapping ", then there is no
      problem
      >
      >
      "Patrice" wrote:
      >
      >There is also a permission on the share itself... Have you checked this
      >one
      >?
      >>
      >--
      >Patrice
      >>
      >"benoit" <benoit@discuss ions.microsoft. coma écrit dans le message de
      >news:
      >A37E50FA-60D1-4BE9-AA48-913D4FFC4D0C@mi crosoft.com...
      Hi,
      >
      on a fileserver I have several images en xml-files that I need to
      access.
      In web.config I have this section
      <appSettings>
      <add Key="Remote" value="//000.000.000.000 " />
      </appSettings>
      >
      >
      In my codebehind, there is this code
      strRemote = ConfigurationMa nager.AppSettin gs["Remote"];
      >
      >
      Without any problem I can browse, consult, read and open all files on
      my
      remote server. But I cannot write to it. So no files can be updated...
      >
      >
      this is the error I get
      "unauthorizedac cesException"
      "Access to the path '\\000.000.000. 000\myFile.xml' is denied."
      >
      Yet I have added the correct rights to the server(ASP.NET machine
      account,
      Guest Account for Internet acces - IUSR_myPc)
      So there should be something else
      but what
      >
      anyone?
      >
      >
      >>
      >>
      >>

      Comment

      • Jason Kester

        #4
        Re: Acces files on remote server - problem

        Yeah, the builtin ASPNET account won't have access to anything out on
        your network. If you want to access remote files, you'll need to put
        an Identity Imersonate tag into your web.config, and run the whole
        application as a specified user. It's not a very elegant solution, and
        often causes as many headaches as it solves (such as encouraging you to
        put the username/password in cleartext in the web.config), but MS still
        hasn't offered a way around it. It's been a problem from day one.

        Good luck!

        Jason Kester
        Expat Software Consulting Services
        Expat Software is a small consulting and development house, staffed by a number of expatriate Americans.


        ---
        Get your own Travel Blog, with itinerary maps and photos!
        Travel journals and photo blogs from independent world travelers. Maps, research and resources for the aspiring backpacker. Livin' large in the third world!


        Comment

        Working...