View Single Post
  #2 (permalink)  
Old September 26th, 2012, 11:54 AM
Mark Bedell Mark Bedell is offline
Registered User
Points: 27, Level: 1
Points: 27, Level: 1 Points: 27, Level: 1 Points: 27, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2012
Posts: 5
Thanks: 0
Thanked 1 Time in 1 Post
Default

You don't need to go to all the trouble of creating test cases etc... All you need to do is to run the site from VS and it should get to the point where the missing file is giving you problems.

However, should that fail to give you an exact file name it is simple enough to do a search of entire project/website while in VS for every instance of a "link" or "href" so you can check things like spelling, case, slashes (/), etc... Make sure that you are using the correct syntax for some of these things as well. For instance, using "~/" might work in almost all cases where you are trying to get to the root of your application but in some cases you may have to use "../" or "/" to navigate from folder to folder. This is especially true with accessing a CSS page where they are all kept in their own directory. Normally though, CSS pages that can't be found don't get reported. What is probably getting reported is an automatic redirect to an error page or a login page that either isn't there or in the worng directory or being navigated to incorrectly. You could also do a search (using VS) for ".aspx" or "htm" etc... Since these are the file types you would be navigating to.

Luck

Quote:
Originally Posted by Bill_Thompson View Post
Debugging a Web Site using Visual Studio

I am studying a web site that caught my eye by making a test site privately. Since the original html and CSS and JavaScript code is on a Windows Server and since I am making a test version on a Linux server, there are issues with missing links because of case sensitivity.

Anyway, this is he point. When I load the test website, I get an error message that some file cannot be found. Because of the size and all the connections and files, it is difficult to track down what file is missing or misnamed file. Now, I think there is a way to easily find out exactly what file is not found. I think there is a way to do this using Visual Studio test classes and projects. Am I right?