问题描述
HI,
我在iis上托管一个网站,而不是虚拟目录。
现在我的问题如下。
我的启动页面位于不在根目录下的子文件夹中,而我的所有其他页面也在子文件夹中。
现在当我通过localhost或ip地址访问该网站时,它打开了第一页。但是母版页上的链接显示错误的路径。它不包括url中的子文件夹名称,这就是我收到404错误的原因。
默认页面是这样的admin / adminhome.aspx
它第一次打开就像
http:// localhost / applicationname
现在当我盘旋在我身上时它显示的页面中的链接
http://localhost/applicationname/list.aspx
i want它看起来像
http://localhost/applicationname/admin/list.aspx
more细节。
我的母版页也在admin文件夹中,我应用如下链接
这在视觉工作室中可以正常工作,但不能从IIS中工作。请有人帮我解决这个问题。
i host one web site on iis as a application not as virtual directory.
now my problem is like below.
my start up page is inside sub folder not in a root directory and my all other pages are also inside subfolder.
now when i access the site by localhost or ip address it open the first page. but the links on the master page shows wrong path. it do not inclue the subfolder name in the url and that's why i am getting 404 error.
default page is like this admin/adminhome.aspx
it opens first time like
http://localhost/applicationname
now when i hover on my links in the page it shows
http://localhost/applicationname/list.aspx
i want it to read like
http://localhost/applicationname/admin/list.aspx
more details.
my master page is also inside admin folder and i apply links like below
list
this works fine from visual studio but not from the IIS. please can some one help me how can i solve this.
推荐答案
这篇关于iis托管链接路径问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!