Solved

Page not Found - 404 and 400 errors

Posted on 2007-11-29
3
1,100 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
  • 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Can logs in C:\inetpub\logs\LogFiles\W3SVC1 be deleted 11 256
Sharepoint Home Page (companyweb) blank 3 73
IIS Page - Getting a Runtime Error 3 46
IIS 7.5 to 8.0 6 100
Prologue It is often required to host multiple websites on a single instance of IIS, mostly in development environments instead of on production servers. I am sure it is not much a preferred solution on production servers but this is at least a pos…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

867 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now