• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            統(tǒng)計

            • 隨筆 - 50
            • 文章 - 42
            • 評論 - 147
            • 引用 - 0

            留言簿(6)

            隨筆分類

            文章分類

            Link

            搜索

            •  

            積分與排名

            • 積分 - 165519
            • 排名 - 159

            最新評論

            閱讀排行榜

            評論排行榜

            asp.net網(wǎng)站部署錯誤及解決方法
            error:
            It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS
            solution:
            However, this error occurs primarily out of 2 scenarios.

            1. When you create an new web application using visual studio.net, it automatically creates the virtual directory and configures it as an application. However, if you manually create the virtual directory and it is not configured as an application, then you will not be able to browse the application and may get the above error. The debug information you get as mentioned above, is applicable to this scenario.

            To resolve it, Right Click on the virtual directory - select properties and then click on
            "Create" next to the "Application" Label and the textbox. It will automatically create the "application" using the virtual directory's name. Now the application can be accessed.


            2. When you have sub-directories in your application, you can have web.config file for the sub-directory. However, there are certain properties which cannot be set in the web.config of the sub-directory such as authentication, session state (you may see that the error message shows the line number where the authentication or sessionstate is declared in the web.config of the sub-directory). The reason is, these settings cannot be overridden at the sub-directory level unless the sub-directory is also configured as an application (as mentioned in the above point).

            Mostly we have the practice of adding web.config in the sub-directory if we want to protect access to the sub-directory files (say, the directory is admin and we wish to protect the admin pages from unathorized users).

            But actually, this can be achieved in the web.config at the application's root level itself, by specifing the location path tags and authorization, as follows:-


            <location path="Admin">
            <system.web>
            <authorization>
            <allow roles="administrators" />
            <deny users="*" />
            </authorization>
            </system.web>
            </location>


            However, if you wish to have a web.config at the sub-directory level and protect the sub-directory, you can just specify the Authorization mode as follows:-


            <configuration>
            <system.web>
            <authorization>
            <allow roles="administrators" />
            <deny users="*" />
            </authorization>
            </system.web>
            </configuration>

            Thus you can protect the sub-directory from unauthorized access.

            error:
            The current identity (NT AUTHORITY\NETWORK SERVICE) does not have write access to 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'.
            Could not load file or assembly 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.

            <!-- Web.Config Configuration File -->

            <configuration>
                <system.web>
                    <customErrors mode="Off"/>
                </system.web>
            </configuration>
             

            Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.


            <!-- Web.Config Configuration File -->

            <configuration>
                <system.web>
                    <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
                </system.web>
            </configuration>

            solution:
            "Could not load file or assembly " indicate that the Framework version is not right, you need to install the right version of framework, and set the ASP.NET selection in IIS website property,select right version , note that you still select asp.net2.0 after you install the .net framework3.5 or 3.0


             

            posted on 2009-01-15 21:44 pear_li 閱讀(1036) 評論(0)  編輯 收藏 引用 所屬分類: asp.net

            国产免费久久精品丫丫| 久久久精品国产sm调教网站| 亚洲国产二区三区久久| 婷婷久久综合九色综合绿巨人| 欧美伊人久久大香线蕉综合69| 精品久久久中文字幕人妻| 国产精品毛片久久久久久久| 久久久久久国产a免费观看不卡| 久久亚洲sm情趣捆绑调教 | 久久久久国产成人精品亚洲午夜| 99久久做夜夜爱天天做精品| 伊人热人久久中文字幕| 蜜臀av性久久久久蜜臀aⅴ麻豆 | 欧美国产成人久久精品| 久久99国产精品一区二区| 日韩精品久久久久久久电影| 国产99久久久久久免费看| 久久夜色精品国产噜噜亚洲AV| 青青青青久久精品国产h久久精品五福影院1421| 99久久99久久精品国产片果冻 | 无夜精品久久久久久| 青草影院天堂男人久久| 国产精品免费看久久久| 久久天天躁狠狠躁夜夜躁2O2O| 久久香综合精品久久伊人| 精品久久久久国产免费| 久久综合丁香激情久久| 久久精品成人免费网站| 69SEX久久精品国产麻豆| 精品国际久久久久999波多野| 伊人色综合久久天天人手人婷 | 国内精品久久久久久99蜜桃| 亚洲精品乱码久久久久久久久久久久 | 一本久久精品一区二区| 一级做a爰片久久毛片看看| 久久伊人色| 午夜精品久久久久| 亚洲国产精品久久电影欧美| 亚洲午夜久久久久妓女影院| 久久精品水蜜桃av综合天堂| 国产成人久久精品一区二区三区 |