Link to home
Start Free TrialLog in
Avatar of Ianternet
Ianternet

asked on

Page not Found - 404 and 400 errors

Ok, he we go.  I am currently migrating our web server.  This is moving from W2k3 std sp2 to W2k3 std x64 sp2 box.  All patches, and x64 versions of the software have been installed.

On my old box, I have a .net application, which is situated in a virtual directory under the Default Web Site.  So to access, I just type in http://oldbox/nhhs and the application appears fine and runs.  It runs under Integrated Windows Authentication.

On my new box, I have or thought I had duplicated everything.  Indeed I have some other sites being set up that I can browse to fine frrom within IIS.  However, on the newbox, when I type http://newbox/nhhs, I get Page Not Found with Error 404, and the same if I manually specify the default start page, in my case default.aspx.  If I use http://localhost/nhhs, I get Page cannot be Found with a 400 Bad Request error.

If I go to a client and enter the same http://newbox/nhhs, I still get the 404 error.

On the new server again, if I type in the browser, http://localhost, then I get 400 bad request.  However, if I type http://newbox I get the correct reply of Under Construction as I have left the default iisstart.htm file in place.

So where or what am I doing wrong?   All permissions, structures etc etc etc seem to mirror the oldbox, except where they need to be changed, such as the IP address etc.

Help!!!!
ASKER CERTIFIED SOLUTION
Avatar of spprivate
spprivate
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ianternet
Ianternet

ASKER

Ok, that's got me a lot further (and in theory I suppose given the question I should give you the points)....however :-)  I get teh following now:-

Server Application Unavailable
The web application you are attempting to access on this web server is currently unavailable.  Please hit the "Refresh" button in your web browser to retry your request.

Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur.

There is 1 warning and 1 error in the application event log as follows:-
Event Type:      Warning
Event Source:      ASP.NET 2.0.50727.0
Event Category:      None
Event ID:      1073
Date:            29/11/2007
Time:            14:59:24
User:            N/A
Computer:      BLACKADDER
Description:
Failed to initialize the AppDomain:/LM/W3SVC/1/ROOT/NHHS

Exception: System.IO.FileLoadException
Message: Could not load file or assembly 'System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Access is denied.
StackTrace:    at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Activator.CreateInstance(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(String assemblyName, String typeName)
   at System.AppDomain.CreateInstance(String assemblyName, String typeName)
   at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironment(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)
   at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironmentAndReportErrors(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

and....

Event Type:      Error
Event Source:      ASP.NET 2.0.50727.0
Event Category:      None
Event ID:      1088
Date:            29/11/2007
Time:            14:59:24
User:            N/A
Computer:      BLACKADDER
Description:
Failed to execute request because the App-Domain could not be created. Error: 0x80070005 Access is denied.  

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.


Could you help with this or do I need to start a new topic?

Ian
Ok, sorted it.  Here goes.

Firstly, the server\users group was missing from the folders where I store the web sites and so this particular application was presumably not picking up the ASPNet account.

Normally that would probably have been the sole fix in this scenario, but we also reapplied some settings which had been done orginally, but probably only on the 32-bit version.  These are a few settings which we do to grant access and encryptions to various accounts.  I have added the entire set just in case someone else may come across a related problem, although I think the first one was probably the relevant one:-

GRANT ACCESS TO IIS
====================
aspnet_regiis -ga "NT Authority\Network Service"
aspnet_regiis -ga "Domain\OurAnonAccount"

CREATE THE ENCR. KEY
====================
aspnet_regiis -pc "NetFrameworkConfigurationKey" -exp

ADD ACCESS TO THE KEY
=====================
aspnet_regiis -pa "NetFrameworkConfigurationKey" "NT Authority\Network Service"
aspnet_regiis -pa "NetFrameworkConfigurationKey" "Domain\OurAnonAccount"
aspnet_regiis -pa "NetFrameworkConfigurationKey" "NT Authority\Authenticated Users"

I will award your points :-)

Nice and easy eh (well when you know how)

Cheers

Ian