.Net web项目怎么配置连接本地数据库

妈咿呀嘿 2017-10-22 01:14:54
<?xml version="1.0" encoding="utf-8"?>
<!--
有关如何配置 ASP.NET 应用程序的详细信息,请访问
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<configSections>
<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data" requirePermission="false" />
</configSections>
<connectionStrings>
<add name="Database" connectionString="Data Source=112.74.84.227\SQLEXPRESS,1433;User ID=sa;Password=yulegeyan;Persist Security Info=False;Initial Catalog=bds230025673_db;Connect Timeout=40;" providerName="System.Data.SqlClient" />
</connectionStrings>

<dataConfiguration defaultDatabase="Database" />
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
<httpModules>
<add name="authModule" type="Prophecy.Web.Admin.AuthHttpModule,CAPS.Portal" />
</httpModules>
</system.web>
<system.webServer>
<modules>
<!--<remove name="FormsAuthentication" />-->
<add name="authModule" type="Prophecy.Web.Admin.AuthHttpModule,Prophecy.Web.Admin" preCondition="integratedMode" />
</modules>
<handlers>
<add name="ajaxMvcHandler" path="*.jx" verb="*" type="Lib.Web.Mvc.JxMvcHttpHandler,LibCore" preCondition="integratedMode" />
<add name="ajaxMvcHandlerWatch" path="*.jxhtml" verb="*" type="Lib.Web.Mvc.JxMvcHttpHandler,LibCore" preCondition="integratedMode" />
</handlers>
<validation validateIntegratedModeConfiguration="false" />
</system.webServer>
<appSettings>
<add key="Configpath" value="~/site.config" />
<add key="ControllerAssemblies" value="Prophecy.AjaxHandler" />
<add key="SysAdmin" value="9C0088AD-A2BC-457C-809E-82465E10D5B2" />
</appSettings>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
之前没接触过.Net的Web项目
想配置到本地MySQL数据上,怎么做?

...全文
633 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
妈咿呀嘿 2017-10-24
  • 打赏
  • 举报
回复
非常感谢!!
丰云 2017-10-23
  • 打赏
  • 举报
回复
丰云 2017-10-23
  • 打赏
  • 举报
回复
知道c#连接mysql的连接条件和连接字符串写法吗? 百度一下吧,很多的

62,243

社区成员

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

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

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

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