A couple path related issues

Nov 13, 2010 at 2:41 AM

I got the latest bits, and ran into a couple issues.  They're easy to work around once you know what it is, but can be a pain to identify, so I'll share.

The first is that the connection string is set to:

    <add name="GalleryFeedEntities" connectionString="Data Source=|DataDirectory|../../GalleryFeed.sdf" providerName="System.Data.SqlServerCe.4.0" />

This causes the path to the sdf file to be outside the app root, which caused an error:

    Access to the database file is not allowed. [ File name = D:\Code\NuGet\GalleryServer\GalleryServer\src\Gallery.Server\App_Data\../../GalleryFeed.sdf ]

The fix was to change it to go into App_Data:

  <add name="GalleryFeedEntities" connectionString="Data Source=|DataDirectory|GalleryFeed.sdf" providerName="System.Data.SqlServerCe.4.0" />


The second issue was with the plugin folder, which AppSettings.config sets to "plugins".

  <add key="RelativePluginAssemblyDirectory" value="plugins" />

It then tries to call LoadFrom() on those assemblies at runtime, which fail because I guess things are not loadable from there (at least for me!).  The fix was to change it to "bin", and move the DLLs from plugins into bin.


I'm not sure why I hit those issues that you guys don't hit.  This is on Server 2008 R2 using IIS7.

Nov 15, 2010 at 12:49 AM

1) That was obviously a mistake on our part. Thanks for pointing it out. We'll fix the config and push it tomorrow.

2) Thanks for brining the plugins issue to our attention. We're developing on Win 7 using IIS7 - I'm not sure what we have different in our IIS config (compared to yours) that allows it to load from the plugins folder. But we'll consider changing the default location in the config so that it doesn't require any potential IIS changes, or changing the location of the plugins.

Nov 15, 2010 at 4:58 PM

Thanks Kevin.  Yes, #2 is a bit strange, and I haven't been able to fully understand what makes it fail.  I did check that I was able to read the DLL, but LoadFrom fails.  Some security setting somewhere might be set to a tighter level.

Nov 18, 2010 at 1:12 PM

In regards to the plugins issue, the DLLs are now placed into the bin folder of the Gallery.Server project instead of into a Plugins directory. The DLLs themselves have been removed from source control as the root ClickToBuild will automatically create them.

Nov 18, 2010 at 7:51 PM

Yep, I saw that.  That fixes the issue for me, thanks!