Quantcast
Channel: Security forum
Viewing all articles
Browse latest Browse all 12072

Unable to write to website subfolder from Application_Start() but can from Page_Load() event.

$
0
0
Hi,

I am hoping someone can explain the following extremely odd behaviour.

Using ASP.NET 4, I can consistently create/write a file in a subdirectory of my website from the Page_Load event of Default.aspx. The same file-write code always fails in Application_Start, even if the file already exists and has been successfully written from Page_Load. I have been through this with a good tech guy at my hosting provider, and the only way he can get it to work is by adding network write permission to the folder, which means any application on the server can write to it.

It really does seem that permissions in Application_Start are not the same as later (e.g. Page_Load). I can't find info on this problem anywhere. Has anyone encountered anything like this?

Kind wishes ~ Patrick

Viewing all articles
Browse latest Browse all 12072

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>