views:

34

answers:

1

HI I have a web application and I'm using asp.net routing. When I publish it with the Only files needed to run this application selected it gives me an error when I'm loading any of the page "HTTP Error 404 - File or directory not found."

but if I choose publish All files it works fine.

Do you know how to resolve this issue?

A: 

Exactly the same thing happens when you change BuildAction property of .aspx pages from Content to None or something else.

Jaroslav Jandek
Do you have any idea how to resolve this issue?
Andrew
Set the BuildAction property of the affected pages to Content.
Jaroslav Jandek
Ok I'm going to try it now. So far most of the pages Build Action set to Content. Do i need to set "Copy to output directory" to copy always?
Andrew
Considering the Output Directory is implicitly the 'Bin' directory, you should leave aspx files set to "Do not copy".
Jaroslav Jandek
no it is not working for me. I checked all pages and Build Action set to Content. It should be something else.
Andrew
Are you sure that the ASP ISAPI module even processes the HTTP requests?Code files (.cs) should not matter in deployment. Check what files got copied when using "All files" option (especially *.asax, *.ashx, *.config).
Jaroslav Jandek
When I'm deploying all files (all files in project got copied) site working.
Andrew