Solved

Page not Found - 404 and 400 errors

Posted on 2007-11-29
3
1,105 Views
Last Modified: 2012-06-21
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!!!!
0
Comment
Question by:Ianternet
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 15

Accepted Solution

by:
spprivate earned 500 total points
ID: 20373896
Click on  Web Server extensions in IIS  and allow the Active Server Pages,ASp 1.1 and 2.0
go to command prompt and type

C:\Winnt\Microsoft.Net\Version (your .net version) and type aspnet_regiis -i.
This should do the trick
0
 

Author Comment

by:Ianternet
ID: 20374039
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
0
 

Author Comment

by:Ianternet
ID: 20374273
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
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Logparser is the smartest tool I have ever used in parsing IIS log files and there are many interesting things I wanted to share with everyone one of the  real-world  scenario from my current project. Let's get started with  scenario - How do w…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

631 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question