Solved

Display logfile on the web server to my client (mvc 3 C# web application)

Posted on 2013-06-19
3
471 Views
Last Modified: 2013-06-21
I have a web application written with C# and mvc application. This app will load an excel file to the database and log the result in a text file. How can I display the log file to my user/client at the end of the load. The log file will just indicate the total number of records loaded.

some code samples will be appreciated.
0
Comment
Question by:Sirdots
  • 2
3 Comments
 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 39260375
If you know the name of, and the path to, the log file, just store the name and display the list of log files on a page, making each name a link to the log file itself.  If it's just a text file, it should open in any browser.
0
 

Author Comment

by:Sirdots
ID: 39260405
Thanks Paulmacd. Is this possible to be done without the page refreshing. Assuming my user clicks on submit and the upload completes. I will like to show the link to the file at the bottom of my page. Which container do I use to store this link? Literal? Am using mvc.
0
 
LVL 34

Accepted Solution

by:
Paul MacDonald earned 500 total points
ID: 39260458
Without using javascript of some sort, I don't know how to do it without a refresh.  Here's some ideas:
http://stackoverflow.com/questions/9035329/update-panel-in-asp-net-mvc-3
http://www.asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-8
http://www.vnx.nl/?p=144


As to what container - I don't think it matters.  Anything you can tap for its InnerHTML property should work.  Just put an <a> tag to wherever the log file is located.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now