leo*_*mig 2 .net asp.net subsonic
我想使用SubSonic,因为它说它易于使用并节省时间.
尝试获取MySQL的连接字符串3小时后,我即将放弃它.
Building configuration from C:\Documents and Settings\user\My Documents\Visual Studio 2
008\Projects\ConfigurationItems\ConfigurationItemsMVC\Web.config
Adding connection to MySqlDataProvider
ERROR: Trying to execute generate
Error Message: System.ArgumentException: Format of the initialization string does not conform to specification starting at index 0.
Run Code Online (Sandbox Code Playgroud)
我无法转移它:错误消息:System.ArgumentException:初始化字符串的格式不符合从索引0开始的规范.
我每次尝试运行subsonic.exe/generate都会得到它
这一切都很容易!
这是我的Web.Config
<!-- connectionString="Persist Security Info=False;database=config;server=localhost;user id=config;Password=config" -->
<connectionStrings>
<remove name="ConfigConnectString"/>
<add name="ConfigConnectString" connectionString="Persist Security Info=False;database=config;server=localhost;user id=userid;Password=password" providerName="MySql.Data.MySqlClient"
/>
</connectionStrings>
<SubSonicService defaultProvider="ConfigDatabase">
<providers>
<add type="SubSonic.MySqlDataProvider, SubSonic"
name="MySqlDataProvider"
generatedNamespace="Config"
connectionStringName="ConfigConnectString"
/>
</providers>
</SubSonicService>
Run Code Online (Sandbox Code Playgroud)
我尝试过几件事:
(其他连接字符串:"Server = localhost; Database = config; Uid = user; Pwd = password;" - "blah"/"anything"会抛出相同的错误...)
没有快乐!非常接近放弃SubSonic.如果可以的话请帮忙!
顺便说一下,我使用的是Subsonic 2.2
我是个白痴:
<SubSonicService defaultProvider="ConfigDatabase">
Run Code Online (Sandbox Code Playgroud)
应该:
<SubSonicService defaultProvider="MySqlDataProvider">
Run Code Online (Sandbox Code Playgroud)
卫生署!
| 归档时间: |
|
| 查看次数: |
4523 次 |
| 最近记录: |