I feel bad about all of it. I made a mistake on that problem! I thought I wasn't able to create the folder, but it was another mistake... seems I was trying to read it before it was created. I trapped that error. Should have noticed earlier, but I can't debug on that terminal. It's now all good and my folder is created when it has to!
Thank everyone for your help, though. 2011/8/2 Cerebrus <[email protected]> > Are you able to gain access to the ApplicationData SpecialFolder? Is > the problem occurring when you try to create the folder ? > > Check the exception that is thrown. That should provide you more > details about the problem. It does sound like a permissions problem. > You mention that you login as Admin on the terminal, but what > credential does your code use? > > > On Jul 22, 7:03 pm, Arnaud Mongrain <[email protected]> wrote: > > Hello, > > > > I've got a problem at work. In a program, I'm trying to create an xml > file > > so it would always log automatically using the first user credentials > that > > connected. To be sure every user of the terminal will be able to use it, > I > > created the file in "All Users/(Application Name)/login.xml". > > > > I'm using DirectoryInfo.CreateSubdirectory(string) to create my subfolder > > (Application Name) if it doesn't exist. That part works on my work PC, > but > > doesn't on the terminal. And since du Application Name folder doesn't > exist > > on the terminal, program won't run cause it can't create the file in the > > folder, since it doesn't exist... > > > > I'm currently log as an administrator on that terminal, so I don't > > understand why it wouldn't work. > > > > Any ideas? > > > > if > (!Directory.Exists(Environment.GetFolderPath(Environment.SpecialFolder.CommÂonApplicationData) > > + \\Application Name <file://application%20name/>)) > > > > { > > > > DirectoryInfo dir = new > DirectoryInfo(Environment.GetFolderPath(Environment. > > SpecialFolder.CommonApplicationData)); > > > > dir.CreateSubdirectory("Application Name"); > > > > > > > > }- Hide quoted text - > > > > - Show quoted text - > > -- > You received this message because you are subscribed to the Google > Groups "DotNetDevelopment, VB.NET <http://vb.net/>, C# .NET, > ADO.NET<http://ado.net/>, > ASP.NET <http://asp.net/>, XML, XML > Web Services,.NET Remoting" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en > or visit the group website at http://megasolutions.net > -- You received this message because you are subscribed to the Google Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en or visit the group website at http://megasolutions.net
