0

在从堆栈溢出和其他论坛搜索我的问题的答案后,我将自己问它,可能有人可以指导我并使用 asp.net 编程让我的方式变得简单。

我在将值从我的实时网站保存到数据库时遇到问题,但我一直出错。

说明:服务器上发生应用程序错误。此应用程序的当前自定义错误设置阻止远程查看应用程序错误的详细信息(出于安全原因)。但是,它可以被本地服务器机器上运行的浏览器查看。

详细信息:要在远程计算机上查看此特定错误消息的详细信息,请在位于当前 Web 应用程序根目录的“web.config”配置文件中创建一个标签。然后,此标记应将其“模式”属性设置为“关闭”。

我试图通过在我的 web.config 中放置 mode=off 来查看它,但我无法查看我的错误的详细信息。

这是我的 web.config

<?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>

    <system.web>
      <customErrors mode="Off"/>
      <compilation debug="true"/>
      <authentication mode="None"/>
    </system.web>
  <location allowOverride="true">
    <appSettings>

      <add key="#" value="Password=#;Persist Security Info=True;User ID=#;Initial Catalog=#;Data Source=#"/>

    </appSettings>
  </location>
</configuration>

我已经使用我的项目的本地解决方案在我的实时数据库上测试了我的数据库和我的连接字符串,但是当我尝试使用我的实时服务器(arvixe)测试它时,我无法做到。

我的朋友建议我使用

<connectionStrings>
    <add name="#" connectionString="Data Source=#;Initial Catalog=#;Integrated Security=True" providerName="System.Data.SqlClient"/>    
  </connectionStrings>

但它不适用于实时服务器。我正在使用连接字符串的应用程序设置,我对它很有信心,因为它可以在我的本地和实时数据库中正常工作。

我要求开发人员测试我的在线古兰经阅读页面并尝试弄清楚。

4

1 回答 1

1

如果您使用的是 Sql Express,请尝试使用此连接字符串

Data Source=.\SQLEXPRESS;DataBase=DBName;User ID=abcd;Password=xxxx;

据我所知Integrated Security=Truewindows authentication. 如果您想使用此选项,请将其更改<authentication mode="None"/><authentication mode="Windows"/>.

如果您使用的是 Sql Server,可以尝试以下连接字符串

标准连接字符串

Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;

可信连接

Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;

于 2013-04-18T18:45:56.383 回答