404 Error on all Web Apps I try to run - jboss7.x

Over the course of the week I have had to run a couple of applications in a couple of containers. Initially I tried to run a basic REST service app on glassfish. Whenever I tried to make a call I would get a 404 error. I spent about 2 days trying to solve this and couldn't even reach a basic Hello World index.html - I would just get 404.
Next I started following a tutorial for a REST service on JBoss. It's very simple - an interface, a class that implements it, and a web.xml. I run it on JBoss and again, 404.
I've checked the URLs, fiddled around with different options and combos and whatever else I could find or think of. I'm beginning to wonder if it could be some external issue. Any ideas?

Related

IIS 8.5 on Server 2012 R2 stops responding after a time

I recently updated a server from 2008 R2 to 2012 R2 that hosts a few MVC sites and a Web API. After deployment, everything seems to work fine for a few days before the web api seems to fail. It returns a 404 for all requests to the API from the failure forward. The parent MVC site seems to continue working fine.
A few things:
The web api is hosted as a web application inside a parent website within iis.
This is a 4.6.2 framework site and api.
I would prefer it to be its own site but I don't control this.
It seems to stop at roughly the same time when it occurs - around 2:35 AM
The only route defined by the web api is a GET
I've checked the event log as well as IIS logs. The event log doesn't reflect anything during these times and the IIS logs just show a 404 response. Resetting IIS/AppPools/etc... don't fix the api nor does restarting the machine. In fact, the only thing that seems to fix it temporarily is a VS publish over top of site.
I suspect something to do with MSDeploy but have nothing concrete. Does anyone have any ideas on where to look or what to look for? I feel it must be something to do with the server configuration as we've never seen this problem prior.
I ended up finding out the problem. Our project uses NLog with the config specified to create a new log file daily. Something within either NLog or IIS recently decided not to play nicely together. A temporary fix was to turn off the daily file creation from within NLog. Since making this change, the site has stayed up consistently for the past week.
This post is what got me checking into NLog as a possible culprit.

IIS7 (Windows) Authentication -- Cannot figure out why new website errors 401

I am trying to make a new website on an IIS server, of which has websites that are using Windows Authentication just fine. However, for the life of me, I cannot figure out why my new website refuses access (401.2)
Basically, I create a new website and add a single .html file ("Hello, World"). I can access it just fine. But turn off Anonymous, leaving on Windows Authentication, I get prompted for ID/PWD, ending always a 401.2
So, I decided to make a new website as a copy of the existing working website on the same webserver. I've even gone and made the new website share the same App Pool and the same Physical Path. This way, as far as I can tell, the only possible differences between the two websites is now the IIS configuration of the two sites. Still can't authenticate.
I've switched the bindings, doesn't help.
I've even compared the settings in applicationHost.config, making sure they're equal.
Any ideas? Thanks in advance.
I've used this article several times for problems like these with some success: http://blogs.msdn.com/b/david.wang/archive/2005/07/14/howto-diagnose-iis-401-access-denied.aspx Hope it helps!
I was advised to try running iisreset from the command line. This turns out to be what I needed all along. Seems some configuration changes do not get applied properly, even when restarting the particular website, until IIS itself is restarted.

clientaccesspolicy.xml suddenly stopped working (WCF/Silverlight)

Very frustrated with all of this, hoping someone can assist.
I had a Silverlight application and WCF working together without issue for a year. In order to get them working, I had some pain initially but finally worked through it with help. All of the pain came from configuration/security, 401's, cross-domain hell, etc.
The way I have everything setup is that I have a WCF service that resides in it's own application/directory and runs in its own application pool.
On the same web server (IIS7), I have another application/directory with the Silverlight application that points to the aforementioned service.
The server name (for this exercise) is WEBSERVER1. We've created a CNAME for it that is WEB1. In the past, if the user went to http://WEB1/MyApp/ or http://WEBSERVER1/MyApp/ it would work. Suddenly yesterday it started behaving badly. Normal users started getting the Windows challenge/response prompt (and even if they entered the info they would get a 401 error).
My WCF service runs in a site that enables anonymous access (and this has always worked).
My Silverlight application runs in a site that has windows integrated (and this has always worked), since I capture the Windows username when they connect.
For the record, I did create a NEW application pool yesterday with an ASP.NET application that runs in it. This seems to work fine, but there is a chance creating this new application pool and application/directory has caused something to change.
I have a clientaccesspolicy.xml in my wwwroot folder, as well as in the folder for each of the two applications above (just in case). I have tried to promote NTLM over Negotiate as a provider (as that worked for another issue I was having on another server).
After trying some changes, I can't even get the thing to behave the same each time I call it. Sometimes it will prompt me for credentials. Other times it will work, but then say it failed to connect with the WCF service with a "not found". Other times it will actually work fine, but only if I am using the actual server name and not the CNAME. When using the CNAME I always get the crossdomain error, even though I have the cross-domain xml files in every directory root.
This is a nightmare, and makes advanced algorithm analysis seem fun and easy by comparison. Did Microsoft realize how difficult they made this combination of (IIS7/WCF/Silverlight/providers/permissions/cryptic or missing error messages) to get to work??
I found a solution that appears to be working.
In this case, I had to change the authentication mode for the default web site (which hosted the clientaccesspolicy.xml file) from anonymous access to Windows Integrated. I don't understand why this worked for a year or so and then stopped, but it seems to have resolved it.
The new application that I had deployed yesterday was a standard ASP.NET web application, which I put in it's own application directory and it's own application pool, to ensure that it would not cause this sort of issue. I'm still not even sure if it did.
The way I resolved it was by trying to navigate from my PC to the actual http://servername/clientaccesspolicy.xml file, and that was giving me a 401 error. I switched from anonymous to windows integrated on that default website (which has nothing in it except for that xml file) and that resolved the permission issue. I then had to permission the actual AD groups to have read access to that folder (if not they got the user/pw prompt and could not get through).

Custom service application - proxy stopped

Ive created a custom service app using samples from Tony Bierman and MS. I can see the application in central admin, I can create a new service app from it, the create page works, the manage page is blank and I don't have a properties page. I havent yet tried using the beast, I just want to get the deployment and admin stuff working first. It deploys ok and I can create an instance.
However, after creating it, I see the Service app has started but the app proxy is stopped.
I dont know if this is a problem or not but I cant find anywhere to start it.
Should I worry?
Turns out that yes, I do need to worry. The problem was I had the proxy package feature receiver scoped to web rather farm. Took me a week to find this :(

Clientaccesspolicy.xml randomly not being requested

I have a silverlight 3 application running on a seperate domain that my WCF services. Using both fiddler and Web Dev Helper I am able to see that when I make a web service call SOMETIMES a request is made to clientaccesspolicy.xml and everything works great.
The issue is that is doesnt always make this request. When it doesnt, obviously my app creashes.
I am 3 days on this now. I have investigated it being a timing issue (call made before xml policy loads), permission issue, caching issues, etc... I am totally stuck. There appears to be no rhyme or reason to it.
Some clients work, other dont. Then the other work and new people stop working. It is completely random.
Please help!
Thanks!
Jon
Try this post for your answer:
clientaccesspolicy.xml not requested the first time in some browsers
are all of the sites in the same zone?