Changing pages

  • Thread starter Thread starter BobLaughland
  • Start date Start date
B

BobLaughland

Hi There,

I am creating an ASP .NET 2.0 c# web site.

Just wondering how I can best view a log file on my web site. (using an
admin web page that only I can see - I have all the security sorted for
that).

I have a text file called 'EventLog.log', and I want to create a page
to display it's content.

I thought you could just go 'www.sitedomainname.com/Eventlog.log' and
it would display the text file.

But that doesn't seem to work for some reason.

Your help appreciated.

Peter.
 
Rename it to a .txt file and see what happens...

Your web server may not be serving up .log
files either as a protected file extension.
 
Cool, that makes it possible for me to look at it. How can I secure
that?

I have this in my web.config file, but it doesn't seem to work.


<location path="eventlog.txt">
<system.web>
<authorization>
<deny users="?"/>
<allow users="Administrator"/>
<deny users="*"/>
</authorization>
</system.web>
</location>
 
Hello Bob,

In order to apply the <location>element to mylog.txt, you would probably
want to map the .txt file extension to be handled by the aspnet_isapi.dll to
pass it through asp.net authorization. You would find this under the IIS
admin tool.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top