当前位置:编程学习 > C#/ASP.NET >>

跪求:网站发布上后用户无法登录,请教什么原因?

网站开发时,使用VS2005默认的ASPNETDB.MDF,上传后数据库改成了服务器上的名,在配置文件中Memebershipprovder的连接字符也作了相应的修改,但无法登录!其它数据显示正常,尝试用本机程序去访问远程数据库时可以正常登录!错误提示。网址:www.ynts35.com,请高手指点!!!!!!谢谢
--------------------编程问答-------------------- 连接字符串看看 --------------------编程问答-------------------- 如果是用默认的ASPNETDB.MDF数据库的话,有点麻烦了,应该是和服务器的设置有关。
把ASPNETDB.MDF数据库中的表建在你自定义的数据库里吧!就是不要单独建ASPNETDB.MDF数据库。 --------------------编程问答--------------------
引用 2 楼 freeflying1222 的回复:
如果是用默认的ASPNETDB.MDF数据库的话,有点麻烦了,应该是和服务器的设置有关。 
把ASPNETDB.MDF数据库中的表建在你自定义的数据库里吧!就是不要单独建ASPNETDB.MDF数据库。
是的. --------------------编程问答-------------------- 非常感谢您们,我的数据库没有用ASPNETDB.MDF,就是自己定义,我是在本址用ASPNETDB.MDF自动编写脚本后,在服务器上的数据库中执行生成一模一样的表呀! --------------------编程问答-------------------- 数据库的连接应该没有问题,因为其它表数据可以正常读出来,而且注册添加用户也可以添加进去的,就是无法登录 --------------------编程问答-------------------- 本地和服务器上俄链接字符不一样啊   --------------------编程问答-------------------- 我是这样写的呀:

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
  <connectionStrings>
    <add name="ConStr" connectionString="Data Source=61.152.93.88;Initial Catalog=mydatabase;Persist Security Info=True;User ID=sujk;Password=xxxx" providerName="System.Data.SqlClient"/>
  </connectionStrings>
    <system.web>
    
    <membership defaultProvider="SQLMembershipProvider">
      <providers>
        <add name="SQLMembershipProvider"
        type="System.Web.Security.SqlMembershipProvider" 
        connectionStringName="ConStr" 
        applicationName=".NET Pet Shop 4.0" 
        enablePasswordRetrieval="false" 
        enablePasswordReset="true" 
        requiresQuestionAndAnswer="false" 
        requiresUniqueEmail="false" 
        passwordFormat="Hashed"/>
      </providers>
    </membership> --------------------编程问答-------------------- 错误提示是这样的:

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> 
请指点一下!谢谢!我的网址:www.ynts35.com 
补充:.NET技术 ,  ASP.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,