请教:
我在 IIS 中新建了我自己的站点(MyWebSite)
主路径是:F:\LshWeb\TestWeb
当我打开 visual c# projects asp.net web application 时
出现如下错误:
the default web access mode for this project is set to file share,but the projrct
folder 'http://loaclhost/demo/webapplication1' cannot be opened with the path
'f:\lshweb\testweb\demo\webapplication1'.the error return was:unable tocreate web project 'demo/webapplication1'.the file path
'f:\lshweb\testweb\demo\webapplication1' does not correspond to the url
'http://loaclhost/demo/webapplication1' the two need to map to the same
server location http error 404:object not found各位大哥,是不是需要把 F:\LshWeb\TestWeb 和 C:\Inetpub\wwwroot
联系起来?还是我别的地方做错了?
如果需要联系起来,那要怎么设置呢?谢谢各位大哥!
我在 IIS 中新建了我自己的站点(MyWebSite)
主路径是:F:\LshWeb\TestWeb
当我打开 visual c# projects asp.net web application 时
出现如下错误:
the default web access mode for this project is set to file share,but the projrct
folder 'http://loaclhost/demo/webapplication1' cannot be opened with the path
'f:\lshweb\testweb\demo\webapplication1'.the error return was:unable tocreate web project 'demo/webapplication1'.the file path
'f:\lshweb\testweb\demo\webapplication1' does not correspond to the url
'http://loaclhost/demo/webapplication1' the two need to map to the same
server location http error 404:object not found各位大哥,是不是需要把 F:\LshWeb\TestWeb 和 C:\Inetpub\wwwroot
联系起来?还是我别的地方做错了?
如果需要联系起来,那要怎么设置呢?谢谢各位大哥!
如果是虚拟目录,在创建的时候,要输入如下:
http://loaclhost/MyWebSite
如果是建站点,如下:
http://MyWebSite
因为VS是默认在C盘下Inetpub\wwwroot
http://loaclhost/MyWebSite
如果是建站点,如下:
http://MyWebSite
然后新建项目的时候直接:
http://loaclhost/webapplication1
上面是我自己新建了一个站点(MyWebSite)
设置其主路径是:F:\LshWeb\TestWeb 是不是还要新建一个 虚拟目录?如果是还要新建一个 虚拟,那么这个虚拟目录 应该怎么建?
谢谢!
2、 在第一步出现的创建向导首页里点击“下一步”按钮。这时,对话框中的向导提示你输入你要建立的虚拟目录名字,例如:MyWebSite。
3、 完成第二步的虚拟目录名字输入后,单击“下一步”按钮进入向导的第三步,这是提示“输入包含内容的目录径”,这里只需正确输入即可。例如,你要指向你本地服务器的实体路径,可以点击“浏览”指向带相关程序的目录即可。例如:F:\LshWeb\TestWeb
4、 完成第三步的虚拟目录名字输入后,单击“下一步”按钮进入向导的第四步。在这步骤里,你要为你的虚拟目录设置相应的访问权限。允许设置的权限包括:
A、 读取
B、 运行脚本
C、 执行
D、 写入
E、 浏览通常情况下,选择缺省即选取“读取”和“运行脚本”即可。设置完毕,单击“下一步”即可完成虚拟目录的创建。
主路径是:F:\LshWeb\TestWeb
===========================
那么现在你的IIS默认目录应该就是在web下。那么如果你新建项目的时候应该就会是F:\LshWeb\TestWeb\新建的项目名那如果你的IIS默认是http://localhost那么现在应该是http://localhost/新建的项目名这样访问就可以了