[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 406
  • Last Modified:

Strange VS2010 script documents behavior

Dear Experts,

I came across this very strange VS2010 problem. Let there be two web applications in one solution. Let them have a javascript file with a same name. No matter what webapplication I start, the script documents section grabs the javascript file from the project that has been added to the solution later.

I created a simple solution. You can download it from here.WebApplication1 is added to the solution later. WebApplication5 is set up as a start project. Start the project, it loads as expected, the browser loads the javascript from WebApplication5. But if you go to Visual Studio, Script Documents, and double click on JScript1.js then you notice it is from WebApplication1.

This is a serious problem, because it eg. ruins debug. Is this a known bug, or what? Any workaround to fix this?
0
develc
Asked:
develc
  • 2
  • 2
1 Solution
 
Bob LearnedCommented:
I can try your example, but my first question is, "Do you have SP1 installed?"
0
 
develcAuthor Commented:
Yes, I have
0
 
Bob LearnedCommented:
You are using two web applications that are at the same level in the file structure, but using a relative path:  Scripts/JScript1.js.  How would you think that it would distiguish which folder to use?  Did you think about setting the applications at different levels, like http://localhost:57042/WebApplication1 and http://localhost:57031/WebApplication5, so that the relative paths would be pointing to different folders?
0
 
develcAuthor Commented:
Thanks, that solved it.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now