How to dynamically reload file in Visual Studio ? - asp.net

I have include an xml file included in my solution in visual studio. I am adding new nodes in my file at runtime. But when i am recieving this message all the time The file has been modified out the source editor. Do you want to reload the file? Is there any solution that I can dynamically reload file in my code instead of showing this message ?

As far as i know, no. But if you dont want to see it, my advice is to close the xml on VS while running the app, and open it when finished. It will save you from a ton of times clicking "yes" on the alert message.

Related

Can I use a web based IDE like Eclipse che for connecting to a server maintained by my university for python programming ?

I want to edit the code through the IDEs text editor and debug and run it on the server.
Download Notepad ++ here
Download WinScp here
Connect to your school's server with winscp, then navigate to whatever file you would like to edit. Right click and set the default editor to notepad ++. Now everytime you open any file, you can hot edit inside notepad ++.
I know i perhaps strayed from your full request, but i like this method for quickly updating code and testing on the server.

Get history of all files in a project

I have a helper project where the whole system depend on it, to avoid versioning problems on production server, I need to check that, all source files in the project is no older than 15 days ago, how to do that without viewing the history for each cs file under the project.
thanks
Open the Source Control Explorer. Select a folder, right click and start the "View history" command.
You will now see a recursive list of changes.

Is there a way to redirect output to external console from NLog in ASP.NET?

I just started using NLog in my asp.net application, and I need to see log messages in real time. When I run it in VS2010 I can look at VS output window, but when I run it on the test box I obviously don't have that option. What I need is when my asp.net app starts a console window should open and show log entries in real time.
Any idea how I could accomplish that?
P.S. Of course, I could output to a file, and have some console application monitor changes to the file and show them, but I'm hoping for some easier/existing solution.
You can try Sentinel. I had some trouble getting it connected directly to NLog, so I just had NLog output to file and used Sentinel to view the file.

How does Response.ContentType work?

I am downloading an xml string from ASP.Net and want it to open in MS Office Infopath. I set the ContentType to "application/ms-infopath.xml" (not sure where I got that from).
On some machines it is fine, on others the xml opens in the browser, or in Visual Studio or some other xml editor, even though Infopath is present.
Who keeps the list of valid content types?
What does the OS or browser do with it?
How can I force this XML to open in the program of my choice (Infopath)?
I know this question is really old, but I had the same problem.
I trolled through all the file types on windows trying to find one that only opens in infopath - and there actually is one! Every default install of office has the file extension ".infopathxml" set to open with infopath. So just set your file= part of content_disposition header to "whatever.infopathxml".
xml does not map to any program by default, but will tend to open in whatever someone last used (usually IE's viewer or visual studio), while almost no one will change what .infopathxml files open in.
As I understand it, its still left to the end user. Content-type specifies how the data should be read and verified, but its up to the end user which extension is mapped to which program. You can't force xml to open in one program anymore than you specify which zip program a zip file should open in... the only thing you can do is use a file extension that is almost certain to be unique for that program, such as .infopathxml in this case.

flashlog viewer

I want to build an application using air. The application should load the flashlog file and display the contents after performing some text filtering.
But when i load the application this clears my flashlog.txt though my file mode is READ.
I can understand that running my air application clears the flashlog and prepares it for new logging. Is there a workaround for this.
I dont want to open the flashlog file everytime and check for traces from my web application
You might try http://code.google.com/p/flash-thunderbolt/wiki/ThunderBoltAS3 or run tail -f on the flash log file.

Resources