开发者

Problem resolving URL for a Script Tag in an ASP.NET app in the Intranet

开发者 https://www.devze.com 2022-12-26 01:12 出处:网络
I have this piece of code: Page.ClientScript.RegisterClientScriptInclude(this.GetType(), Guid.NewGuid().ToString(), this.ResolveUrl(\"~/Scripts/min.js\"));

I have this piece of code:

Page.ClientScript.RegisterClientScriptInclude(this.GetType(), Guid.NewGuid().ToString(), this.ResolveUrl("~/Scripts/min.js"));

When we push to our QA server - http://qa.example.com - it works just fine, but when we push to an address in the intranet - http://intranet/app - 开发者_StackOverflow中文版it won't find the script.

Any suggestions?


You Intranet's root is http://intranet not http://intranet/app - your RegisterClientScriptInclude in is looking in http://intranet/scripts/min.js not http://intranet/app/scripts.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号