Solved

Page not Found - 404 and 400 errors

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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

What is an ISAPI filter?   •      It's an assembly (.dll file) that can add or change the way IIS works.   •      They can be enabled globally for your web server or on a site-by-site basis.   When the IIS server receives a request, enabling the ISAPI fi…
A phishing scam that claims a recipient’s credit card details have been “suspended” is the latest trend in spoof emails.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

821 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