网站发布

huweiwo 2009-09-15 09:20:53
在http://www.51.net/上注册了一个基础版域名试用,把我自己用VS2005做的网站传上去后出现Server Error in '/' Application.错误,是不是这不行connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=E:\0205318zhcp_bylw\App_Data\xszhcp_Data.MDF;Integrated Security=true;User Instance=True"
应怎么改才好?
...全文
115 17 打赏 收藏 转发到动态 举报
写回复
用AI写文章
17 条回复
切换为时间正序
请发表友善的回复…
发表回复
fengyeng 2009-09-16
  • 打赏
  • 举报
回复
把错误信息打开,就可以看到真实的错误页面和代码了!
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
huweiwo 2009-09-15
  • 打赏
  • 举报
回复
现在我的数据库链接正常了,可是还是出现这个问题,还会是什么原因呢?
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>


春天的气息 2009-09-15
  • 打赏
  • 举报
回复
=.\SQLEXPRESS

是sql server的另一版本吧!连接方法不一样的。
huweiwo 2009-09-15
  • 打赏
  • 举报
回复
传到服务器上的SQL数据库和网叶文件都是在同一个根目录下public_html的文件夹里,还是要分开传的?

huweiwo 2009-09-15
  • 打赏
  • 举报
回复
正在做测试,
wiki14 2009-09-15
  • 打赏
  • 举报
回复
楼主为什么不试试小生的方法呢?
wuyi8808 2009-09-15
  • 打赏
  • 举报
回复
connectionString = "server=服务器名或IP;database=数据库名;uid=用户名;pwd=密码"; 
wuyq11 2009-09-15
  • 打赏
  • 举报
回复
数据库要导入到提供商提供的sql server数据库里,再修改连接字符串。
connectionString="Data Source=(local);Initial Catalog=master;Persist Security Info=True;User ID=sa;Password=sa"


<add name="SqlConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True"/>
wuyi8808 2009-09-15
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 huweiwo 的回复:]
http://www.51.net/ 的服务器支持 SQLserver啊,
[/Quote]

那么,请向他要 SQL Server 数据库连接的用户名和密码,然后用3楼的连接串连接。
huweiwo 2009-09-15
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 wuyi8808 的回复:]
connectionString = "server=(local);uid=用户名;pwd=密码";

其中:用户名和密码问你的空间提供商。
[/Quote]

connectionString只用这三个参数就可以了吗?

zzxap 2009-09-15
  • 打赏
  • 举报
回复
打电话给客服
wiki14 2009-09-15
  • 打赏
  • 举报
回复
告诉楼主一个方法检测你的字符串是否正确。

在桌面新建个文本文件,把后缀名改为: .udl

然后双击,根据提示,看看字符串和你项目里的字符串是否正确。
huweiwo 2009-09-15
  • 打赏
  • 举报
回复
http://www.51.net/ 的服务器支持 SQLserver啊,
有没有哪位大侠在这个网站上发布过网站啊,指点一下
wuyi8808 2009-09-15
  • 打赏
  • 举报
回复
connectionString = "server=(local);uid=用户名;pwd=密码";

其中:用户名和密码问你的空间提供商。
wuyi8808 2009-09-15
  • 打赏
  • 举报
回复
要 http://www.51.net/ 的服务器支持 SQL 数据库才行。

62,046

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧