• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Network install problem (.NET program)

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    Network install problem (.NET program)

    A school is having a problem running one of our programs in VB.net. It's Windows 7 on an RM network.

    Teachers can run it ok with an admin login but not pupils. It reports access denied on the folder used for temporary files although the path (C:\ProgramData\companyname\program\version) is the correct one for windows 7 and obtained using standard code. He says he's done all the standard things to set permissions.

    An oddity is that the error message also lists an application path that I would expect to see on another of our programs. The programs contains no references whatever to each other and the application path is read in standard way from the AppPath variable. Anyone have any idea why .NET AppPath should contain a wrong value?

    I suspect some network problem and the app path begins with \\BMS-SR-001\RMPublic\ (whatever that is!). Trouble is I know nowt about networks.

    Cheers
    bloggoth

    If everything isn't black and white, I say, 'Why the hell not?'
    John Wayne (My guru, not to be confused with my beloved prophet Jeremy Clarkson)

    #2
    Network install problem (.NET program)

    \\server\directorypath

    Check if its pingable

    Comment


      #3
      Originally posted by stek View Post
      \\server\directorypath

      Check if its pingable
      to be clear
      ping BMS-SR-001 otherwise open windows explorer and type \\BMS-SR-001\RMPublic\ into the address bar.
      merely at clientco for the entertainment

      Comment


        #4
        I think RMPublic share isn't writeable by students from memory. Staff can, students cannot. So no good for temporary files.
        Don't forget each user should be saving their own temp files to their profile or home drive, depending on how the app works - ie does it need to convert temp files into the real thing later. They shoud not all be writing temp files to the same directory - as they will overwrite each other and cause all sorts of chaos.

        Comment


          #5
          Originally posted by dmini View Post
          Don't forget each user should be saving their own temp files to their profile or home drive, depending on how the app works - ie does it need to convert temp files into the real thing later. They shoud not all be writing temp files to the same directory - as they will overwrite each other and cause all sorts of chaos.
          WHS. ProgramData isn't the right place for temporary files, it's for system wide application data that needs to be changed at runtime. You can see why that would get locked down for unprivileged users.

          I'm guessing the RMPublic path is where the program is running from.
          Will work inside IR35. Or for food.

          Comment


            #6
            Yeah should use

            Environment.GetEnvironmentVariable("temp");
            or
            System.IO.Path.GetTempPath();

            To obtain the proper temporary path for the current user.
            McCoy: "Medical men are trained in logic."
            Spock: "Trained? Judging from you, I would have guessed it was trial and error."

            Comment


              #7
              Ta for answers. I was being a bit lazy saying temp files, actually the only file stored is the user settings file.
              bloggoth

              If everything isn't black and white, I say, 'Why the hell not?'
              John Wayne (My guru, not to be confused with my beloved prophet Jeremy Clarkson)

              Comment


                #8
                Has the program has been installed on a network drive? If so you may want to look at code access security in .NET. When a .NET program is run from a network path it runs with far lower security permissions than when it is installed on a local drive (by default). This can give access denied errors.

                Comment

                Working...
                X