简体   繁体   English

网站中的松散文件夹

[英]loose folder in web site

i updated a website with asp.net and c# from framework .net 2.0 to 4.5.1. 我使用asp.net和c#将网站从.net 2.0更新到4.5.1。 (I'm using VS2013 Professional Update 4). (我正在使用VS2013 Professional Update 4)。

I've rebuilded and resolved all errors; 我已经重建并解决了所有错误; (now there are no errors or warnings). (现在没有错误或警告)。 But when i started debug i noticed i loose something: the complete address 但是,当我开始调试时,我注意到我松了一些东西:完整的地址

http://localhost:2201/WebSiteName/folder/filename.aspx became http://localhost:2201/folder/filename.aspx . http:// localhost:2201 / WebSiteName / folder / filename.aspx变为http:// localhost:2201 / folder / filename.aspx

it isn't possible to update virtual url in a web site (only in a web application). 无法在网站中更新虚拟URL(仅在Web应用程序中)。

I don't understand if it depend from new web browser (IIS Express in VS2013). 我不知道它是否取决于新的Web浏览器(VS2013中的IIS Express)。 Can you help me? 你能帮助我吗? Thanks 谢谢

VS2013 uses IIS Express 8.0 and set as main default root the website folder (i mean the real folder where we made our site). VS2013使用IIS Express 8.0并将网站文件夹设置为主要默认根目录(我的意思是我们创建网站的真实文件夹)。

to use this folder in the url you change: 要在您更改的网址中使用此文件夹:

c:\\user[username]\\documents\\IISExpress\\config\\applicationhost.config C:\\用户[用户名] \\文件\\ IISExpress \\配置\\对ApplicationHost.config

and to find block tag who refer to the website. 并找到引用该网站的阻止标签。

copy tag "Application" set new values. 复制标签“应用程序”设置新值。

L'applicationPool is set to "Classic" for WebSite while "Integrated" for the WebApplication. 对于WebSite,L'applicationPool设置为“经典”,对于WebApplication,其设置为“集成”。

<site name="Prova" id="5">
<application path="/" applicationPool="Clr4ClassicAppPool">
                    <virtualDirectory path="/" physicalPath="E:\prova" />
</application>
<application path="/MyRoot" applicationPool="Clr4ClassicAppPool">
                    <virtualDirectory path="/" physicalPath="E:\prova/myRoot" />
</application>
        <bindings>
<binding protocol="http" bindingInformation="*:2001:localhost" />
                </bindings>
</site>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM