Hi,
Whenever I try to use
ApplicationManifest appManifest = (ApplicationManifest)ManifestReader.ReadManifest("ApplicationManifest", clientSetupFilesFolder, false);
I get an "access denied" exception while debugging. I am running Visual Studio 2008/SP1 under Admin. However, if I use StreamReader/StreamWriter, I have no problems reading & writing the application manifest found in the path.
Any ideas?
Thanks.
| | Lenardd Wednesday, August 19, 2009 5:59 AM | Could you please give the full type and text of the exception being issued? And I don't want to sound all pedantic about variable names, but I'm a bit suspicious about the path you use to the manifest, as it looks it might be a folder path instead of a file path. Using a folder path does issue an UnauthorizedAccessException. Under the covers, ManifestReader.ReadManifest first does: File.Open(path, FileMode.Open, FileAccess.Read, FileShare.Read) Looking at http://msdn.microsoft.com/en-us/library/y973b725.aspxmay help better determine what the problem may be.
-- Mike - Proposed As Answer byMike Wade - MSFT Monday, August 24, 2009 4:04 PM
- Marked As Answer byAland LiMSFT, ModeratorWednesday, August 26, 2009 2:33 AM
-
| | Mike Wade - MSFT Friday, August 21, 2009 11:16 PM | Hi Mike, I found out what the problem was.....actually it was Saurabh Bhatia at Microsoft that clued me in. The problem was that I was not pointing to the actually application file but to my "ClientSetupFilesFolder". When I looked at the documentation, it stated "The path name of the input file" . I took that to mean "the location of the input file". I knew it had to be something stupid when I couldn't find others with the same problem! :) Anyways, thanks for following up. --Lenard
- Marked As Answer byAland LiMSFT, ModeratorWednesday, August 26, 2009 2:33 AM
-
| | Lenardd Monday, August 24, 2009 1:37 AM | Could you please give the full type and text of the exception being issued? And I don't want to sound all pedantic about variable names, but I'm a bit suspicious about the path you use to the manifest, as it looks it might be a folder path instead of a file path. Using a folder path does issue an UnauthorizedAccessException. Under the covers, ManifestReader.ReadManifest first does: File.Open(path, FileMode.Open, FileAccess.Read, FileShare.Read) Looking at http://msdn.microsoft.com/en-us/library/y973b725.aspxmay help better determine what the problem may be.
-- Mike - Proposed As Answer byMike Wade - MSFT Monday, August 24, 2009 4:04 PM
- Marked As Answer byAland LiMSFT, ModeratorWednesday, August 26, 2009 2:33 AM
-
| | Mike Wade - MSFT Friday, August 21, 2009 11:16 PM | Hi Mike, I found out what the problem was.....actually it was Saurabh Bhatia at Microsoft that clued me in. The problem was that I was not pointing to the actually application file but to my "ClientSetupFilesFolder". When I looked at the documentation, it stated "The path name of the input file" . I took that to mean "the location of the input file". I knew it had to be something stupid when I couldn't find others with the same problem! :) Anyways, thanks for following up. --Lenard
- Marked As Answer byAland LiMSFT, ModeratorWednesday, August 26, 2009 2:33 AM
-
| | Lenardd Monday, August 24, 2009 1:37 AM |
|