By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,338 Members | 1,350 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,338 IT Pros & Developers. It's quick & easy.

filestream access denied

P: n/a
Hi to all,

I have a file that when I try to open gives the exception message "Access to
path c:\data\abc.mpg is denied".

As soon as I try to do file = new FileStream(filename, FileMode.Open); the
exception is raised.

I have rebooted my machine to make sure that nothing is locking the file and
yet I always get the same error for this file.

How can I find out more on what is causing the problem with this file?

Sham.

Ps. I have opened other files is the same directory and have not had any
problems.
Feb 2 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi,

sham wrote:
Hi to all,

I have a file that when I try to open gives the exception message "Access to
path c:\data\abc.mpg is denied".

As soon as I try to do file = new FileStream(filename, FileMode.Open); the
exception is raised.

I have rebooted my machine to make sure that nothing is locking the file and
yet I always get the same error for this file.

How can I find out more on what is causing the problem with this file?

Sham.

Ps. I have opened other files is the same directory and have not had any
problems.
That's strange. Make sure that the ASPNET user has read (or read-write)
access to this file. To do this, use the Security dialog in Windows
Explorer (right-click on the file and choose from the context menu).

I had cases in the past where corrupt MPG files would be almost
impossible to delete even after a reboot. Maybe the file is just
invalid. Can you play it in, say, Windows Media Player?

Greetings,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Feb 2 '07 #2

P: n/a
Hi Laurent,

The app is a normal win form app.
It plays fine in media player.

Any other clues?
Can I check any properties on the file that may help?

Sham.

"Laurent Bugnion [MVP]" <ga*********@bluewin.chwrote in message
news:eP**************@TK2MSFTNGP06.phx.gbl...
Hi,

sham wrote:
>Hi to all,

I have a file that when I try to open gives the exception message "Access
to path c:\data\abc.mpg is denied".

As soon as I try to do file = new FileStream(filename, FileMode.Open);
the exception is raised.

I have rebooted my machine to make sure that nothing is locking the file
and yet I always get the same error for this file.

How can I find out more on what is causing the problem with this file?

Sham.

Ps. I have opened other files is the same directory and have not had any
problems.

That's strange. Make sure that the ASPNET user has read (or read-write)
access to this file. To do this, use the Security dialog in Windows
Explorer (right-click on the file and choose from the context menu).

I had cases in the past where corrupt MPG files would be almost impossible
to delete even after a reboot. Maybe the file is just invalid. Can you
play it in, say, Windows Media Player?

Greetings,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch

Feb 2 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.