Last post Jul 18, 2011 01:17 PM by sjnaughton
Jul 09, 2011 05:44 AM|mve|LINK
I have a DynamicData project that works fine locally. I built it with EntityFramework using a connection string to access my remote database on my Web Host's site.
To deploy it I published it to a local folder where I changed the connection string in web.config to use the connection string for local access to the database from the website. I copied the contents of the bin folder to my site's bin folder and I copied
the rest of the published files to a new folder on my web site.
Initially I got an error that Default.aspx could not find "~/Site.master" so I changed the line to read Masterfile="Site.master" and that problem went away.
However I now get the "There are no accessible tables" error from Default.aspx.cs.
I already have a couple of asmx web services running from the site and they both use EntityFramework and .NET 4. I deployed them using the same technique and they work well. I have tripple checked the connection string.
Any ideas what could be wrong?
Jul 09, 2011 05:47 AM|sjnaughton|LINK
You need to deploy everything as is not copying bin folder to a different location.
Jul 09, 2011 09:01 AM|mve|LINK
Thanks for the reply. I have now deployed the bin folder along with all the other files to the sub folder on the server. That means the dll files are in both the root bin folder and the bin folder in the subdirectory but I still get the same error.
When I deployed the web services I reffered to I found they only worked if the dlls were in the root bin folder, - not a bin folder in the web service sub folder.
Excuse my ignorance. My main job is Outlook add-ins and I am fairly ignorant about the finer points of the web.
Jul 09, 2011 09:07 AM|sjnaughton|LINK
Ah, I think I see, you are p[lacinng the site in a sub folder of a larger site?
Jul 10, 2011 05:06 AM|mve|LINK
Yes that is right. The root folder contains the main bin folder and folders for other projects. For instances I have a web service called PP1WebService. Its dlls are in the main bin folder and the other files are in a PP1WebService folder.
That means there is more than one web.config. The connection string for the dynamic data project is in the web.config in the AdminDynamicData sub folder.
Jul 10, 2011 05:38 AM|sjnaughton|LINK
I think you would be best served by createing a vitual path and puttin the site in there so it can have it's own bin and global.asax etc. You can probably get it working the other way but I recon it's a lot of work.
Jul 18, 2011 11:38 AM|mve|LINK
Sorry for the delay in replying. I've been away. Your advice was spot on. I got onto my web host control panel and found the option to create virtual directories. Once that was done it worked like magic. Thanks for your help.
Jul 18, 2011 01:17 PM|sjnaughton|LINK
Hi MVE, glad your sorted.