1 day ago
I inherited a .NET ASP 4.0 MVC site and I need to deploy assembly changes from bin I made in visual studio.
While I am able to deploy these locally on a Windows Server/IIS 7 running on VBox through the network mapped file system, I am unsure which files to deploy to the RDP server running the live site. So far I have only changed .aspx visualization files, but now I need to deploy changes to the database model and controllers I tested.
Web Deploy is not an option and neither is FTP. I need to manually copy over the files. I do not see assemblies in the IIS website folder on the remote so I assume they are somewhere else.
Also do I need to restart the site after deploying assemblies for .NET MVC deployment?
I am asking because when I rebuild the site in visual studio, the changes are instant on the local VBox server. Will the running IIS site pick up the new data schema, ect... w/o a restart?
This is the equivalent of deploying a .war file on Tomcat. Except it's not Tomcat and that's why I am having problems.
20 hours ago
Thanks for the suggestions, I was able to do it. I would like to transcode this into Java, but the project is too big at this point so I am stuck maintaining it.
15 hours ago
I am still having problems with a controller which is reading from something called the HttpRuntime.Cache. Is that like memcached, and do I need to restart IIS to clear that?
When I swap out the new .dll file and use this one controller it throws a server error with a custom page. Regardless of HttpRuntime.Cache, I would like to print a stack trace on production.
The error only happens on the production environment and not on the staging server, so I have to debug this in production.
Normally, I would use either log4j and log the exception in a try ... catch block. - e.printstacktrace()
Or I would more likely System.out.println("searchme"); e.printStackTrace(); and then tail -f catalina.out
And look at the exception in real time.
The logs in inetpub/.../logs don't really have any stack trace information.
Is it possible for Windows technology to silently print a stack trace on a production server or am I asking too much from Microsoft?
2 hours ago
@blowdart:
You can get a runtime stack under three conditions, the DLLs are debug compiled, you have debug turned on in the web.config and you disable the custom error page, use the default and set it to show to all IPs (or local, and RDP to the web server and load the page)
The default solution for .NET web apps is to show the stack trace to HTTP clients in the browser?
Even PHP logs errors in /var/log
Why does a server even need to be running a display manager anyway? Why would you RDP to a production server and start surfing the web?
This seems extremely backwards.
Lets say for an instant that this is a very high traffic website where if you enable a debug build it will slow it down enough to cause a problem and if you show stack traces in the browser people will get scared just like they did on MySpace and never come back.
What now? Can't I just silently log errors to a log file without using another library?
Is there an equivalent of catalina.out or not?
2 hours ago
@ZippyV: Thanks for the info.
I guess you have to export all the messages and search through them with grep on another machine.
Wow, this sucks.
.... and only 15MB of event data to grep through after a slow RDP file copy, that's WAY easier than hitting the controller and running
tail -f catalina.out | grep anchorText
Thanks Microsoft.
1 hour ago
@Sven Groot: Thanks but no dice.
1 Get-EventLogApplication |? { $_.Source.StartsWith("ASP.NET") } > asp.log
XXXXXXXX Apr 27 04:46 Warning ASP.NET 4.0.30319.0 XXXX4849XX Event code: 3005...
Entries are truncated and no stack trace information is available. ZippyV's method works with a CSV export, except now I am searching through megabytes of mixed logs for Application.
I think in this case, the system really does suck, but I can't do anything about it. As is typical for Windows, some little sh1t company probably has a logging solution they sell for 1 million dollars because they only have 2 customers.
1 hour ago
@Sven Groot:
$log = Get-EventLog Application -Source "ASP.NET 4.0.30319.0" |? { $_.Message -like "*exception*" } $log | Format-List $log | Export-Csv log.csv ($log | ConvertTo-Xml).Save("log.xml")
So if I put that in a file, what's the command to run it?
sh file.sh
!#/bin/sh at the top of the file, then ./file.sh
or do I have to call it file.bat and then click on it and open as powershell ???
This is for future reference since right now I am just going to grep through the CSV file I exported in the Event Viewer in CentOS, after I go to Dennys that is.
2 minutes ago
@Sven Groot:
Back from Dennys:
is obviously not actually interested in learning how to do any of this
You are correct. I more want to take your powershell code, and throw it into a .ps1 file and run it when I need a stack trace.
I use bash probably more often than PSH because I use a Linux cluster for my research). Not that you'd ever admit it
You use Linux, because Windows has no viable alternative to Zookeeper/HDFS and you know it.
I don't want to learn Powershell because I am a programmer, not a systems admin, and knowing bash is good enough 99% of the time as Cygwin runs on Windows. For that 1% where I would have to export a binary event log from Windows's cumbersome proprietary binary log formats, it's not worth the months of learning.
Windows has a huge learning curve for a 1% case use return. Not worth it.
Thanks for the info on how to get the stack trace. No thanks to your "but Windows is actually superior nonsense". If it was MySpace would still be #1 on the internet, not the PHP/MySQL/Java(Cassandra) driven Facebook. If it was Sven would not be forced to use Linux to run key/value pairing in parallel.