After copying my asp.net website I get 500 and 404 errors? [duplicate]
Possible Duplicate:
Database Deployment issues
I followed the steps in this video:
http://www.asp.net/iis/videos/developing-and-deploying-in-a-shared-hosting
I just open my website on VS2010. then use the copy tool and I create a new directory and copy my web application into this new dir. the copy is done successfully but when I try to access it I get 500 for the main page which contain only some static menus and when I try to access any of my other pages it gives me a 404 error!
I tried to add some sections to my web.config to handle the errors and show me what's exactly wrong as advised before but It won't give me any details! .. also when I try to remotely access my IIS I can only see the folder of my application but I can't see any fil开发者_运维问答es! and the icon for my application is a normal folder, I've seen some screenshots of an IIS of a deployed website and the folder icon is converted to an application icon.
I've also tried to click on my application in IIS a right click > Deploy > Convert To Application. but it generates "An Error occurred when the request was processed on the remote computer. the server experienced an issue processing the request"!
I've been trying to deploy my website for 3 days and posted three questions with no results! :S
Problem Solved
I've tried to speak to my provider again today and an agent advised me that I need to have my application on a virtual path to deploy it as an application. and it worked. But I marked Chris's answer as the correct one not because it's the only answer but has really stated some good points and I really appreciate his help. Thank you so much guys :)
Well.. 404 means file not found. 404's won't be caught by the .net runtime, unless it's for a file with a regular .net extension like .aspx. 500 is an internal server error.
Things I would investigate
Can you deploy just a regular HTML file and load it? if this works, move to #2. If not then either you aren't pointed to the right machine or you aren't deploying your files to the correct location.
Can you deploy a very simple (nearly blank and self contained) .aspx file and load it? If this works, then .Net is installed. If not, then you need to figure that out.
Can you look at the file system to see if anything is actually there? If you aren't seeing it, then it didn't get deployed.
Is the appropriate version of the .Net framework installed on the remote computer? Basically, if your app is a .Net 4.0 app, then you need the 4.0 framework installed on the machine.
Is the app pool correctly configured for the correct .net framework version? Regardless of whether the correct version of the .net framework is installed, you still have to configure the website to use the right version of the .net framework.
Some helpful hints. Don't deploy to c:\inetpub\wwwroot. wwwroot is a directory for the default IIS website and is usually not configured correctly. Just create another directory like c:\inetpub\myapp and deploy there. Also, make sure you disable the default website in IIS and create a new site (not a virtual directory) and point it to the correct location.
I suspect that either you aren't deploying to the correct location and/or your iis settings are bad.
Somewhere along the way on the above you ought to figure it out.
精彩评论