我在Windows Server 2003上配置了IIS 6.0,运行ASP和HTML,我已经配置了一个FTP站点来通过Visual Studio 2010更新asp.net,VStudio使得该发布在网站文件夹中创建这些文件:< / p>
Web.config
Site.Master
Site1.Master
Global.asax
Default.aspx
About.aspx
Styles
Scripts
bin
Account
当我尝试运行default.aspx时出现此错误:
分析器的消息错误:未识别的部分:'connectionStrings'
Line 9:
Line 10: <configuration>
Line 11: <connectionStrings>
Line 12: <add name="ApplicationServices"
Line 13: connectionString="data source= 192.168.1.2; ;Initial Catalog =ifdcontroladoria3;uid =sa;pwd = admin2012"
这是webconfig的代码
<?xml version="1.0"?>
<configuration>
<connectionStrings>
<add name="ApplicationServices"
connectionString="Data Source=192.168.1.2 ;Initial Catalog =ifdcontrol;uid =sa;pwd = evita"
providerName="System.Data.SqlClient" />
</connectionStrings>
服务器192.168.1.2或MAQ001在IIS 6.0的同一台计算机上,我做错了什么?
答案 0 :(得分:2)
<connectionStrings>
<add name="ConnectionString" providerName="MySql.Data.MySqlClient"
connectionString="Data Source=127.0.0.1; port=3306; Initial Catalog=*DbName*;
uid=root; pwd=*password*;"/>
</connectionStrings>
答案 1 :(得分:1)
确保已为应用程序池将ASP.NET版本设置为2.0或更高版本。看起来你遇到了这个问题 - http://social.msdn.microsoft.com/forums/en-US/csharpgeneral/thread/f3df53fe-666b-4a98-92d2-d6e4ba52552a/。