MVC 4 System.ArgumentException:不支持關鍵字:'initialcatalog'

[英]MVC 4 System.ArgumentException: Keyword not supported: 'initialcatalog'


Currently having some trouble when running my web app. I go to run it followed by it hitting an unhandled exception.

目前在運行我的網絡應用時遇到一些麻煩。我去運行它然后它遇到一個未處理的異常。

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

描述:執行當前Web請求期間發生未處理的異常。請查看堆棧跟蹤以獲取有關錯誤及其源自代碼的位置的更多信息。

Exception Details: System.ArgumentException: Keyword not supported: 'initialcatalog'.

異常詳細信息:System.ArgumentException:不支持關鍵字:'initialcatalog'。

Line 42:             catch (Exception ex)
Line 43:             {
Line 44:                 throw ex;
Line 45:             }
Line 46:             finally

Here's my Web.Config Connection string as well.

這是我的Web.Config連接字符串。

<connectionStrings>
<add name="ApplicationDb" providerName="System.Data.SqlClient" connectionString="Data Source= \SQLEXPRESS;InitialCatalog=aspnet-MvcApplication5-20130311122440;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnet-MvcApplication5-20130311122440.mdf" />

1 个解决方案

#1


2  

The keyword is actually Initial Catalog <-- notice the space

關鍵字實際上是初始目錄< - 注意空格


注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2013/04/17/72542b57a1541240f60da064220473a8.html



 
粤ICP备14056181号  © 2014-2021 ITdaan.com