Version 2.0 and MVC Hosting

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
Hi guys,

I have uploaded the version 2.0 and while loading got an error "403 - Forbidden: Access is denied."

I checked with my provider and he supports ASP.NET 4.0 with MVC.

I guess It might be a routing issue hence I find the following documents - section "Adding Extensions to the Route Table"

http://www.asp.net/mvc/tutorials/using-asp-net-mvc-with-different-versions-of-iis-cs

Now my question is under Global.asax I found only the below line of code so where to implement the code given by the above link??

<%@ Application Codebehind="Global.asax.cs" Inherits="Nop.Web.MvcApplication" Language="C#" %>

Anyone has got a similar issues?

Thanks for your help.
12 years ago
What IIS version do you have?
12 years ago
Version 7.0
12 years ago
Does your site files have required permissions for NETWORKSERVICE?
12 years ago
hmmmm...

I see what r u talking about!!

Let me check and I ll get back to u!!!

Thanks.
12 years ago
Hi Andrey,

The previous issue got resolved...thanks for the hint!

While loading the version 2.0 Now I m getting the below one :(

for testing purpose I installed the version 1.9 and it didnt had any issues with the credentials while installing the database...

I believe in MVC the database is created on the fly - right ?

can we add a connectionstring entry into the web.config for the version 2.0

Any clues please ?



Server Error in '/' Application.
--------------------------------------------------------------------------------

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
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.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

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:


[SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)]
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +5064474
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +234
   System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity) +341
   System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, SqlConnection owningObject) +129
   System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout) +239
   System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, TimeoutTimer timeout, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +195
   System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +232
   System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +185
   System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +33
   System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +524
   System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
   System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +479
   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) +85
   System.Data.SqlClient.SqlProviderServices.UsingMasterConnection(SqlConnection sqlConnection, Action`1 act) +349
   System.Data.SqlClient.SqlProviderServices.GetDbProviderManifestToken(DbConnection connection) +265
   System.Data.Common.DbProviderServices.GetProviderManifestToken(DbConnection connection) +34

[ProviderIncompatibleException: The provider did not return a ProviderManifestToken string.]
   System.Data.Common.DbProviderServices.GetProviderManifestToken(DbConnection connection) +163
   System.Data.Entity.ModelConfiguration.Utilities.DbConnectionExtensions.GetProviderInfo(DbConnection connection, DbProviderManifest& providerManifest) +40
   System.Data.Entity.DbModelBuilder.Build(DbConnection providerConnection) +157
   System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext internalContext) +51
   System.Data.Entity.Internal.RetryLazy`2.GetValue(TInput input) +117
   System.Data.Entity.Internal.LazyInternalContext.InitializeContext() +407
   System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) +17
   System.Data.Entity.Internal.Linq.InternalSet`1.Initialize() +62
   System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext() +15
   System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider() +37
   System.Linq.Queryable.OrderBy(IQueryable`1 source, Expression`1 keySelector) +66
   Nop.Services.Configuration.SettingService.<GetAllSettings>b__1() in D:\nopCommerce_2.00_Source\Libraries\Nop.Services\Configuration\SettingService.cs:183
   Nop.Core.Caching.CacheExtensions.Get(ICacheManager cacheManager, String key, Int32 cacheTime, Func`1 acquire) in D:\nopCommerce_2.00_Source\Libraries\Nop.Core\Caching\Extensions.cs:23
   Nop.Core.Caching.CacheExtensions.Get(ICacheManager cacheManager, String key, Func`1 acquire) in D:\nopCommerce_2.00_Source\Libraries\Nop.Core\Caching\Extensions.cs:12
   Nop.Services.Configuration.SettingService.GetAllSettings() in D:\nopCommerce_2.00_Source\Libraries\Nop.Services\Configuration\SettingService.cs:181
   Nop.Services.Configuration.SettingService.GetSettingByKey(String key, T defaultValue) in D:\nopCommerce_2.00_Source\Libraries\Nop.Services\Configuration\SettingService.cs:114
   Nop.Services.Configuration.ConfigurationProvider`1.<BuildConfiguration>b__3(PropertyInfo prop) in D:\nopCommerce_2.00_Source\Libraries\Nop.Services\Configuration\ConfigurationProvider.cs:28
   System.Linq.WhereSelectArrayIterator`2.MoveNext() +85
   System.Linq.WhereSelectEnumerableIterator`2.MoveNext() +87
   System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +327
   System.Linq.Enumerable.ToList(IEnumerable`1 source) +58
   Nop.Services.Configuration.ConfigurationProvider`1.BuildConfiguration() in D:\nopCommerce_2.00_Source\Libraries\Nop.Services\Configuration\ConfigurationProvider.cs:35
   Nop.Services.Configuration.ConfigurationProvider`1..ctor(ISettingService settingService) in D:\nopCommerce_2.00_Source\Libraries\Nop.Services\Configuration\ConfigurationProvider.cs:16

[DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor(Nop.Services.Configuration.ISettingService)' on type 'ConfigurationProvider`1'.]
   Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() +261
   Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) +182
   Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) +48
   Autofac.Core.Resolving.InstanceLookup.Execute() +48
   Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters) +164
   Autofac.Core.Resolving.InstanceLookup.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters) +23
   Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance) +72
   Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters) +54
   Autofac.ResolutionExtensions.Resolve(IComponentContext context, IEnumerable`1 parameters) +121
   Autofac.ResolutionExtensions.Resolve(IComponentContext context) +53
   Nop.Web.Framework.SettingsSource.<BuildRegistration>b__5(IComponentContext c, IEnumerable`1 p) in D:\nopCommerce_2.00_Source\Presentation\Nop.Web.Framework\DependencyRegistrar.cs:261
   Autofac.Builder.<>c__DisplayClass1`1.<ForDelegate>b__0(IComponentContext c, IEnumerable`1 p) +17
   Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) +30
   Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) +48
   Autofac.Core.Resolving.InstanceLookup.<Execute>b__6() +12
   Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func`1 creator) +106
   Autofac.Core.Resolving.InstanceLookup.Execute() +132
   Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters) +164
   Autofac.Core.Resolving.InstanceLookup.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters) +23
   Autofac.Core.Activators.Reflection.<>c__DisplayClass2.<CanSupplyValue>b__0() +31
   Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() +111
   Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) +182
   Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) +48
   Autofac.Core.Resolving.InstanceLookup.<Execute>b__6() +12
   Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func`1 creator) +106
   Autofac.Core.Resolving.InstanceLookup.Execute() +132
   Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters) +164
   Autofac.Core.Resolving.InstanceLookup.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters) +23
   Autofac.Core.Activators.Reflection.<>c__DisplayClass2.<CanSupplyValue>b__0() +31
   Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() +111
   Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) +182
   Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) +48
   Autofac.Core.Resolving.InstanceLookup.<Execute>b__6() +12
   Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func`1 creator) +106
   Autofac.Core.Resolving.InstanceLookup.Execute() +132
   Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters) +164
   Autofac.Core.Resolving.InstanceLookup.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters) +23
   Autofac.Core.Activators.Reflection.<>c__DisplayClass2.<CanSupplyValue>b__0() +31
   Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() +111
   Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) +182
   Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) +48
   Autofac.Core.Resolving.InstanceLookup.<Execute>b__6() +12
   Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func`1 creator) +106
   Autofac.Core.Resolving.InstanceLookup.Execute() +132
   Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters) +164
   Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable`1 parameters) +70
   Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters) +154
   Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance) +72
   Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters) +54
   Autofac.ResolutionExtensions.Resolve(IComponentContext context, IEnumerable`1 parameters) +121
   Autofac.ResolutionExtensions.Resolve(IComponentContext context) +53
   Nop.Core.Infrastructure.DependencyManagement.ContainerManager.Resolve(String key) in D:\nopCommerce_2.00_Source\Libraries\Nop.Core\Infrastructure\DependencyManagement\ContainerManager.cs:118
   Nop.Core.Infrastructure.NopEngine.Resolve() in D:\nopCommerce_2.00_Source\Libraries\Nop.Core\Infrastructure\NopEngine.cs:114
   Nop.Web.MvcApplication.SetWorkingCulture() in D:\nopCommerce_2.00_Source\Presentation\Nop.Web\Global.asax.cs:134
   Nop.Web.MvcApplication.Application_AuthenticateRequest(Object sender, EventArgs e) in D:\nopCommerce_2.00_Source\Presentation\Nop.Web\Global.asax.cs:96
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.237
12 years ago
[email protected] wrote:
I believe in MVC the database is created on the fly - right ?

No, a database should be created prior install
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.