- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have the following line of Fortran code early in my app:
OPEN(UNIT = FILDBGNUM, FILE = FILDBG, STATUS = 'REPLACE')
All arguments are appropriate. I am getting the error forrtl: severe (602): file not found.
Wait a second. The STATUS = 'REPLACE'. How could that error be generated?
Link Copied
- « Previous
-
- 1
- 2
- Next »
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just curious - why are you running VS as an administrator? The only time I ever found that necessary was wit VS2005 back in the Windows Vista days. I would be very nervous about doing this, as there’s a lot going on that’s invisible to you.
I’ll try to get a chance to play with this, but I read above that you are opening files in INITIALSETTINGS. I don’t think that’s wise, and it’s not what INITIALSETTINGS is for.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The main C# project that governs the Fortran engine we build requires strong keying, and the only way we get that one to run in debug mode is running VS as administrator. Till now, we have kept the Fortran engine separate, but the move is to incorporate it within the larger project.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can't reproduce the problem, even running Visual Studio as Administrator.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was afraid of that. I have noted curious errors like this in the past. Perhaps something is not quite installed properly, or an old installation is breaking something new.
I will make a point to uninstall everything on the machine and try again. I am very sorry to have caused all this trouble. I would like to make this work, but this seems to be way above my pay grade.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here's a question - is the path to your project under the Windows or Program Files folders?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Note that the "impersonation" associated with running as an administrator can change things such as how drives map across to file systems. Files and directories that the non-administrator user might see may not be the same as those the administrator might see.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oh, and do you get the same behavior if you run the program as Administrator directly (not inside VS)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The app is run in C:\Users\MyName\Documents\... The "impersonation" indeed might be a problem; I am looking into it. Running the app as Administrator in a Command Prompt window yields precisely the same trouble.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The impersonation is the problem. Running the file as administrator will work, so long as the file itself is local. When the file is on a network drive, administrator privilege loses track of it for some reason.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So here is the problem:
https://support.microsoft.com/en-us/help/3035277/mapped-drives-are-not-available-from-an-elevated-prompt-when-uac-is-co
The problem does not lie with Fortran at all, although the error reporting is a little suspect. This item should be closed.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- « Previous
-
- 1
- 2
- Next »