我在本地已经做好了一个asp.net的网站,我现在想把网站上线,请问大家我要发布asp.net的网站是否可以像asp网站一样把我的源代码文件上传到FTP空间里去就行了呢?还是要用VS2008里的发布工具进行发布编译再上传到FTP?

解决方案 »

  1.   

    哦.但是我直接把源代码文件上传到FTP后打开我的域名运行报这样的错误啊,能帮我看看是报的什么错误吗?Server Error in '/' Application.
    --------------------------------------------------------------------------------Runtime Error 
    Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine. Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
    <!-- 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>
     
      

  2.   

    我的Web.config文件里已经设置了 <customErrors mode="On"/> 了,并且已经上传到FTP了,还是报这样的错误Runtime Error 
    Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine. Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
    <!-- 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>
     
      

  3.   

    配成off,<customErrors mode="Off"/>
      

  4.   

    嗯,配成Off了.现在报出来的时我数据连接的错误.A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) 
      

  5.   

    因为我现在空间里的MSSQL数据库晢时用不了,所以我把配置文件里的连接字符串server设为我自己电脑局域网的外网IP了,这样是不是网站也访问不了我本机上的数据库啊?