0

エラーが発生しています

SqlException (0x80131904): ユーザー 'raam030' のログインに失敗しました

ASP.NET MVC4 アプリケーション用です。ローカル SQL Server を使用して開発マシンで正常に動作しますが、Web ホスティングに展開すると、これが得られます。同じ質問を検索しましたが、たくさんありますが、これまでのところ役に立ちませんでした。

以下にスタック トレースを示します。トリプルチェックを行い、接続文字列が正しく、SQL Server 認証が正しいことを確認しました。ホスティング サービスの接続文字列にはパスワード情報は必要ありませんが、ハード コーディングされたパスワードとユーザー名を使用する場合と使用しない場合のバリエーションを試してみました。

<connectionStrings>
   <add name="RMSDelta" 
        connectionString="Data Source=mssql2.openhost.net.nz;Integrated Security=False;User ID=myusername; Password=mypassword;Connect Timeout=15;Encrypt=False;Network Library=dbmssocn;Packet Size=4096" 
        providerName="System.Data.SqlClient" />
</connectionStrings>

コードファーストアプローチを使用しています。私のデータベース名は、接続文字列名として使用したものと同じです。コンテキストクラスで接続文字列として渡すために使用した名前と同じです。プロバイダー名が正しいことを確認してください。データ アクセス部分 (およびデータが必要なページ) を除いて、他のすべてのページはアプリケーションで正常に動作します.. このスタック トレースから他に何を作成すればよいか本当にわかりません。

私を助けてください。

スタックトレース:

[SqlException (0x80131904): ユーザー 'raam030' のログインに失敗しました。]
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +1316
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +108
System.Data.ProviderBase .DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +126
System.Data.SqlClient.SqlConnection.Open() +125 System.Data.SqlClient.SqlProviderServices.UsingConnection
(SqlConnection sqlConnection, Action 1 act) +349 System.Data.SqlClient .SqlProviderServices.GetDbProviderManifestToken(DbConnection 接続) +265 System.Data.Common.DbProviderServices.GetProviderManifestToken(DbConnection 接続) +34 1 act) +85
System.Data.SqlClient.SqlProviderServices.UsingMasterConnection(SqlConnection sqlConnection, Action


[ProviderIncompatibleException: プロバイダーは ProviderManifestToken 文字列を返しませんでした。]
System.Data.Common.DbProviderServices.GetProviderManifestToken(DbConnection 接続) +163
System.Data.Entity.ModelConfiguration.Utilities.DbProviderServicesExtensions.GetProviderManifestTokenChecked(DbProviderServices providerServices、DbConnection 接続) +40

[ProviderIncompatibleException: データベースからプロバイダー情報を取得中にエラーが発生しました。これは、不適切な接続文字列を使用する Entity Framework が原因である可能性があります。内部例外で詳細を確認し、接続文字列が正しいことを確認してください。]

System.Data.Entity.ModelConfiguration.Utilities.DbProviderServicesExtensions.GetProviderManifestTokenChecked(DbProviderServices providerServices、DbConnection 接続) +163
System.Data.Entity.ModelConfiguration.Utilities.DbConnectionExtensions.GetProviderInfo(DbConnection 接続、DbProviderManifest& providerManifest) +39
System.Data.Entity. DbModelBuilder.Build(DbConnection providerConnection) +46
System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext internalContext) +62
System.Data.Entity.Internal.RetryLazy 1.Initialize() +56 System.Data.Entity.Internal. Linq.InternalSet 1.System.Collections.Generic.IEnumerable.GetEnumerator() +40 System.Linq.WhereSelectEnumerableIterator2.GetValue(TInput input) +117
System.Data.Entity.Internal.LazyInternalContext.InitializeContext() +453
System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) +18
System.Data.Entity.Internal.Linq.InternalSet

1.GetEnumerator() +15
System.Data.Entity.Infrastructure.DbQuery

2.MoveNext() +63
ASP._Page_Views_Default_Qualifications_cshtml.Execute() in d:\vhosts\rameshsivaraman.me\httpdocs\Views\Default\Qualifications.cshtml:45
System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +209
System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +104
System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +78
System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +234
System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +107
System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +291
System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +13
System.Web.Mvc.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17() +23
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func
1 継続) +264
System.Web.Mvc.<>c_ DisplayClass1c.b _19() +20
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList 1.End() +50 System.Web.Mvc.Async .AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +26 System.Web.Mvc.<>c_ DisplayClass1d.b _18(IAsyncResult asyncResult) +14 System.Web.Mvc.Async.<>c_ DisplayClass4.b _3(IAsyncResult ar) +25 System.Web.Mvc.Async.WrappedAsyncResult 1.End() +55 System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +281 filters, ActionResult actionResult) +176
System.Web.Mvc.Async.<>c__DisplayClass2a.<BeginInvokeAction>b__20() +71
System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +128
System.Web.Mvc.Async.WrappedAsyncResult




1.End() +55
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +41
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +25
System.Web.Mvc.Async.WrappedAsyncResult


System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
System.Web.Mvc.<>c_ DisplayClass8.b _3(IAsyncResult asyncResult) +28
System.Web.Mvc. Async.<>c_ DisplayClass4.b _3(IAsyncResult ar) +25
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +55
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +30
System.Web .Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult 結果) +9
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9041917
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously ) +184

4

1 に答える 1