在本地主机和服务器中,asp.net页面的内容不同,为什么? [英] asp.net pages content are not the same in the local host and server ,, why?

查看:78
本文介绍了在本地主机和服务器中,asp.net页面的内容不同,为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,感谢您"Rod Kemp"对我的最后一个问题的帮助.
伙计们,我是asp.net的新手,今天我有一个问题,我的本地主机中的页面内容还可以,但是当我将它们上传到ftp时,它在IE(8),谷歌浏览器,Opera和Fire Fox中什么都没有显示显示代码标记!!,您能指导我如何解决这个问题吗?问题在哪里?它在网络配置中吗?参见网络finfig

hi all of you , thanks for you "Rod Kemp" for your help in my last question.
guys i am new in asp.net , today i have problem that the pages content in my local host are OK , but when i upload them to ftp it display no thing in IE(8) , in Google chrome,Opera and Fire Fox it display the code markups !!, can u direct me guys how to solve this problem ,,??? where is the problem> is it in the web config? see the web finfig

<pre lang="xml"><?xml version="1.0"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>

    <connectionStrings>
        <add name="DBConnectionString" connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\xxxxxx.accdb;Jet OLEDB:Database Password=xxxxxxx"
            providerName="System.Data.OleDb" />
    </connectionStrings>
  <system.web>
    <compilation debug="true" targetFramework="4.0" />
    <authentication mode="Forms">
      <forms loginUrl="~WebForm.aspx" timeout="2880" />
    </authentication>
    <membership>
      <providers>
        <clear/>
        <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices"
             enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false"
             maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
             applicationName="/" />
      </providers>
    </membership>
    <profile>
      <providers>
        <clear/>
        <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
      </providers>
    </profile>
    <roleManager enabled="false">
      <providers>
        <clear/>
        <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" />
        <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" />
      </providers>
    </roleManager>
    <pages>
    <namespaces>
      <clear/>
      <add namespace="System"/>
      <add namespace="System.Collections"/>
      <add namespace="System.Collections.Generic"/>
      <add namespace="System.Collections.Specialized"/>
      <add namespace="System.Configuration"/>
      <add namespace="System.Text"/>
      <add namespace="System.Text.RegularExpressions"/>
      <add namespace="System.Linq"/>
      <add namespace="System.Xml.Linq"/>
      <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>
    <controls>
      <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    </controls>
    </pages>
  </system.web>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>

</configuration>








我正在使用:vs 2010 Ultimate与accdb 2007.!









i am using : vs 2010 ultimate with accdb 2007.!


thanks for your guys!!

推荐答案

ustcAmar写道:
ustcAmar wrote:

< forms loginurl =〜WebForm.aspx"超时="2880">

<forms loginurl="~WebForm.aspx" timeout="2880">



看起来loginUrl格式不正确.
loginUrl =〜WebForm.aspx" 反斜杠在要定向的页面名称之前缺失.

放置为:



Looks like the loginUrl is not formed correctly.
loginUrl="~WebForm.aspx" backslash is missing here before page name to be directed.

Put as:

<forms loginUrl="~/WebForm.aspx" timeout="2880" />


这篇关于在本地主机和服务器中,asp.net页面的内容不同,为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆