This project is read-only.

data access using entlib4.1 from solution projects asp.net c#

Apr 13, 2010 at 7:34 PM

Unable to connect to database whilst on hosting server.

I have published this up to my hosting company.
I am puzzled as to why the error location points to C:\VS2005WebPrj\RFhome\RFJ.DataAccess .....

as this is no longer valid, as i'm on the server root now.

Am i missing some setup from my project properties in vs2008 before i publish ??

Or is this really todo with permissions.


my data connectionis fine when i run locally through vs and connected to my hosting database. So the connection string is ok.

much appreciated for any advise

rich.


error:
The current build operation (build key Build Key[Microsoft.Practices.EnterpriseLibrary.Data.Database, MSSQLCONN]) failed: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. (Strategy type ConfiguredObjectStrategy, index 2)  ____ <br/>   at Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context)
   at Microsoft.Practices.ObjectBuilder2.Builder.BuildUp(IReadWriteLocator locator, ILifetimeContainer lifetime, IPolicyList policies, IStrategyChain strategies, Object buildKey, Object existing)
   at Microsoft.Practices.ObjectBuilder2.Builder.BuildUp[TTypeToBuild](IReadWriteLocator locator, ILifetimeContainer lifetime, IPolicyList policies, IStrategyChain strategies, Object buildKey, Object existing)
   at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.EnterpriseLibraryFactory.BuildUp[T](IReadWriteLocator locator, ILifetimeContainer lifetimeContainer, String id, IConfigurationSource configurationSource)
  
   in C:\VS2005WebPrj\RFhome\Common\Configuration\ObjectBuilder\EnterpriseLibraryFactory.cs:line 229
   at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.EnterpriseLibraryFactory.BuildUp[T](String id, IConfigurationSource configurationSource) in C:\VS2005WebPrj\RFhome\Common\Configuration\ObjectBuilder\EnterpriseLibraryFactory.cs:line 168
   at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.NameTypeFactoryBase`1.Create(String name) in C:\VS2005WebPrj\RFhome\Common\Configuration\ObjectBuilder\NameTypeFactoryBase.cs:line 64
   at RFJ.DataAccess.DataBaseEnterPriseHelper..ctor(String configurationfile, String provider) in C:\VS2005WebPrj\RFhome\RFJ.DataAccess\DataBaseEnterPriseHelper.cs:line 210
   at RFJ.DataAccess.Select.ProductCategorySelectData.Get() in C:\VS2005WebPrj\RFhome\RFJ.DataAccess\Select\ProductCategorySelectData.cs:line 22
   at RFJ.BusinessLogic.ProcessGetProductCategory.Invoke() in C:\VS2005WebPrj\RFhome\RFJ.BusinessLogic\ProcessGetProductCategory.cs:line 45
   at ProductManager.GetProductCategories()