WebLogic and Webapp Combo Will Not Display Pictures After Crash - css

I was running a Java webapp in a WAR, in WebLogic 9.2 on my computer, when my computer crashed. When I restarted my computer everything was working, but the images were not being displayed in the webapp, nor was the webapp picking up the CSS. Everything is packed into the WAR and I am not using a webLogic.xml to map anything.
Something like this ( the loss of images and CSS, not the computer crash ) happened last year and I eventually fixed it by going into the weblogic admin, stopping the webapp, uninstalling the webapp, reinstalling and starting it again.
That didn't work this time.
Anyone have any ideas what this is about and how I can resolve it.
My org is working on upgrading to WebLogic 11.2 but there is still about a month away.
Thanks much in advance for any clues.

The culprit turned out to be a new ServletFilter I was developing. The ServeltFilter was checking authentication status before letting people through to the JSPs and Servlets in my site.
While I had put conditionals in the ServletFilter to NOT do any filtering on things like the login page, I didn't do anything like to to make sure files in my /css, /images, /js directories were left alone.
When I added similar conditionals for these directories, reinstalled the *.war and restarted the *.war the problem cleared up.
I guess I wasn't seeing the problem before my computer and WebLogic crashed because the images and CSS were cached somehow........until the crash.

Related

Entry point of ASP.NET MVC app is not being reached. IIS issue?

I got a new laptop at work and, ever since then, I have not been able to run either of the MVC projects I'm assigned to. They build, I've deleted them completely and got the latest version from source control several times. I'm running Visual Studio Premium 2013. I had installed 2012 first but, once I ran out of ideas, I uninstalled both and reinstalled. I did make the following changes to the IIS applicationhost.config file (which are required for our apps because we use certificates, etc):
<iisClientCertificateMappingAuthentication enabled="true">
and
<access sslFlags="SslNegotiateCert" />
The other two developers working on these apps have been through the same procedures with their new laptops and they're not having problems. Here's what I get when I run my app in Chrome (won't let me post a screenshot cause I haven't earned any rep yet):
This webpage is not available
ERR_CONNECTION_RESET
The connection to localhost was interrupted.
It basically goes instantly to this page. I have put a debugging stop in the Global.asax file at:
protected void Application_Start()
and it is never reached.
I've tried everything I can think of. A major problem is that I can't figure out what to even search for for a solution to this. I've Googled everything I can think of but the error is so vague and I'm not getting any exceptions. Please, please help. It's been going on more than a week. Thank you so much.
I just uninstalled and reinstalled IIS Express 8.0 and everything worked. Don't know why I didn't try that before.

Application_Start() called twice in IIS7.5 hosted MVC 5 application

After moving all my solutions over to a newly installed machine (which makes me think this is a config issue), I am now having this problem with my MVC 5 web application(s).
When I build my web application (VS 2013), this of course regenerates all the web code and IIS will restart the application on next page load. However now it seems, when I go to my start/login page, the Application_Start() fires as expected, but when the page is submitted, before the HttpPost method is reached, the entire application seems to start again (Application_Start runs again). This second start seems to occur before the first Application_End() is called...but regardless of the sequence I have no idea why this is now an issue.
Checking the application shutdown reason in Application_End() I get the notorious vague (and apparently completely undocumented) "BuildManagerChange"...which MSDN gives some ridiculously vague description of.
Does anybody have idea why this would start after loading my development environment onto a new machine. Both machines are Win7 Pro running IIS7.5, and I believe the IIS config is identical to the old one (though, apparently not??). The source code/web.config/etc has not changed between machines.
The only documentation I could find on this issue was in regards to using IISExpress, however I am using the standard IIS7.5 installed with Win7 pro.
Edit: After removing all custom code from the entire startup of the site, and reverting my LoginController back to it's original simple form (no custom code), this still occurs.
Well, wasting 2 days on this was fun! But, this was resolved. Running procmon showed that hash.web was being accessed by mcshield.exe (McAfee AV). Apparently the live "on access scanner" checks the asp.net cache, and somehow IIS is aware of this and thinks it needs to rebuild the site again. For some reason McAfee does not check it after this first time so it functions normally after a second build/restart. I added a scanner exclusion to the c:\Windows\Microsoft.NET folder, and that seems to have solved the issue. –
A bit late to the party, but maybe it'll help someone. For me it was because I accidentally mapped two IIS sites to one directory. This resulted in two IIS background worker tasks and Application Application_Start() being called twice even though the second site was marked as "Stopped" in IIS.

Why attach debugger to IIS instance

It may be a silly question but why one would like to attach debugger to IIS instance?
These SOs
Attach Debugger to IIS instance
How do I attach the debugger to IIS instead of ASP.NET Development Server?
show you how to do it but could you let me know what are the benefits of doing this?
One time, in my entire career, we had a web app that started getting strange errors that had us baffled. We tried a dozen things to try and figure out what was wrong, but we were panicking and needed an answer immediately. So, we attached a debugger to the production instance and set up a few watch/break points. It helped us track down the errors and fix the problem.
Naturally, it hung the server during our debugging session, and made people mad, but no more mad than they already were, because of the problem we had.
It would not have been necessary if the code had been written better, with error logging and diagnostic points. I don't expect to ever do it again.
Apart from TimG's post a couple of reasons I can think of are:
To debug the application in a closer representation of its
production environment
To debug on a remote machine
Example, like #TonE #1 -- in order to test a deployed website (with web.config transformations) locally, like if you can't remote debug a live website or just need to test config transforms (since you can't run them in-place):
Open site project from C:\Dev\AwesomeWebSite\AwesomeWebSite.sln
Publish the site to a local folder C:\Webs in Release mode (or Whatever mode)
Set up a local IIS website pointing at the published project
Do stuff on the locally-deployed version (e.g. browse pages, make webservice calls, etc)
Attach VS to w3p.exe (appropriate instance) in order to debug the deployed version
You might be able to effectively do the same thing by instead pointing the Project at your IIS website per this answer.

DotNetNuke Module keeps converting itself into Application in IIS7

Bit of a weird one. For some reason one of my DNN modules keeps being converted into an Application in IIS7 in my development environment. Meaning when I try to view a page that contains that module it can't find the module correctly. It's ok if I go into IIS and delete the application, then restart the site but is a bit of a pain and am little worried it might do this when uploaded to the live server and disable the whole site.
Anyone encountered anything like this before? Any thoughts?
This is a common problem with my VS templates, though not for everyone, and it doesn't happen all the time. It stems from Visual Studio, so it shouldn't ever be a problem on your production servers, unless you upload source and try to compile there, than it might be an issue.
HuwD,
A good resource might be my module template installation video which gives good information on setting up your development environment and debugging issues (regardless of the template you use). Check out between 1:30 and 5:00 minutes for the environment setup, and after 19 minutes some of the troubleshooting.
A couple common problems I see Visual Studio doing is creating an unwanted virtual directory on the DesktopModules folder and/or creating an unwanted web.config in the module's root.
Another good resource is Dnnhero.com. In the development section there is a series on DNN7 environment and template setup.
You may want to give a try a free module called Users Importer - A bit old but worth a try.
Here is a paid alternative: Bulk User Manager

A ghost deleted my files?

I have a pretty weird situation here, and i came up with a very strange conclusion, the thing that makes me think that i got it all wrong, that i have cured the scratch with hcl or something !
Anyways, two days ago i found out that all the pages in a certain directory on a web app that I work on stopped working;
When I tried to debug, iis shout out an exception at my face, the exception was kinda weird (and very ambiguous to me), it says
"type Global is declared in an
assembly that is not referenced here"
and the cursor pointed to a line of code in the generated asp.net temp files, so i checked up my bin directory and compared the live version (the broken version) to my own local version (the working version) and found a couple of dlls missing on the live version
i copied those dlls from the local to the live, and everything went just fine!
the question is, where did files go in the first place, and if the temporary asp.net files were corrupted, is there is any way to fix them without having to reinstall the framework, or rebuild the app?
The Temporary ASP.Net files are created whenever your web asp.net app has to compile. (If you search this site or Google, you will find many descriptions and information on how this works.) They can be safely deleted at any time, so long as the original files are available to recompile. No reinstallation of .NET framework needed.
I doubt that anyone is going to be able to tell you where they went. Your best bet is to put some auditing on the files and log the deletes to the event log.
Its possible that ...
someone else who has access to the server deleted the files accidentally or on purpose.
you deleted them accidentally
you were hacked
your files were deemed viral and were quarantined by an anti virus.
Probably a few other reasons I cant think of too...

Resources