[提问]
请问版主500错误 <connectionStrings>引起的?
|
|
我的.net 数据库连接文件是写在web.config里的 把<connectionStrings>******</connectionStrings>注释掉网站就没有
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
的错误了,
在国内的主机上把<connectionStrings>******</connectionStrings>写在web.config里网站是可以正常运行的而放在GD里就不好用了,
请问<connectionStrings>******</connectionStrings>这个要写到那个文件呢?
会的朋友帮帮忙哈
[ 本帖最后由 25259238 于 2010-8-10 04:40 PM 编辑 ] |
|
|
|
|
|
|
|
|
|
|
add.c
发表于 2010-8-10 16:43:26
|
显示全部楼层
|
你的链接参数如何写的呢, 可以到help.goaddy.com里看看连接参数如何填写 |
|
|
|
|
|
|
|
|
|
|
add.c
发表于 2010-8-10 18:01:52
|
显示全部楼层
这个是3.5的例子
<connectionStrings>
<add name="Personal" connectionString=" Server=whsql-v04.prod.mesa1.secureserver.net; Database=DB_675; User ID=user_id; Password=password; Trusted_Connection=False" providerName="System.Data.SqlClient" /> <remove name="LocalSqlServer"/> <add name="LocalSqlServer" connectionString=" Server=whsql-v04.prod.mesa1.secureserver.net; Database=DB_675; User ID=user_id; Password=password; Trusted_Connection=False" providerName="System.Data.SqlClient" />
</connectionStrings> |
|
|
|
|
|
|
|
|
|
|
25259238
发表于 2010-8-10 18:21:52
|
显示全部楼层
回复 2# 的帖子
我是这样写的
<configuration>
<system.webServer>
<httpErrors errorMode="Detailed" />
<asp scriptErrorSentToBrowser="true"/>
</system.webServer>
<system.web>
<connectionStrings>
<add name="asdasd" connectionString="asdasd; Initial Catalog=asd56; User ID=asd6; Password=2344asd8" providerName="System.Data.SqlClient" />
</connectionStrings>
<customErrors mode="Off"/>
<compilation debug="true"/>
</system.web>
</configuration>
把<connectionStrings>
<add name="asdasd" connectionString="asdasd; Initial Catalog=asd56; User ID=asd6; Password=2344asd8" providerName="System.Data.SqlClient" />
</connectionStrings> 注释掉后静态页就能浏览 不注释静态页无法浏览 出现以下错误
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed. |
|
|
|
|
|
|
|
|
|
|
add.c
发表于 2010-8-10 19:26:17
|
显示全部楼层
|
|
|
|
|
|
|
|
|
|
25259238
发表于 2010-8-10 23:39:13
|
显示全部楼层
回复 5# 的帖子
版主 我根据你上面提供的代码修改了 还是不好用 提示:
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
我发现只要我的web.config里出现 <connectionStrings>标签就会报上面的错误,
是不是权限问题,如果方便的话我可以把密码提供给你 |
|
|
|
|
|
|
|
|
|
|
add.c
发表于 2010-8-11 14:06:16
|
显示全部楼层
|
|
|
|
|
|
|
|