Xảy ra lỗi HTTP 404 khi mở trang web.

lập trình


Tôi thấy lỗi khi mở trang web trên máy chủ cục bộ và tôi sửa MicroSoft .Net FrameFrame 2.
Bây giờ tôi có thể mở trang web trong Localhost.
và tôi đã tải lên Máy chủ bằng FTP.
Khi gõ địa chỉ web và vào trang chủ thì báo lỗi như bên dưới
Không thể tìm thấy trang Trang bạn đang tìm kiếm có thể đã bị xóa, đã thay đổi tên hoặc tạm thời không khả dụng. Vui lòng thử cách sau: * Đảm bảo rằng địa chỉ trang Web hiển thị trên thanh địa chỉ của trình duyệt của bạn đúng chính tả và định dạng. * Nếu bạn đến trang này bằng cách nhấp vào một liên kết, hãy liên hệ với quản trị viên trang Web để thông báo cho họ rằng liên kết có định dạng không chính xác. * Bấm vào nút Quay lại để thử liên kết khác. Lỗi HTTP 404 – Không tìm thấy tệp hoặc thư mục. Thông tin kỹ thuật của Dịch vụ thông tin Internet (IIS) (dành cho nhân viên hỗ trợ) * Đi tới Dịch vụ hỗ trợ sản phẩm của Microsoft và thực hiện tìm kiếm tiêu đề cho các từ HTTP và 404. * Mở Trợ giúp IIS, có thể truy cập được trong Trình quản lý IIS (inetmgr) và tìm kiếm các chủ đề có tiêu đề Thiết lập trang web, Nhiệm vụ quản trị chung và Giới thiệu về thông báo lỗi tùy chỉnh.

[edit]Tiêu đề đã được thay đổi để có ý nghĩa hơn – OriginalGriff[/edit]

Tập tin cấu hình web của tôi là

XML
<?xml version="1.0"?>
<!--
    Note: As an alternative to hand editing this file you can use the
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in
    machine.config.comments usually located in
    \Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
    <appSettings>
    <add key="com.webservicex.www.sendsmsworld" value="http://www.webservicex.com/sendsmsworld.asmx"/>
    </appSettings>
    <connectionStrings>
        <add name="clientConnectionString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=&quot;C:\Documents and Settings\Gis04\Desktop\cms\client.mdb&quot;;Jet OLEDB:Database Password=admin" providerName="System.Data.OleDb"/>
    </connectionStrings>
    <system.web>
        <!--
            Set compilation debug="true" to insert debugging
            symbols into the compiled page. Because this
            affects performance, set this value to true only
            during development.
            Visual Basic options:
            Set strict="true" to disallow all data type conversions
            where data loss can occur.
            Set explicit="true" to force declaration of all variables.
        -->
        <compilation debug="true" strict="false" explicit="true">
            <assemblies>
                <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></assemblies></compilation>
        <pages>
            <namespaces>
                <clear/>
                <add namespace="System"/>
                <add namespace="System.Collections"/>
                <add namespace="System.Collections.Specialized"/>
                <add namespace="System.Configuration"/>
                <add namespace="System.Text"/>
                <add namespace="System.Text.RegularExpressions"/>
                <add namespace="System.Web"/>
                <add namespace="System.Web.Caching"/>
                <add namespace="System.Web.SessionState"/>
                <add namespace="System.Web.Security"/>
                <add namespace="System.Web.Profile"/>
                <add namespace="System.Web.UI"/>
                <add namespace="System.Web.UI.WebControls"/>
                <add namespace="System.Web.UI.WebControls.WebParts"/>
                <add namespace="System.Web.UI.HtmlControls"/>
            </namespaces>
        </pages>
        <!--
            The <authentication> section enables configuration
            of the security authentication mode used by
            ASP.NET to identify an incoming user.
        -->
        <authentication mode="Windows"/>
        <!--
            The <customErrors> section enables configuration
            of what to do if/when an unhandled error occurs
            during the execution of a request. Specifically,
            it enables developers to configure html error pages
            to be displayed in place of a error stack trace.
        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
        -->
    </system.web>
</configuration>

Giải pháp 1

Kiểm tra xem nội dung bạn đang nhập có khớp với nội dung bạn đã tải lên không. Bạn có đang cung cấp phần mở rộng tập tin không? Nó có khớp không? Bạn đã tải các tập tin cho bất kỳ hệ thống bảo mật nào chưa? Tệp web.config của bạn trông như thế nào?

Trả lời những câu hỏi này thông qua nhận xét hoặc bằng cách chỉnh sửa câu hỏi ban đầu của bạn.

Giải pháp 2

Bạn cần định cấu hình IIS trên máy chủ để hiển thị trang web của mình. Bạn đã hoàn thành chưa?

Được rồi, chỉ cần làm một điều đơn giản. *Đây chỉ là một bài kiểm tra*
Sau khi đã sao chép trang web trên máy chủ, nhấp chuột phải vào thư mục gốc và chọn thuộc tính. Trên tab chia sẻ web, chọn chia sẻ thư mục này. Đặt bí danh (tên trang web của bạn) và nhấn Ok.
Bây giờ hãy mở trình duyệt web trên bất kỳ máy khách nào. Nhập http://ServerIP/WebsiteName/ và nhấn enter. Xem nếu bạn có thể nhìn thấy trang web của bạn.

コメント

タイトルとURLをコピーしました