如何修复连接字符串问题 [英] how to fix connection string problem

查看:93
本文介绍了如何修复连接字符串问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在服务器上上传了mvc项目,但是我没有运行,

这是我的连接字符串。

I have uploaded mvc project on server, but i am unble run,
This is my connection string.

add name="FormsEntities2" connectionString="Data Source=hostname;Initial Catalog=database name;User ID=username;Password=password;" providerName="System.Data.SqlClient"



但我收到此错误,


but i am getting this error,

"Code generated using the T4 templates for Database First and Model First development may not work correctly if used in Code First mode. To continue using Database First or Model First ensure that the Entity Framework connection string is specified in the config file of executing application. To use these classes, that were generated from Database First or Model First, with Code First add any additional configuration using attributes or the DbModelBuilder API and then remove the code that throws this exception"



如果有人知道的话请帮助我。

提前谢谢。


if anybody knows please help me.
Thanks in advance.

推荐答案

这个问题在这里 [ ^ ]



我认为你应该通过不要错误地使用Code First [ ^ ]
This problem has been answered quite thoroughly over here[^]

also I think you should go through Don’t use Code First by mistake[^]


这篇关于如何修复连接字符串问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆