2013-08-06 1 views
2

Ghit을 사용하여 AppHarbor에 MVC4 응용 프로그램을 배포했으며 AppHarbor 응용 프로그램 프로젝트에 SQL Server 추가 기능을 추가했습니다. 이 프로젝트는 잘 구축하고 내가 로그인 버튼을 내 응용 프로그램의 URL로 이동하여 클릭하면 내가 다른 글에서 무엇을 말할 수에서 AppHarbor의 새 MVC4 응용 프로그램에 오류가 발생했습니다. 요청한 .Net Framework 데이터 공급자를 찾을 수 없습니다. 설치되지 않을 수도 있습니다.

Unable to find the requested .Net Framework Data Provider. It may not be installed. 

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. 

Exception Details: System.ArgumentException: Unable to find the requested .Net Framework Data Provider. It may not be installed. 

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

Stack Trace: 


[ArgumentException: Unable to find the requested .Net Framework Data Provider. It may not be installed.] 
    System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName) +77 
    WebMatrix.Data.DbProviderFactoryWrapper.CreateConnection(String connectionString) +48 
    WebMatrix.Data.<>c__DisplayClass15.<OpenConnectionStringInternal>b__14() +16 
    WebMatrix.Data.Database.get_Connection() +19 
    WebMatrix.Data.Database.EnsureConnectionOpen() +13 
    WebMatrix.Data.<QueryInternal>d__0.MoveNext() +66 
    System.Linq.Enumerable.FirstOrDefault(IEnumerable`1 source) +183 
    WebMatrix.Data.Database.QuerySingle(String commandText, Object[] args) +44 
    WebMatrix.WebData.DatabaseWrapper.QuerySingle(String commandText, Object[] parameters) +14 
    WebMatrix.WebData.SimpleMembershipProvider.CheckTableExists(IDatabase db, String tableName) +54 
    WebMatrix.WebData.SimpleMembershipProvider.CreateTablesIfNeeded() +57 
    WebMatrix.WebData.WebSecurity.InitializeMembershipProvider(SimpleMembershipProvider simpleMembership, DatabaseConnectionInfo connect, String userTableName, String userIdColumn, String userNameColumn, Boolean createTables) +81 
    WebMatrix.WebData.WebSecurity.InitializeProviders(DatabaseConnectionInfo connect, String userTableName, String userIdColumn, String userNameColumn, Boolean autoCreateTables) +52 
    WebMatrix.WebData.WebSecurity.InitializeDatabaseConnection(String connectionStringName, String userTableName, String userIdColumn, String userNameColumn, Boolean autoCreateTables) +60 
    ExploreGame01.Filters.SimpleMembershipInitializer..ctor() in d:\temp\uoppttzv.jeq\input\ExploreGame01\Filters\InitializeSimpleMembershipAttribute.cs:41 

[InvalidOperationException: The ASP.NET Simple Membership database could not be initialized. For more information, please see http://go.microsoft.com/fwlink/?LinkId=256588] 
    ExploreGame01.Filters.SimpleMembershipInitializer..ctor() in d:\temp\uoppttzv.jeq\input\ExploreGame01\Filters\InitializeSimpleMembershipAttribute.cs:45 

[TargetInvocationException: Exception has been thrown by the target of an invocation.] 
    System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0 
    System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +159 
    System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +251 
    System.Activator.CreateInstance(Type type, Boolean nonPublic) +87 
    System.Activator.CreateInstance(Type type) +6 
    System.Threading.LazyHelpers`1.ActivatorFactorySelector() +68 
    System.Threading.LazyInitializer.EnsureInitializedCore(T& target, Boolean& initialized, Object& syncLock, Func`1 valueFactory) +114 
    System.Threading.LazyInitializer.EnsureInitialized(T& target, Boolean& initialized, Object& syncLock) +113 
    ExploreGame01.Filters.InitializeSimpleMembershipAttribute.OnActionExecuting(ActionExecutingContext filterContext) in d:\temp\uoppttzv.jeq\input\ExploreGame01\Filters\InitializeSimpleMembershipAttribute.cs:21 
    System.Web.Mvc.Async.AsyncControllerActionInvoker.InvokeActionMethodFilterAsynchronously(IActionFilter filter, ActionExecutingContext preContext, Func`1 nextInChain) +77 
    System.Web.Mvc.Async.<>c__DisplayClass3b.<BeginInvokeActionMethodWithFilters>b__35() +22 
    System.Web.Mvc.Async.AsyncControllerActionInvoker.InvokeActionMethodFilterAsynchronously(IActionFilter filter, ActionExecutingContext preContext, Func`1 nextInChain) +543 
    System.Web.Mvc.Async.<>c__DisplayClass3b.<BeginInvokeActionMethodWithFilters>b__35() +22 
    System.Web.Mvc.Async.<>c__DisplayClass37.<BeginInvokeActionMethodWithFilters>b__31(AsyncCallback asyncCallback, Object asyncState) +201 
    System.Web.Mvc.Async.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +120 
    System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate`1 endDelegate, Object tag, Int32 timeout) +79 
    System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate`1 endDelegate, Object tag) +64 
    System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters, AsyncCallback callback, Object state) +162 
    System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__1e(AsyncCallback asyncCallback, Object asyncState) +512 
    System.Web.Mvc.Async.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +120 
    System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate`1 endDelegate, Object tag, Int32 timeout) +52 
    System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate`1 endDelegate, Object tag) +19 
    System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeAction(ControllerContext controllerContext, String actionName, AsyncCallback callback, Object state) +252 
    System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__17(AsyncCallback asyncCallback, Object asyncState) +37 
    System.Web.Mvc.Async.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +120 
    System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate`1 endDelegate, Object tag, Int32 timeout) +52 
    System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate endDelegate, Object tag, Int32 timeout) +37 
    System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate endDelegate, Object tag) +19 
    System.Web.Mvc.Controller.BeginExecuteCore(AsyncCallback callback, Object state) +284 
    System.Web.Mvc.Async.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +120 
    System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate`1 endDelegate, Object tag, Int32 timeout) +52 
    System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate endDelegate, Object tag, Int32 timeout) +37 
    System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate endDelegate, Object tag) +19 
    System.Web.Mvc.Controller.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state) +242 
    System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state) +15 
    System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__2(AsyncCallback asyncCallback, Object asyncState) +76 
    System.Web.Mvc.Async.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +120 
    System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate`1 endDelegate, Object tag, Int32 timeout) +52 
    System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate endDelegate, Object tag, Int32 timeout) +37 
    System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate endDelegate, Object tag) +19 
    System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +176 
    System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state) +48 
    System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +16 
    System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +875 
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +234 

내가 내 연결 문자열을 가진 데 문제가 있다는 것입니다 수 데이터 베이스. 그러나 AppHarbor에서 제공된 연결 문자열을 복사하여 web.config에 저장했습니다.

지금까지 로컬 호스트에서만 내 앱을 실행했고 모든 것이 항상 정상적으로 실행되었습니다. 누구든지 조언을 해 주실 수 있습니까?

+0

일반적으로 로컬 데이터베이스 인 간단한 데이터 공급자를 사용하려고합니다. 아마 로컬 데이터베이스를 포함하지 않았을 것입니다. – atbebtg

+1

initializeSimpleMembershipAttribute 코드를 볼 수 있습니까? (당연히 식별 정보를 수정하십시오) –

답변

0

밝혀졌습니다. 두 응용 프로그램 연결 문자열에 새 SQL Server 연결 문자열이 포함되지 않았습니다. 대부분의 응용 프로그램은 사용자 정의 연결 문자열을 사용하지만 DefaultConnection은 로그인 및 등록 페이지에 사용되었습니다.

나를 위해 제공된 연결 문자열을 DefaultConnection에 추가하면 모든 것이 정상적으로 작동합니다.

관련 문제