日期:2014-05-16  浏览次数:21286 次

域名访问问题
为什么直接输入域名会弹出下面这个:如(www.xxx.com)




这样访问如(www.xxx.com/xx/index.aspx)就可以访问。

注:
1.iis配置了匿名访问。

2.Web.config如下:

?xml version="1.0"?>
<configuration>
<connectionStrings>
  <add name="sellConnectionString" connectionString="Data Source=.;Initial Catalog=sell;User ID=sa;Password=sa123"
  providerName="System.Data.SqlClient" />
 </connectionStrings>
 <appSettings>
<!-- 连接字符串是否加密 -->
<add key="ConStringEncrypt" value="false"/>
<!-- 数据库连接字符串,(如果采用加密方式,上面一项要设置为true;加密工具,可在官方下载,
  如果使用明文这样server=127.0.0.1;database=.....,上面则设置为false。 -->
<add key="ConnectionString" value="Data Source=.;Initial Catalog=sell;User ID=sa;Password=sa123"/>
<!-- Maticsoft.Accounts权限角色管理模块连接字符串-->
<add key="ConnectionStringAccounts" value="server=127.0.0.1;database=codematic;uid=sa;pwd=sa123"/>
  <!--其它模块连接字符串,可以不断增加以便同一个项目支持连接多个数据库。如果没有,可以删除该行-->
<add key="ConnectionString2" value="server=127.0.0.1;database=codematic2;uid=sa;pwd=sa123"/>
<!--虚拟目录名称(如果是站点,则为空) -->
<add key="VirtualPath" value=""/>
<!--登录页地址 -->
<add key="LoginPage" value="admin/Login.aspx"/>
<!--默认菜单是否是展开状态-->
<add key="MenuExpanded" value="false"/>
<!--实体对象内容缓村的时间(分钟)-->
<add key="ModelCache" value="30"/>
</appSettings>
<system.web>
   

<httpRuntime executionTimeout="3600" maxRequestLength="1048576" requestValidationMode="2.0"/>
<compilation debug="true" targetFramework="4.0"></compilation>

<identity impersonate="true"/>
<authentication mode="Forms">
<forms name="forums" path="/" loginUrl="Login.aspx" protection="All" timeout="40">
</forms>
</authentication>
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID" validateRequest="false" />
</system.web>
</configuration>


------解决方案--------------------
检查下你的网站根目录有没有设置好
当前设置的目录+ /xx/index.aspx