Getting Http 404 error after deploying to server

Let me start by saying that I am a windows forms developer by trade. So, I may be missing something obvious.  I recently built an asp.net website for someone. It works fine while testing on my local machine (visual studio, etc).  So, I deployed the website to a local directory, and then copied that directory on to their web server where other websites are running fine.  However, I keep getting an http 404 error when trying to access the site. Another thing to note is that we deployed this as an application on the default web site.

Things that I have checked:
1. Actual URL is correct (I checked the physical path as well as the virtual path from IIS Manager)
2. Actually tried setting permissions on the physical folder to Everyone: Full Control (just for debugging), but it did not work
3. The log file shows it as http 404 error substatus 0

Any ideas?  I really don't know what else to check.
anderdeAsked:
Who is Participating?
 
anderdeAuthor Commented:
We finally found the problem.  The culprit was the AjaxControlToolkit.  For some reason, when I published the site, it did not publish some of the Ajax stuff. We published it from a different laptop that has the Ajax kit installed (I just had references to some dll's), and it worked.  So, apparently I need to actually install the Ajax Toolkit instead of just referencing the dll's in a shared library.

Thanks for your help.  This has made me pull my hair out.
0
 
Jesus RodriguezIT ManagerCommented:
Did you set it up the Initial page for your sub directory on the IIS where you deploy your application? Sound like doesn't find the page under the subdirectory that you're browsing.
0
 
anderdeAuthor Commented:
I'm not exactly sure if this is what you're asking, but...

I have a Default.aspx page in my application that simply re-directs to the Login.aspx page (my initial page).  Is that what you are talking about?

However, I can put in the exact URL to the Login.aspx page and it still pops up with the HTTP 404.
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Dave BaldwinFixer of ProblemsCommented:
Which version of IIS or Server?  With the web server, you have to set permissions in both Windows and IIS to make things work.  Is your 'default' document type (html,asp,aspx,...) listed in the Documents tab for the site?  
0
 
Jesus RodriguezIT ManagerCommented:
Set the Initial page on the IIS for your subdirectory as Default.aspx and try
0
 
anderdeAuthor Commented:
Dave,
We are using Windows Server Enterprise SP2 64-bit.  IIS 7.  
Using both Windows Explorer->Properties->Security and IIS Manager->Right click on my application->Edit Permissions gives the same permission access for IIS_IUSRS.  It is set to Read & Execute, List Folder contents, and Read.  Is this the correct permission that I should be checking?

k-Designers,
I tried going to IIS Manager and double clicking Default Document on the Features page of my application.  I added the Default.aspx page there.  I also made sure that Default.aspx is set in Visual Studio properties (Start Action -> Specific page) for my web application.  I hope that this is what you were talking about.

It is still not working.
0
 
Dave BaldwinFixer of ProblemsCommented:
Put this simple "Hello World" file as "Hello.html" in that same directory and see if you can access it directly without getting a 404.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<title>Hello World!</title>
</head>
<body>
<h1>Hello World!</h1>
</body>
</html>

Open in new window

0
 
Jesus RodriguezIT ManagerCommented:
Try what DaveBaldwind told you. If this work is because your default page is redirecting to the login page and doesn't found the login page on your sub directory. Cna you post hte code of the default page or put the login.aspx page as the initial page on the IIS to see the result that you get??
0
 
anderdeAuthor Commented:
Dave,

After inserting the hello world file into the webiste and re-deploying, I can pull up the helloworld.htm file.  But the aspx files do not work.
0
 
anderdeAuthor Commented:
The Default.aspx page is in the main directory of my application (where Global.asax, Web.config, etc are).  The Login.aspx page is in a sub-directory titled Login of my application.  The following is the code-behind for Default.aspx:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace MyApp.WebUI
{
  public partial class Default : System.Web.UI.Page
  {
    protected void Page_Load(object sender, EventArgs e)
    {
      Response.Redirect("Login/Login.aspx");
    }
  }
}


Please keep in mind that I have tried referencing my site from IE by directly calling the Login page as well.  I put the helloworld.html file in the same Login directory as my Login.aspx file.  If I call the URL of the helloworld file directly, it works; if I call the Login.aspx file directly, it gives me the HTTP 404 error.
0
 
Dave BaldwinFixer of ProblemsCommented:
One other check.  You are accessing this thru your web browser and not as a file share, right?  It would be like "http://webserver/helloworld.htm" in IE or some other browser.  I ask because ASPX will not work thru a file share connection, it must go thru the web server.
0
 
anderdeAuthor Commented:
Yes, I am accessing it by opening up IE on the actual server that is hosting the website.  I pull up IE and type in the URL:

http://{Server's IP}/{Virtual Directory Name}/Login/Login.aspx

Remember that the helloworld.html worked for the following URL:

http://{Server's IP}/{Virtual Directory Name}/Login/helloworld.html
0
 
Dave BaldwinFixer of ProblemsCommented:
Good, just checking.  Some people have tried to get to their files by typing \\servername\helloworld.html and if that works, they try \\servername\Login.aspx and that doesn't work.

Do you have a 'default' document in the server root at http://{Server's IP}/ ?
0
 
anderdeAuthor Commented:
I don't really understand the point system on this website.  If you want, I can award you the points, Dave, since you have stuck by me through this.

Should I click "Accept Solution" on my answer or one of yours??  I am just happy to have this problem solved.  

Once again, thanks for your help, Dave and k-designers!!
0
 
Dave BaldwinFixer of ProblemsCommented:
You know, I have only asked one or two questions so I don't know.  Your comment ID:37275839 is the answer.  I'm glad to help you but I don't need any points for this.  Assist points if anything.
0
 
Jesus RodriguezIT ManagerCommented:
Is true. You solved and also put the solution that you found. We only try to help you. I'm in the same position of Dave.
0
 
anderdeAuthor Commented:
Thank you Dave and k-designers for your direction and suggestions.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.